/* Common mobile-specific variables */
:root {
  --mobile-padding-sm: 8px;
  --mobile-padding-md: 12px;
  --mobile-spacing-sm: 6px;
  --mobile-spacing-md: 10px;
  --mobile-border-radius: 8px;
  --mobile-font-size-xs: 0.7rem;
  --mobile-font-size-sm: 0.75rem;
  --mobile-font-size-md: 0.85rem;
  --mobile-icon-size-sm: 0.8rem;
  --mobile-icon-size-md: 1rem;
  --mobile-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
  
/* Apply mobile styles only on screens smaller than 768px */
@media (max-width: 767.98px) {

    /* Ticket link button: match icon/text size to match-time-data and match-location */
  .ticket-link-btn {
    font-size: 0.65rem !important;
    line-height: 1.5 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    text-decoration: none !important;
    color: inherit !important;
    margin-left: auto !important;
    float: right !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
  }
  
  .ticket-link-btn i {
    font-size: 0.65rem !important;
    width: 14px !important;
    min-width: 14px !important;
    text-align: center !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .ticket-link-btn span {
    font-size: 0.65rem !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .ticket-link-btn i.fa-ticket-alt {
  position: relative;
  top: 1px !important;
}

.ticket-link-btn i.fa-arrow-up-right-from-square {
  font-size: 0.6rem !important;
  margin-left: -1px !important;
  position: relative;
  top: 0.3px !important;
}
  
  body:not(.mobile-ready) .form-section:not(:first-child) {
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
.match-details-section.show {
  height: auto;
  margin-top: 6px;
  border-top: 1px solid rgba(4,61,124,0.07) !important; /* subtle blue line */
  padding-top: 8px;
  background-color: transparent !important;
  border-radius: 4px;
}
.match-details-content {
  margin-left: 15px !important;
}
  .match-details-section.show {
    border-radius: 0 !important;
  }
  /* Only show form sections when body gets mobile-ready class */
  body.mobile-ready .form-section {
    visibility: visible;
    opacity: 1;
  }

  /* Form section styling that's consistent before and after transformation */
  .form-section {
    position: relative;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 0.5rem;
  }

  .form-section:first-child {
    border-bottom: none;
  }
  
  /* ===== 1. GLOBAL LAYOUT & TYPOGRAPHY ===== */
  body {
    font-size: 0.9rem;
    overflow-x: hidden; /* Prevent horizontal overflow */
  }
  
  .container {
    padding-left: var(--mobile-padding-md);
    padding-right: var(--mobile-padding-md);
  }
  
  /* Consistent spacing */
  .row {
    margin-left: -8px;
    margin-right: -8px;
  }
  
  .row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
  }
  
  /* Optimize all headings for mobile */
  h1, .h1 { font-size: 1.6rem !important; }
  h2, .h2 { font-size: 1.4rem !important; }
  h3, .h3 { font-size: 1.2rem !important; }
  h4, .h4 { font-size: 1.1rem !important; }
  h5, .h5 { font-size: 1rem !important; }
  h6, .h6 { font-size: 0.9rem !important; }
  
  /* Standard margin adjustments */
  .mb-3 { margin-bottom: 0.75rem !important; }
  .mb-4 { margin-bottom: 1rem !important; }
  .mb-5 { margin-bottom: 1.5rem !important; }

  
  /* ===== 3. HOME PAGE OPTIMIZATION ===== */
  /* Hero section */
  .hero {
    padding: 1.5rem 0;
    margin-bottom: 1rem;
    text-align: center;
  }
  
  .hero h1.display-4 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem;
    line-height: 1.3;
  }
  
  .hero p.lead {
    font-size: 0.9rem;
    margin-bottom: 0;
  }
  
  /* Search card */
  .search-card {
    margin: 1rem 0;
    border-radius: 10px;
  }
  
  .search-card .card-body {
    padding: 1rem;
  }
  
  .search-card .card-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }
  
  .search-card .card-title::after {
    width: 40px;
    height: 2px;
  }
  
  /* Form elements */
  .search-card .form-label {
    font-size: var(--mobile-font-size-sm);
    margin-bottom: 0.2rem;
  }
  
  .search-card .form-label .icon {
    font-size: var(--mobile-icon-size-sm);
    width: 16px;
  }

  .search-card .btn-primary {
    font-size: var(--mobile-font-size-md);
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    height: auto;
  }
  
  .search-card .form-text {
    font-size: var(--mobile-font-size-xs);
    margin-top: 0.2rem;
    opacity: 0.8;
  }
  
  /* Form spacing */
  .search-card .mb-3 {
    margin-bottom: 0.75rem !important;
  }
  
  /* Range inputs */
  .form-range {
    height: 0.75rem;
  }
  
  /* ===== 4. SELECT2 WIDGETS ===== */
  .select2-container .select2-selection--multiple,
  .select2-container .select2-selection--single {
    min-height: 36px !important;
    height: auto !important;
  }
  
  .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    min-height: 28px !important;
    padding: 2px !important;
  }
  
  .select2-container--default .select2-selection--multiple .select2-selection__choice {
    font-size: var(--mobile-font-size-xs);
    margin: 2px;
    padding: 1px 4px 1px 16px !important;
    height: 22px !important;
  }
  
  .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    left: 4px !important;
    top: 50% !important;
    font-size: var(--mobile-font-size-sm) !important;
  }
  
  .select2-results__option {
    padding: 0.5rem !important;
    font-size: var(--mobile-font-size-sm) !important;
  }
  
  /* ===== 5. FILTER BAR & CONTROLS ===== */
  .filter-bar {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: var(--mobile-border-radius);
  }
  
  .filter-group {
    margin-bottom: 0.5rem;
  }
  
  .form-label {
    font-size: var(--mobile-font-size-xs);
    margin-bottom: 0.2rem;
  }
  
  /* Make date filter more accessible */
  #dateFilter {
    padding-right: 28px;
  }
  
  .date-filter-icon {
    top: 45%;
    right: 8px;
    font-size: var(--mobile-icon-size-sm);
  }
  
  /* Active filters display */
  #activeFilters {
    margin-top: 0.5rem;
  }
  
  #filterBadges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 0.5rem;
  }
  
  #filterBadges .badge {
    height: 22px;
    font-size: var(--mobile-font-size-xs);
    padding: 0 0.35rem 0 0.5rem;
    border-radius: 4px;
  }
  
  #filterBadges img {
    width: 12px;
    height: 12px;
    margin-right: 2px;
  }
  
  #filterBadges .btn-close {
    width: 6px;
    height: 6px;
    padding: 5px;
    margin-left: 3px;
  }
  
  #clearFilters {
    font-size: var(--mobile-font-size-xs);
    padding: 0.25rem 0.5rem !important;
    height: 24px;
    display: inline-flex;
    align-items: center;
  }
  
  /* ===== 6. SCHEDULE & RESULTS DISPLAY ===== */
  /* Date sections */
  .date-header {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
  }
  
  .date-header i.display-5 {
    font-size: 1.25rem;
  }
  
  .date-header h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }
  
  .date-stats {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
  }
  
  .date-stats .badge {
    font-size: var(--mobile-font-size-xs);
    padding: 0.2rem 0.4rem;
  }
  
  /* Month sections */
  .month-section {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .month-section h2.h4 {
    font-size: 1rem;
    padding-bottom: 0.5rem;
  }
  
  /* Date headings */
  h3.h5.mb-3 {
    font-size: var(--mobile-font-size-md) !important;
    margin-bottom: 0.5rem !important;
    padding: 0.5rem;
    border-radius: 4px;
  }
  
  h3.h5.mb-3 i {
    font-size: var(--mobile-icon-size-sm);
    margin-right: 4px;
  }
  
  h3.h5.mb-3 .badge {
    font-size: var(--mobile-font-size-xs);
    padding: 0.2rem 0.4rem;
    margin-left: 4px;
  }
  
  /* League headers */
  .league-header {
    padding: 0.5rem !important;
    border-radius: 6px 6px 0 0;
  }
  
  .league-header img {
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
  }
  
  .league-header h4.h6,
  .league-header h5.h6 {
    font-size: var(--mobile-font-size-sm) !important;
  }
  
  /* ===== 7. GAME CARDS STYLING ===== */
  /* Basic game card styling */
  .game-card {
    margin-bottom: 0.5rem !important;
    border-radius: var(--mobile-border-radius) !important;
    box-shadow: var(--mobile-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  
  .game-card:hover, 
  .game-card:active {
    background-color: rgba(0,0,0,0.02);
  }
  
  .game-card .card-body {
    display: block;
    padding: 0.75rem 0.5rem !important;
  }

  
  /* Match teams layout */  
  .match-teams {
    display: grid !important;
    grid-template-columns: 1fr 22px 32px 22px 1fr !important; /* name, logo, vs, logo, name */
    align-items: center !important;
    justify-items: center !important;
    width: 100% !important;
    gap: 0 !important;
    font-size: 0.6rem !important;
    line-height: 1.2 !important;
    text-align: center !important;
    margin-bottom: -px !important;
  }
  
  .match-teams .team-logo {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
    grid-row: 1 !important;
  }
  
  .match-teams .vs-text {
    grid-column: 3 !important;
    grid-row: 1 / span 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    color: #234b7a !important;
    min-width: 32px !important;
    min-height: 20px !important;
    height: 100% !important;
    z-index: 1 !important;
  }
  
  .match-teams strong,
  .match-teams span:not(.vs-text),
  .match-teams > :not(img):not(.vs-text) {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    text-align: center !important;
    max-width: 100% !important;
    display: block !important;
    font-size: 0.6rem !important;
    line-height: 1.15 !important;
  }
  
  .match-teams > :first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    text-align: right !important;
    padding-right: 2px !important;
  }
  
  .match-teams img.team-logo:first-of-type {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  
  .match-teams img.team-logo:last-of-type {
    grid-column: 4 !important;
    grid-row: 1 !important;
  }
  
  .match-teams > :last-child {
    grid-column: 5 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    text-align: left !important;
    padding-left: 2px !important;
  }
  
  /* If team name is too long, allow it to wrap to next line */
  .match-teams > :first-child,
  .match-teams > :last-child {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 90px !important;
  }
  
  /* Responsive: stack names if too long */
  @media (max-width: 400px) {
    .match-teams > :first-child,
    .match-teams > :last-child {
      max-width: 60px !important;
      font-size: 0.55rem !important;
    }
  }
  
  
  /* Details section - collapsed by default */
.match-details-section {
  height: 0;
  overflow: hidden;
  margin-top: 0;
  width: 100%;
}

.match-details-content {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important; /* Center content horizontally */
  gap: 10px !important;
  font-size: 0.65rem !important;
  padding: 4px 8px !important;
  background-color: white !important;
}

.match-details-content > * {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important; /* Set icon-text gap to 2px */
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.match-details-first-row,
.match-date-detail,
.match-time-detail,
.match-location-detail {
  display: contents !important;
}

.match-details-content i {
  font-size: 0.65rem !important;
  width: 14px !important;
  text-align: center;
  color: var(--secondary-color);
  margin-right: 0 !important;
  position: relative;
  top: -1px; /* Move icon up by 1px */
}

.match-location-detail i {
  color: var(--accent-color) !important;
  margin-right: 0 !important;
  position: relative;
  top: -1px; /* Move icon up by 1px */
}
/* Show details when expanded */
.match-details-section.show {
  height: auto;
  margin-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 8px;
  background-color: rgba(0,0,0,0.015);
  border-radius: 4px;
}

/* Match location detail alignment */
.match-location-detail {
  justify-content: center !important; /* Center alignment */
  text-align: center !important;
}

.match-details-first-row {
  display: flex;
  align-items: center;
  justify-content: center !important; /* Center alignment */
  gap: 36px !important;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding-bottom: 8px;
  margin-bottom: 2px;
}

.match-date-detail,
.match-time-detail {
  border: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  flex-shrink: 0;
  justify-content: center !important; /* Center alignment */
  text-align: center !important;
}

/* Layout for expanded details */
.match-details-content {
  display: flex !important;
  flex-direction: row !important; /* Keep items in a single line */
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: var(--mobile-font-size-xs);
  padding: 4px 8px;
}

/* Individual detail items */
.match-time-detail,
.match-location-detail,
.match-date-detail {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important; /* Set icon-text gap to 2px */
  padding: 2px 0 !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Date spans the full width */
.match-date-detail {
  grid-column: 1 / span 2;
  border-bottom: 1px dashed rgba(0,0,0,0.06);
  padding-bottom: 6px;
  margin-bottom: 4px;
  justify-content: center !important;
  text-align: center !important;
}

/* Icons in details */
.match-time-detail i,
.match-location-detail i,
.match-date-detail i {
  font-size: var(--mobile-font-size-xs);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  color: var(--secondary-color);
  position: relative;
  top: -1px; /* Move icon up by 1px */
}

.match-location-detail i {
  color: var(--accent-color);
  position: relative;
  top: -1px; /* Move icon up by 1px */
}

/* Hide desktop elements on mobile */
.desktop-time-display,
.desktop-location-display,
.match-location {
  display: none !important;
}

  
  /* ===== 8. CALENDAR VIEW OPTIMIZATIONS ===== */
  
  /* ===== 9. TRIP CARDS STYLING ===== */
  /* Trip card container */
  .trip-card {
    border-radius: 10px !important;
    margin-bottom: 3rem !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  /* Add decorative separator between cards */
    .trip-card:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -2.25rem;
    left: 50%;
    width: 90%;  /* Full width line as requested */
    height: 2px;
    background: linear-gradient(to right, 
      rgba(4, 61, 124, 0), 
      rgba(4, 61, 124, 0.15), 
      rgba(4, 61, 124, 0.3), 
      rgba(4, 61, 124, 0.15), 
      rgba(4, 61, 124, 0));
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
    }

    .trip-card:not(:last-child)::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    bottom: -2.65rem;
    left: 50%;
    font-size: 0.9rem;
    color: var(--secondary-color);
    background: white;
    padding: 0 10px;
    transform: translateX(-50%) rotate(90deg);
    z-index: 6;
    pointer-events: none;
    }
  
  /* Card header */
  .trip-card .card-header {
    padding: 0.75rem !important;
    border-bottom: none;
  }
  
  /* Trip header structure */
  .trip-header {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center children horizontally */
    width: 100%;
    gap: 0.5rem;
  }
  
  .trip-header-main {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    align-items: center;
  }
  
  /* Trip title */
  .trip-title, 
  .trip-header-main h3 {
    font-size: 1rem !important;
    margin-bottom: 0 !important;
    font-weight: 600;
  }
  
  /* Match count badge */
  .match-count-badge {
    font-size: var(--mobile-font-size-xs);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
  }
  
  /* Trip metadata */
  .trip-header-meta {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom-width: 1px;
    gap: 0.5rem 0.75rem;
  }
  
  .trip-meta-item {
    font-size: var(--mobile-font-size-xs);
    margin-right: 0;
    margin-bottom: 0;
  }
  
  .trip-meta-item i {
    width: 14px;
    font-size: var(--mobile-font-size-sm);
    margin-right: 0.3rem;
  }
  
  /* Stats container */
  .stats-container {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .option-stats {
    gap: 0.5rem;
    justify-content: flex-start;
  }
  
  /* Stat items */
  .stat-item {
    padding: 0.2rem;
    min-width: unset;
  }
  
  .stat-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    margin-right: 0.4rem;
  }
  
  .stat-icon i {
    font-size: var(--mobile-font-size-sm);
  }
  
  .stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.1rem;
  }
  
  .stat-value {
    font-size: var(--mobile-font-size-sm);
    line-height: 1.1;
  }
  
  /* Toggle button */
  .toggle-details-button {
    padding: 0.5rem;
    font-size: var(--mobile-font-size-sm);
    border-radius: 6px;
    width: auto; /* Change from 100% to auto width */
    min-width: 140px; /* Set minimum width */
    margin: 0.75rem auto 0.25rem; /* Center with auto left/right margins */
    box-shadow: 0 2px 5px rgba(4, 61, 124, 0.15);
    min-height: 44px; /* Better touch target */
    display: flex; /* Use flexbox for perfect centering */
    justify-content: center;
    align-items: center;
    text-align: center; /* Center text as fallback */
  }
  
  /* ===== 10. PREVIEW SECTIONS ===== */
  /* Preview containers */
  .match-preview,
  .hotel-summary-preview,
  .airport-preview {
    background: white;
    border-radius: 6px;
    padding: 0.6rem;
    margin-bottom: 0.6rem;
    border: 1px solid rgba(4, 61, 124, 0.12);
  }
  
  /* Section titles */
  .preview-section-title,
  .match-preview-title {
    font-size: var(--mobile-font-size-sm);
    margin-bottom: 0.4rem;
    padding-bottom: 0.25rem;
  }
  
  .preview-section-title i,
  .match-preview-title i {
    margin-right: 0.3rem;
    font-size: var(--mobile-font-size-sm);
  }
  
  /* Match preview items */
  .match-preview-item {
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 4px 22px 4px 0; /* Add right padding for the arrow and even padding top/bottom */
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 3px;
  }
  .match-preview-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }

  /* Main match content with teams and logos */
  .match-content-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0;
    padding-right: 0;
  }
  
  /* Position indicator chevron */
  .match-content-grid::after {
    content: '\f078'; /* fa-chevron-down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 6px;
    top: 50%; /* Position exactly at 50% */
    transform: translateY(-50%); /* Perfect vertical centering */
    font-size: 0.7rem;
    color: #777;
    transition: transform 0.2s ease;
    margin: 0;
    line-height: 1;
    height: 0.7rem; /* Match the font size for perfect centering */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Rotate chevron when expanded */
  .match-preview-item.details-expanded .match-content-grid::after {
    transform: translateY(-50%) rotate(180deg);
  }

    /* Instead of hiding these elements completely, use a mobile-specific approach */
    .match-preview-item .match-location-side, 
    .match-preview-item .match-datetime-side {
      /* Use position absolute to remove from flow without display:none */
      position: absolute;
      left: -9999px;
      height: 1px;
      width: 1px;
      overflow: hidden;
    }
    
    /* Make mobile-specific grid override */
    .match-preview-item .match-content-grid {
      display: flex;
      flex-direction: column;
      width: 100%;
      padding-right: 0;
    }
    
    /* Use mobile-specific selector for chevron */
    .match-preview-item.mobile-preview .match-content-grid::after {
      content: '\f078'; /* fa-chevron-down */
      font-family: 'Font Awesome 5 Free';
      font-weight: 900;
      position: absolute;
      right: 6px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 0.7rem;
      color: #777;
      transition: transform 0.2s ease;
      margin: 0;
      line-height: 1;
      height: 0.7rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  
  /* Teams and logos - centered layout */
  .match-teams-preview {
    display: grid !important;
    /* Reduce column widths and set consistent 2px gaps */
    grid-template-columns: 1fr 18px 24px 18px 1fr !important;
    column-gap: 2px !important; /* Force 2px gaps between grid items */
    align-items: center;
    justify-items: center;
    width: 100%;
    margin: 5px 0;
    padding: 2px 0;
  }

  /* Team name styling */
  .match-teams-preview strong {
    font-size: 0.6rem !important;
    line-height: 1.15;
    height: 1.15em; /* Fixed height for consistency */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    margin: 0; /* Remove any margin */
  }

  /* VS text styling */
  .match-teams-preview .vs-text {
    font-size: 0.6rem;
    opacity: 0.8;
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0;
    padding: 0;
  }

  /* Team logos */
  .match-teams-preview img.team-logo-small {
    width: 16px;
    height: 16px;
    object-fit: contain;
  }
  
  /* Make each item in grid take its proper position */
  .match-teams-preview strong:first-child {
    padding-right: 0;
    text-align: right;
    justify-self: end; /* Align to right end of column */
  }
  
  .match-teams-preview img:first-of-type {
    grid-column: 2;
  }
  
  .match-teams-preview .vs-text {
    grid-column: 3;
  }
  
  .match-teams-preview img:last-of-type {
    grid-column: 4;
  }
  
  .match-teams-preview strong:last-child {
    padding-left: 0;
    text-align: left;
    justify-self: start; /* Align to left start of column */
  }

  /* Hide location/date/time in main view */
  .match-location-side, 
  .match-datetime-side {
    display: none;
  }
  .match-teams-preview i {
    font-size: var(--mobile-font-size-xs);
    width: 10px;
  }
  
  .match-location-preview {
    font-size: var(--mobile-font-size-xs);
    gap: 0.25rem;
  }
  
  .match-location-preview i {
    font-size: var(--mobile-font-size-xs);
    width: 10px;
  }
  
  .match-date {
    font-size: 0.65rem;
    margin-top: 0.2rem;
  }
  
  /* More matches indicator */
  .more-matches-indicator {
    padding: 0.3rem 0 0;
    margin-top: 0.2rem;
    font-size: var(--mobile-font-size-xs);
  }
  
  /* ===== 11. HOTEL & AIRPORT ITEMS ===== */
  /* Hotel items */
  .hotel-list {
    gap: 0.4rem;
  }
  
  .hotel-stay-item {
    font-size: var(--mobile-font-size-xs);
    gap: 0.25rem;
  }
  
  .hotel-stay-item i {
    font-size: var(--mobile-font-size-xs);
    width: 10px;
  }
  
  .hotel-dates {
    font-size: 0.65rem;
  }
  
  /* Airport items */
  .airport-list {
    gap: 0.3rem;
  }
  
  .airport-item {
    font-size: var(--mobile-font-size-xs);
  }
  
  .airport-divider {
    font-size: 0.65rem;
    padding: 0.3rem 0 0.15rem;
    margin-top: 0.15rem;
  }
  
  /* ===== 12. TRAVEL OPTIONS ===== */
  /* Options panel */
  .travel-options-section {
    margin-top: 0.5rem;
  }
  /* Tab content */
  .tab-content {
    padding: 0.75rem;
  }
  
  /* Variant summary */
  .variant-summary {
    padding: 0.75rem;
    margin: 0.4rem 0;
    border-radius: 8px;
  }
  
  /* Option header */
  .option-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
  }
  
  .option-title {
    font-size: var(--mobile-font-size-md);
  }
  
  .option-metrics {
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
  }
  
  .option-metric {
    font-size: var(--mobile-font-size-xs);
    gap: 0.25rem;
  }
  
  .option-metric i {
    font-size: var(--mobile-font-size-xs);
  }
  
  .option-metric span {
    font-size: var(--mobile-font-size-xs);
  }
  
  /* Route preview */
  .route-preview {
    min-width: 120px;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
  }
  
  .route-label {
    font-size: 0.65rem;
    margin-bottom: 0.3rem;
  }
  
  .route-cities {
    font-size: var(--mobile-font-size-sm);
  }
  
  .route-cities i {
    margin: 0 0.5rem;
    font-size: var(--mobile-font-size-xs);
  }
  
  /* ===== 13. TIMELINE COMPONENTS ===== */
  /* Timeline structure */
  .timeline {
    position: relative;
    padding: 0.75rem 0.5rem 0.5rem;
    margin-top: 0.75rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background: repeating-linear-gradient(
      to bottom,
      var(--primary-color) 0px,
      var(--secondary-color) 70px,
      var(--primary-color) 140px
    );
    opacity: 0.4;
    border-radius: 3px;
  }
  
  /* Day header optimizations */
  .day-header {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
  }

  .day-badge {
    position: absolute;
    top: 0.4rem;
    left: -0.4rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 2;
    background: conic-gradient(from 135deg, var(--primary-color), #0055cc, var(--primary-color));
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(4, 61, 124, 0.2);
  }
  
  .day-header-content {
    margin-left: 2.25rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .day-header h5 {
    font-size: 0.85rem !important;
    margin-bottom: 0.2rem !important;
    padding-top: 5px;
    font-weight: 600;
    line-height: 1.2;
    width: 100%;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  
  .day-date {
    font-size: 0.6rem !important; /* Smaller font size */
    margin-top: 0 !important;
    font-weight: normal;
    opacity: 0.7; /* Slightly reduced opacity */
    flex-shrink: 0;
    color: #666;
  }
  
  /* ===== 14. MATCH ITEMS ===== */
  .match-item {
    padding: 0.65rem !important;
    margin-bottom: 0.75rem !important;
    margin-left: 0px !important;
    border-radius: 8px;
    max-width: calc(100%) !important;
    position: relative;
    border: 1px solid rgba(4, 61, 124, 0.1) !important;
    box-shadow: 0 2px 6px rgba(4, 61, 124, 0.05) !important;
    background: #ffffff !important;
  }

  .match-item .match-header {
    border-bottom: none !important;
    padding-bottom: 0.2rem !important;
    margin-bottom: 0.25rem !important;
  }
  
  .match-item::before {
    content: '';
    position: absolute;
    left: -16px;
    width: 16px;
    height: 2px;
    top: 15px;
    background-color: rgba(4, 61, 124, 0.15);
  }

  /* Match must-team styling */
  .match-item.must-team {
    border-left: 3px solid var(--warning-color) !important;
  }
  
  /* Match header - teams and time */
  .match-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
  
  .match-teams img {
    width: 20px !important;
    height: 20px !important;
    margin: none !important;
  }
  
  .match-meta {
    gap: 0.5rem !important;
    margin-top: 0.3rem !important;
    padding-top: 0 !important;
    flex-direction: column;
    align-items: flex-start;
  }

  /* Create a container for location and time */
  .match-info-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    font-size: 0.65rem !important;
    line-height: 1.2;
  }

  .match-location, .match-travel, .match-time-inline {
    font-size: 0.65rem !important;
    display: flex;
    align-items: center;
    line-height: 1.2;
    margin: 4px !important;
    padding: 0 !important;
    border: none !important;
  }

  .match-location i, .match-travel i, .match-time-inline i {
    font-size: 0.65rem !important;
    width: 14px !important;
    margin-right: 4px !important;
    flex-shrink: 0;
    text-align: center;
  }
  
  .match-location, .match-travel {
    font-size: 0.65rem !important;
    display: flex;
    align-items: center;
    width: 100%;
    line-height: 1.2;
  }

  .match-location i, .match-travel i {
    font-size: 0.65rem !important;
    width: 14px !important;
    margin-right: 4px !important;
    flex-shrink: 0;
  }
  
  .must-see-tag {
    font-size: 0.6rem !important;
    padding: 0.1rem 0.4rem !important;
    position: absolute;
    top: -0.25rem;
    right: 0.5rem;
    line-height: 1;
    border-radius: 4px;
  }

  
.match-location-container {
    display: flex !important;
    align-items: center !important; /* Center vertically */
    flex-wrap: nowrap !important;
    width: 100% !important;
    margin: 0 !important;
    margin-top: 2px !important;
    gap: 0 !important;
}

.match-location-container i,
.match-location-container{
    vertical-align: middle;
    align-self: center;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1 !important;
}

.match-location-container > span,
.match-location-container {
    display: flex;
    align-items: center;
    margin: 0 !important;
    line-height: 1.2 !important;
}
  /* Pin icon with exactly 4px spacing to location */
  .match-location-container i.fa-map-marker-alt {
    margin-right: 0.5px !important;
    font-size: 0.65rem !important;
    color: var(--accent-color);
    flex-shrink: 0;
    width: 14px !important;
    text-align: center;
  }
  /* Location text - make sure it has proper margin */
  .match-location-container > span:first-of-type {
    margin-right: 0.5px !important; /* Exactly 4px spacing to clock icon */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem !important;
    line-height: 1.5 !important; ;
  }
    
  .match-location-container .match-time-data i.fa-clock {
      font-size: 0.6rem !important;
      color: var(--accent-color); /* same as location icon */
      width: 14px !important;
      text-align: center;
      margin-right: 0.5px !important; /* match location icon spacing */
      flex-shrink: 0;
            position: relative;
      top: 0.5px; /* Move the clock icon 2px down */
  }
  
  .match-location-container .match-time-data {
      font-size: 0.65rem !important;
      line-height: 1.5 !important;
      color: inherit; /* inherit color from parent */
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      position: relative;
      top: 0.5px; /* Move the clock icon 2px down */
  }
  .match-location-container > span:first-of-type {
    margin-right: 8px !important; /* Increased space between location text and time icon */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem !important;
    line-height: 1.5 !important;
}
  /* All spans in location container should have consistent styling */
  .match-location-container span {
    font-size: 0.65rem !important;
    line-height: 1.2;
  }

    /* Location icon styling */
  .match-location i {
    color: var(--accent-color);
  }
  
  /* ===== 15. TRAVEL COMPONENTS ===== */
  /* Travel segments */
  .travel-segments {
    margin: 0.5rem 0;
  }
  
  .travel-segment {
    padding: 0.65rem !important;
    margin-bottom: 0.75rem !important;
    margin-left: 30px !important;
    max-width: calc(100% - 32px) !important;
    border-radius: 8px;
    background: white;
    border: 1px solid rgba(4, 61, 124, 0.1);
    box-shadow: 0 2px 6px rgba(4, 61, 124, 0.05) !important;
  }

  .travel-segment::before {
    content: '';
    position: absolute;
    left: -16px;
    width: 16px;
    height: 2px;
    top: 15px;
    background-color: rgba(4, 61, 124, 0.15);
  }
  
  .segment-number {
    width: 18px;
    height: 18px;
    font-size: 0.6rem !important;
    margin-right: 0.35rem;
    line-height: 18px;
  }
  
  .segment-header {
    margin-bottom: 0.35rem;
    padding-bottom: 0.35rem;
    font-size: 0.7rem !important;
    font-weight: 600;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
  }
  
  /* Travel items */
  .travel-container {
    margin-left: 0.75rem;
    margin-right: 0;
    margin-bottom: 0.35rem;
    width: auto;
    max-width: 100%;
    position: relative;
  }
  
  .travel-item {
    margin-bottom: 0.25rem;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background-color: rgba(4, 61, 124, 0.03); /* Subtle blue tint instead of grey */
    border: 1px solid rgba(4, 61, 124, 0.06); /* Light border */
  }

  /* Fix dynamic itinerary container */
  .dynamic-itinerary-container {
    padding: 0 0.5rem !important;
    margin-right: 0 !important;
    overflow: visible !important;
  }
  
  .travel-item::before {
    display: none; /* Remove unnecessary connector */
  }
  
  .travel-item-content {
    gap: 0.25rem;
    width: 100%;
  }
  
/* Fix airplane route display */
.travel-item-route {
  font-size: 0.65rem !important;
  gap: 0.2rem;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 0rem !important;
}

.travel-item-route > div {
  position: relative;
  top: 1px;
}

.travel-item-route i {
  color: var(--primary-color) !important;
  font-size: 0.65rem !important;
  opacity: 0.8;
  flex-shrink: 0;
}
  .day-date-inline {
  font-size: 0.8em;
}
  /* Ensure text doesn't overflow */
  .travel-context {
    font-size: 0.65rem !important;
    max-width: calc(100% - 25px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .travel-time {
    font-size: 0.65rem;
  }
  
  /* ===== 16. HOTEL INFO ===== */
  .hotel-info {
    padding: 0.65rem !important;
    margin-bottom: 0.75rem !important;
    margin-left: 30px !important;
    max-width: calc(100% - 32px) !important;
    border-radius: 8px;
    background: white;
    border: 1px solid rgba(4, 61, 124, 0.1);
    box-shadow: 0 2px 6px rgba(4, 61, 124, 0.05) !important;
  }
  
  .hotel-info::before {
    content: '';
    position: absolute;
    left: -16px;
    width: 16px;
    height: 2px;
    top: 15px;
    background-color: rgba(4, 61, 124, 0.15);
  }
  
  .hotel-change, .hotel-stay {
    gap: 0.35rem;
    font-size: 0.7rem !important;
    line-height: 1.2;
    display: flex;
    align-items: flex-start;
  }
  
  .hotel-change i, .hotel-stay i {
    font-size: 0.7rem !important;
    margin-top: 0.05rem;
    flex-shrink: 0;
  }
  
  /* ===== 17. REST DAYS ===== */
  .rest-day {
    padding: 0.65rem !important;
    margin-bottom: 0.75rem !important;
    margin-left: 30px !important;
    max-width: calc(100% - 32px) !important;
    border-radius: 8px;
    background: white;
    border: 1px solid rgba(4, 61, 124, 0.1);
    box-shadow: 0 2px 6px rgba(4, 61, 124, 0.05) !important;
  }
  
  .rest-day-header {
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    font-size: 0.7rem !important;
    font-weight: 600;
    display: flex;
    align-items: center;
  }
  
  .rest-day-icon, .final-day-icon {
    font-size: 0.7rem !important;
    opacity: 0.8;
  }
  
  .rest-day-message {
    font-size: 0.65rem !important;
    padding-left: 0rem !important;
    line-height: 1.3;
  }
.rest-day::before,
.rest-day::after {
  display: none !important;
}

/* Make hotel stay dates font smaller */
.hotel-stay-dates {
  font-size: 0.55rem; /* Adjust as needed (e.g., 0.8rem, 0.7rem, etc.) */
}

.trip-time-info {
  font-size: 0.9rem; /* Adjust as needed (e.g., 0.8rem, 0.7rem, etc.) */
}

.trip-meta-info {
  font-size: 0.8rem !important;
}

.trip-meta-info span {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}

.trip-meta-info span i {
  position: relative;
  top: 0;
  margin-right: 2px;
  /* Reset icon position */
}
.trip-time-info i {
  position: relative;
  top: -0.7px;
  margin-right: -5px !important; /* Reset icon position */
}

  .nav-link:focus,
  .nav-link:active,
  .nav-link:focus-visible,
  .nav-link.show,
  button.nav-link:focus,
  button.nav-link:active,
  button.nav-link:focus-visible {
    background-color: transparent !important;
    color: var(--primary-color) !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .nav-link.active,
  button.nav-link.active {
    background-color: var(--primary-color, #e3f0ff) !important;
    color: #fff !important;
  }
  /* Remove iOS tap highlight */
  .nav-link, button.nav-link {
    -webkit-tap-highlight-color: transparent !important;
  }

h5.mb-3.d-flex.align-items-center {
  padding: 0.7rem 0.5rem 0.7rem 0 !important;
  padding-left: 5px !important; /* 15px (timeline left) + 2.5px (timeline width) + 20px (icon size + gap) */
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: var(--primary-color) !important;
  display: flex !important;
  align-items: center !important;
  margin-bottom: -2rem !important;
  letter-spacing: 0.01em !important;
  justify-content: flex-start !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

h5.mb-3.d-flex.align-items-center i {
  font-size: 1.2em !important;
  left: 15px !important; /* Align with .timeline::before */
  color: var(--primary-color) !important;
  margin-right: 0.7rem !important;
  background: #ffffff;
  border-radius: 50%;
  padding: 0.35em;
  box-shadow: 0 1px 4px rgba(37,99,235,0.08);
  min-width: 2em;
  min-height: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

  /* ===== 18. LOADING & ERROR STATES ===== */
  .alert {
    padding: 0.65rem;
    font-size: var(--mobile-font-size-sm);
    margin-bottom: 0.75rem;
    border-radius: 6px;
  }
  
  .spinner-border {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 0.15rem;
  }
  
  /* Improve loading animation */
  .custom-loading-container {
    padding: 1rem;
  }
  
  .loading-animation {
    width: 160px;
    height: 100px;
    margin-bottom: 1.25rem;
  }
  
  .football {
    width: 40px;
    height: 40px;
  }
  
  .football::before {
    font-size: 28px;
  }
  
  .loading-message {
    font-size: var(--mobile-font-size-sm);
  }
  
  /* Cancel button */
  .cancel-search-btn {
    margin-top: 1.5rem;
    padding: 0.5rem 1.25rem;
    font-size: var(--mobile-font-size-sm);
    min-height: 44px; /* Better touch target */
  }
  
  /* ===== 19. TEAM HEADER ===== */
  .team-header {
    padding: 0.75rem !important;
  }
  
  .team-header img {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
  }
  
  .team-header h2.h3 {
    font-size: 1.1rem;
    margin-bottom: 0 !important;
  }
  
  .team-header .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }
  
  /* ===== 20. FILTER CARD ===== */
  .filter-card {
    margin-bottom: 0.75rem;
    border-radius: 8px;
  }
  
  .filter-card .card-body {
    padding: 0.75rem;
  }
  
  .filter-card .card-title {
    font-size: var(--mobile-font-size-md);
    margin-bottom: 0.75rem;
  }
  
  #teamFilters .badge, 
  #cityFilters .badge {
    font-size: 0.65rem;
    margin-right: 3px;
    margin-bottom: 4px;
    padding: 3px 6px;
  }
  
  /* Form range value display */
  #gamesSliderValue,
  #hotelChangesValue {
    font-size: var(--mobile-font-size-sm);
  }
  
  /* ===== 21. FEATURE SECTION ===== */
  .feature-icon {
    height: 40px;
  }
  
  .feature-icon i {
    font-size: 1.75rem !important;
  }
  
  
  /* ===== 23. MOBILE TOUCH IMPROVEMENTS ===== */
  /* Improve tap states */
  .btn:active,
  .nav-link:active,
  .game-card:active {
    opacity: 0.7;
    transform: scale(0.98);
  }
  
  /* Better scrolling */
  .scrollable-area {
    overflow-y: auto;
    overscroll-behavior: contain; /* Prevents scroll chaining */
    scroll-behavior: smooth; /* Makes programmatic scrolling smooth */
  }
  
  /* Fixed position elements */
  .fixed-bottom {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .match-info-right {
    gap: 0.5rem;
  }
  
  .match-location-inline,
  .match-time-data,
  .match-date-inline {
    font-size: var(--mobile-font-size-xs);
  }

  .summary-content-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
    /* ===== TRIP COMPLETE STYLING - CENTERED WITH ICON ABOVE ===== */
    .trip-actions-header {
    margin-top: 0rem !important;
    margin-bottom: 0rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  /* Container for trip complete message - centered */
  .timeline-end {
    position: relative;
    margin: 1.5rem auto 2rem;
    max-width: 85%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: translateX(1.2rem); /* Move 2rem to the right */
  }
  
  /* Remove the horizontal connector line since we're centering */
  .timeline-end::before {
    display: none;
  }
  
  /* Flag icon styling - positioned above text */
  .timeline-end-marker {
    position: relative;
    top: auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success-color), #4ade80);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    z-index: 5;
    margin-left: 33px;
  }
  
  .timeline-end-marker i {
    color: white;
    font-size: 0.8rem;
  }
  
  .btn-modern.btn-save {
  background: #fff !important;
  border: 1.5px solid var(--primary-color, #2563eb) !important;
  color: var(--primary-color, #2563eb) !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  padding: 0.55rem 1.1rem !important;
  font-size: 0.98rem !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  transition: border-color 0.15s, color 0.15s, background 0.15s !important;
  margin: 0 auto 0.7rem auto !important;
  min-width: 140px !important;
}

.btn-modern.btn-save .btn-content {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 0.98rem !important;
  color: var(--primary-color, #2563eb) !important;
}

.btn-modern.btn-save i {
  font-size: 1.1em !important;
  color: var(--primary-color, #2563eb) !important;
  opacity: 0.85 !important;
}

.btn-modern.btn-save .btn-glow {
  display: none !important;
}

.btn-modern.btn-save {
  background: #fff !important;
  border: 1.2px solid var(--primary-color, #2563eb) !important;
  color: var(--primary-color, #2563eb) !important;
  box-shadow: none !important;
  border-radius: 7px !important;
  padding: 0.28rem 0.7rem !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  margin: 0 auto 0.5rem auto !important;
  min-width: 90px !important;
  height: 32px !important;
}

.btn-modern.btn-save .btn-content {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  font-size: 0.78rem !important;
  color: var(--primary-color, #2563eb) !important;
}

.btn-modern.btn-save i {
  font-size: 0.95em !important;
  color: var(--primary-color, #2563eb) !important;
  opacity: 0.8 !important;
}

.btn-modern.btn-save .btn-glow {
  display: none !important;
}

.btn-close-modern {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
}

.btn-close-modern i {
  font-size: 1.1rem !important;
  color: white !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.modal-footer.modern-footer .btn-modern {
  min-width: 80px !important;
  height: 30px !important;
  padding: 0.18rem 0.55rem !important;
  font-size: 0.72rem !important;
  border-radius: 6px !important;
  font-weight: 400 !important;
  gap: 0.28rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.modal-footer.modern-footer .btn-modern .btn-content {
  display: flex !important;
  align-items: center !important;
  gap: 0.28rem !important;
  font-size: 0.72rem !important;
}

.modal-footer.modern-footer .btn-modern i {
  font-size: 0.92em !important;
  opacity: 0.8 !important;
  margin-right: 0.1em !important;
}

.modal-footer.modern-footer .btn-glow {
  display: none !important;
}

.modal-footer.modern-footer {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-wrap: nowrap !important;
}

.modal-footer.modern-footer .btn-modern,
.modal-footer.modern-footer .btn-modern .btn-content {
  font-size: 0.7rem !important;
  padding-left: 0.3rem !important;
  padding-right: 0.3rem !important;
}

.modal-footer.modern-footer .btn-modern span {
  font-size: 0.7rem !important;
  line-height: 1.1 !important;
  white-space: normal !important;
}

.trip-actions-header .btn-favorite,
.trip-actions-header .btn-delete {
  margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;

}
  /* Text content styling */
  .timeline-end-text {
    width: 96% !important;
    max-width: 420px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    background: white;
    border-radius: px;
    padding: 0.9rem;
    border: 1px solid rgba(4, 61, 124, 0.1);
    box-shadow: 0 2px 10px rgba(4, 61, 124, 0.08);
    text-align: center;
    margin-top: 0;
    opacity: 1;
    animation: none;
  }
  
  .timeline-end-text h5 {
    font-size: 0.7rem !important;
    margin-bottom: 0.5rem !important;
    color: var(--primary-color);
  }
  
  .timeline-end-text p {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #555;
  }
  
  /* Badge container */
  .timeline-end-text .mt-3 {
    margin-top: 0.7rem !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
  }
.timeline-end-text .mt-3 {
  margin-top: 0.7rem !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  gap: 0.3rem !important;
  align-items: center !important;
  flex-direction: row !important;
}


  /* Add spacing above load more trips button */
  #loadMoreTripsBtn,
  .load-more-container,
  .load-more-btn,
  #loadMoreButton,
  #loadMoreTrips {
    margin-top: 20px !important;
    padding-top: 10px !important;
  }
  
  /* Add spacing to button container if it exists */
  .pagination-container,
  .load-more-wrapper {
    margin-top: 20px !important;
    padding-top: 10px !important;
  }
  
  /* Compact badges */
  .timeline-end-text .badge {
    font-size: 0.55rem;
    padding: 0.12rem 0.42rem;
    font-weight: normal;
    background-color: rgba(4, 61, 124, 0.08) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(4, 61, 124, 0.12);
  }
  
}

/* ===== Extra Small Screens - Phones Smaller Than iPhone 8 ===== */
@media (max-width: 374px) {
  /* Typography adjustments */
  body {
    font-size: 0.85rem;
  }
  
  h1, .h1 { font-size: 1.4rem !important; }
  h2, .h2 { font-size: 1.2rem !important; }
  h3, .h3 { font-size: 1.1rem !important; }
  h4, .h4 { font-size: 1rem !important; }
  h5, .h5 { font-size: 0.9rem !important; }
  h6, .h6 { font-size: 0.85rem !important; }
  
  
  /* Container spacing */
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }
  
  .row {
    margin-left: -5px;
    margin-right: -5px;
  }
  
  .row > [class*="col-"] {
    padding-left: 5px;
    padding-right: 5px;
  }
  
  /* Match display adjustments */
  .match-teams {
    grid-template-columns: minmax(0, 1.4fr) 24px minmax(0, 1.4fr) !important;
  }
  
  .vs-container {
    width: 24px !important;
    min-width: 24px !important;
  }
  
  .team-badge {
    width: 16px !important;
    height: 16px !important;
  }
  
  .team-name {
    font-size: 0.65rem !important;
  }
  
  .home-team, .away-team {
    gap: 3px;
  }
  
  .match-details-content {
    flex-direction: column;
    gap: 4px;
  }
  
  /* Trip card elements */
  .trip-title, .trip-header-main h3 {
    font-size: 0.9rem !important;
  }
  
  .nav-tabs .nav-link {
    padding: 0.4rem 0.5rem;
    font-size: 0.65rem;
    min-width: 70px;
  }
  
  /* Form elements */
  .search-card .btn-primary {
    padding: 0.4rem 0.75rem;
  }
  
  .search-card .card-body {
    padding: 0.75rem;
  }

}

/* ===== Landscape Mode Optimizations ===== */
@media (max-width: 767.98px) and (orientation: landscape) {
  /* Card layout */
  .trip-card .card-body {
    padding: 4rem !important;
  }
  
  /* Header structure changes for landscape */
  .trip-header {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .trip-header-main {
    width: auto;
    margin-bottom: 0;
  }
  
  /* Calendar sizing */
  .calendar-day {
    height: 30px !important;
    min-height: 30px !important;
  }
  
  /* Compact game cards */
  .game-card .card-body {
    padding: 0.5rem !important;
  }
  
  /* Optimize loading screen */
  .loading-animation {
    width: 140px;
    height: 80px;
  }
  
  /* Match display */
  .match-teams-container {
    padding-right: 16px; /* Less space for chevron */
  }
  
  /* Better use of horizontal space */
  .stats-container {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  /* Make tap targets appropriate for landscape mode */
  .toggle-details-button {
    margin: 0.25rem 0 0;
    min-height: 36px;
  }
}

/* ===== Desktop-specific Styles ===== */
@media (min-width: 768px) {
  /* ===== 1. LAYOUT RESTORATIONS ===== */
  
  /* Restore desktop time display */
  .desktop-time-display {
    display: block;
    width: 100%;
  }
  
  /* Restore desktop location display */
  .desktop-location-display {
    display: block;
  }
  
  /* Match display structure */
  .game-card .card-body {
    display: grid;
    grid-template-columns: 80px 1fr 130px;
    align-items: center;
    gap: 10px;
  }
  
  /* ===== 2. COMPONENT POSITIONING ===== */
  
  /* Make sure match-teams is centered in the card */
  .match-main-content {
    grid-column: 2;
  }
  
  /* Time display alignment */
  .match-time {
    text-align: center;
  }
  
  /* ===== 3. VISIBILITY CONTROLS ===== */
  
  /* Show match location properly on desktop */
  .match-location {
    display: block !important;
    font-size: 0.8rem !important;
  }
  
  /* Hide mobile-specific elements on desktop */
  .match-teams-container::after {
    display: none;
  }
  
  /* ===== 4. INTERACTION CHANGES ===== */
  
  /* Make game cards not clickable on desktop */
  .game-card {
    cursor: default;
  }
  
  /* Enhance hover effects that were disabled on mobile */
  .trip-card:hover, 
  .match-item:hover,
  .hotel-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(4, 61, 124, 0.12);
  }
  
  /* Restore animations that might be disabled on mobile */
  .stat-item {
    animation: fadeIn 0.4s both;
  }
  
  .stat-item:nth-child(1) { animation-delay: 0.1s; }
  .stat-item:nth-child(2) { animation-delay: 0.2s; }
  .stat-item:nth-child(3) { animation-delay: 0.3s; }
  .stat-item:nth-child(4) { animation-delay: 0.4s; }
}

@media (max-width: 767.98px) {
  .travel-item-route {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 0.5rem;
  }
  .travel-item-route > i {
    margin-top: 5px;
    flex-shrink: 0;
  }
  .travel-item-route > div {
    flex-direction: row !important;
    align-items: center !important;
    gap: 2px;
  }
  .travel-item-route .travel-context {
    font-size: 0.62rem !important;
    color: #6c757d !important;
    font-style: italic;
    margin-top: 0;
    margin-left: 2px;
    line-height: 1.2;
    letter-spacing: 0.01em;
    display: inline;
    white-space: normal;
    overflow-wrap: break-word;
    max-width: 90vw;
  }
}