/* ========================================
   CONSOLIDATED STYLES: Filters + Nav Bar
   Includes #monthlyRatesAccordion fix
   ======================================== */
  
  /* --- Filters Container --- */
  .filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 5px;
  }
  
  .filter-label {
    position: relative;
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin: 0;
  }
  
  /* --- Province Dropdown --- */
  .province-dropdown {
    text-decoration: none !important;
    font-size: 0.825rem;
    color: black;
  }
  .province-dropdown.active-province,
  .active-province {
    color: var(--brand-color) !important;
    font-weight: bold !important;
  }
  .province-dropdown i {
    font-size: 0.8rem;
    margin-left: 3px;
  }
  .province-dropdown:focus {
    outline: none !important;
  }
  .province-dropdown:hover {
    color: var(--brand-color);
  }
  .province-highlight {
    color: var(--brand-color);
  }
  
  /* --- Dropdown Menu --- */
  .dropdown-menu {
    min-width: 120px;
  }
  .dropdown-item span {
    color: #555;
    font-weight: 400;
  }
  #clearSelectionLink span {
    color: var(--brand-color); /* Keep "Clear selection" red */
  }
  
  /* --- Autocomplete --- */
  .autocomplete-input:focus {
    outline: none;
    border: 1px solid var(--brand-color);
    box-shadow: none;
  }
  .autocomplete-items {
    max-height: none;
    overflow-y: visible;
  }
  .autocomplete-item {
    padding: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
  }
  .autocomplete-item:hover {
    background-color: #e9e9e9;
  }
  .highlight {
    color: var(--brand-color);
  }
  
  /* --- Monthly Rates Accordion (CRITICAL ADDITION) --- */
  #monthlyRatesAccordion {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 1000;
    display: none;
    min-width: 200px;
    width: auto;
  }
  
  /* --- Checkboxes & Labels --- */
  input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--brand-color);
    margin-right: 8px;
    vertical-align: middle;
  }
  label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: black;
  }
  
  /* --- Utility Classes --- */
  .fa-opacity {
    opacity: 0.6;
    font-size: 12px;
  }
  .icon-spacing {
    margin-right: 6px;
  }
  .input-wrapper {
    position: relative;
    margin-bottom: 15px;
  }
  .clear-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--brand-color);
    opacity: 0.5;
  }
  
  /* --- Search Input --- */
  #searchInput.has-text-on-blur {
    color: var(--brand-color);
    font-weight: 600;
  }
  #mainFilterText {
    color: #555 !important;
    font-weight: 400 !important;
  }
  
  /* --- Panels --- */
  .control-panel,
  .hero-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
  }
  .hero-section {
    margin-top: 20px;
  }
  
  /* --- Scroll-to-Top Button --- */
  .scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    width: 40px;
    height: 40px;
    background-color: var(--brand-color);
    color: white;
    text-align: center;
    line-height: 40px;
    font-size: 18px;
    border-radius: 50%;
    text-decoration: none;
    z-index: 1000;
    opacity: 0.8;
    transition: opacity 0.3s;
  }
  .scroll-to-top:hover {
    opacity: 1;
  }
  
  /* ========================================
     APP-STYLE NAVIGATION BAR
     ======================================== */
  .header-links {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    margin-top: 8px;
  }
  
  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease-in-out, transform 0.1s ease;
    padding: 4px 8px;
  }
  .nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
  }
  .nav-item span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: block;
  }
  .nav-item.active {
    color: var(--brand-color); /* Uses centralized variable */
  }
  .nav-item:active {
    transform: scale(0.95);
  }
  /* --- UNIFIED HEADER STYLES --- */

/* The Grid Container for the 5 buttons */
.mobile-action-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    width: 100%;
}

/* The Individual Buttons */
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Look & Feel: Light Grey with Dark Text */
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 6px 2px;
    
    color: #555;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Typography */
    font-size: 0.58rem;
    font-weight: 550;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Icon Styling */
.action-btn i {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #777;
    transition: color 0.2s ease;
}

/* Hover & Active States */
.action-btn:hover,
.action-btn:active {
background-color: white;
border-color: var(--brand-color);
color: var(--brand-color);
text-decoration: none;
}
.action-btn:hover i,
.action-btn:active i {
color: var(--brand-color);
}

/* Active Page State */
.action-btn.active {
border-color: var(--brand-color) !important;
color: var(--brand-color) !important;
background-color: white !important;
cursor: default !important;
}
.action-btn.active i {
color: var(--brand-color) !important;
}
.action-btn.active:hover {
background-color: white !important;
border-color: var(--brand-color) !important;
color: var(--brand-color) !important;
}
.action-btn.active:hover i {
color: var(--brand-color) !important;
}

/* Filter Button — Bootstrap success green */
.action-btn.filter-btn {
    border-color: var(--bs-success);
    color: var(--bs-success);
}
.action-btn.filter-btn i {
    color: var(--bs-success);
}

/* Hide App button in PWA mode (prevents flash) */
@media (display-mode: standalone) {
    [data-bs-target="#installModal"] {
        display: none !important;
    }
    /* Normal pages: 5 buttons minus App = 4 */
    .mobile-action-bar {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    /* Route page: 4 buttons minus App = 3 */
    .mobile-action-bar.route-bar {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    /* Listing page: 5 buttons minus App = 4 */
    .mobile-action-bar.listing-bar {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* --- HEADER SEARCH BAR --- */
.header-search-input {
    padding-left: 38px;   /* Space for Search Icon */
    padding-right: 35px;  /* Space for Clear Icon */
    height: 45px;         /* Comfortable touch target */
    border-radius: 8px;   /* Slightly rounded rect */
    border: 1px solid #dee2e6;
    background-color: #f8f9fa; /* Light grey to match buttons */
    font-size: 0.95rem;
    box-shadow: none;
    transition: all 0.2s ease;
}
.header-search-input:focus {
    background-color: white;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(224, 62, 27, 0.1); /* Subtle Brand Glow */
}

  .resort-list-grid {
      display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px;
  }

  .resort-card {
      display: flex; align-items: center;
      background: white;
      border: 1px solid #eee;
      border-radius: 12px;
      padding: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  }
  .resort-card:hover { background-color: #f9f9f9; border-color: #ddd; }

  .resort-card.selected-card {
      border-color: var(--brand-color);
      background-color: #fff5f5;
      box-shadow: 0 0 0 1px var(--brand-color);
  }

  .resort-card img {
      width: 114px;
      height: 64px;
      object-fit: cover;
      border-radius: 6px;
      margin-right: 15px;
      background-color: #eee;
  }
  .resort-card-info { flex: 1; }

  .selected-check {
      color: var(--brand-color);
      font-size: 20px;
      margin-right: 10px;
      display: none;
  }
  .resort-card.selected-card .selected-check { display: block; }

  /* Target the badge inside resort cards */
  .autocomplete-item .badge {
      font-size: 0.7rem !important;
      padding: 4px 8px;
      margin-left: -4px; 
  }

  .autocomplete-items {
      max-height: none;
      overflow-y: visible;
    }
    .autocomplete-item {
      padding: 6px;
      font-size: 0.85rem;
      cursor: pointer;
      border-bottom: 1px solid #e0e0e0;
      background: white; /* Ensure background is white */
    }
    .autocomplete-item:hover {
      background-color: #e9e9e9;
    }
    .highlight {
      color: #e03e1b;
      font-weight: bold;
    }
    .fa-opacity {
      opacity: 0.6;
      font-size: 12px;
    }

    /* =========================================
   BREADCRUMBS (Compact)
   ========================================= */
   #filterBreadcrumbs {
    background: white;
    padding: 6px 15px 0px 15px; 
    margin-bottom: 0 !important;
    font-size: 0.60rem; 
    font-weight: 550;
    color: #777;
    display: none; 
    line-height: 1.2;
}
.crumb-separator {
    color: var(--brand-color);
    margin: 0 2px;
    font-weight: bold;
}

/* =========================================
   FILTER MODAL STYLES (Ported from map.php)
   ========================================= */

/* Modal Body */
#mainFilterModal .modal-body {
    height: 480px; /* Fixed height for consistency */
    overflow-y: auto;
    padding: 0 1.5rem !important;
    background-color: white;
}

/* Tab Navigation */
.modal-tab-nav {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    display: flex; gap: 10px;
}
.modal-tab-btn {
    background: none;
    border: none;
    padding: 10px 15px;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    font-size: 16px;
}
.modal-tab-btn.active {
    color: black;
    border-bottom: 3px solid var(--brand-color);
}

/* Province Grid */
.province-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 5px;
}
.province-radio-label { display: block; text-align: center; cursor: pointer; margin: 0; }
.province-radio-label input { display: none; }

.province-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 2px;
    font-size: 0.8rem;
    background: white;
    color: #444;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; height: 100%;
}

.province-radio-label input:checked + .province-box {
    border-color: var(--brand-color);
    background-color: #fff;
    color: var(--brand-color);
    font-weight: bold;
}

/* Amenities Grid */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 cols on mobile */
    gap: 10px;
    margin-bottom: 20px;
}
@media (min-width: 768px) {
    .amenities-grid { grid-template-columns: repeat(4, 1fr); }
}

.custom-check-wrapper {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    background: white;
}
.custom-check-wrapper.active {
    border-color: var(--brand-color);
    background-color: #fff;
    color: var(--brand-color);
}
.custom-check-wrapper i { color: #ccc; font-size: 1.4rem; }
.custom-check-wrapper.active i { color: var(--brand-color); }
.custom-check-wrapper.active span { font-weight: bold; }


/* =========================================
   CUSTOM SLIDER STYLES
   ========================================= */
#priceSliderWrapper { padding: 10px 5px; }

.custom-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background-color: #e9ecef;
    outline: none !important;
    cursor: pointer;
    background-image: linear-gradient(var(--brand-color), var(--brand-color));
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

/* Thumb (Webkit) */
.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--brand-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.1s, box-shadow 0.2s;
    margin-top: -9px; 
}

.custom-range::-webkit-slider-thumb:active {
  background: white !important;
}

.custom-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 2px solid var(--brand-color);
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.custom-range::-moz-range-thumb:active {
  background: white !important;
}

.custom-range::-webkit-slider-thumb:hover { transform: scale(1.1); }
.custom-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(224, 62, 27, 0.2); 
}

/* Track transparency fix */
.custom-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: transparent;
    border-radius: 5px;
}