/* your_app/static/css/map.css */

/* Map container */
#map-container {
    height: 70vh;
    width: 100%;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    background-color: var(--light-gray-bg);
    z-index: 1;
  }
  
  .core-search-bar {
    margin-bottom: 1.5rem;
  }
  
  @media (max-width: 767px) {
    #map-container {
      height: 50vh;
    }
    .core-search-bar {
      margin-bottom: 1rem;
    }
  }
  
  @media (min-width: 992px) {
    #sidebar-filters {
      --sidebar-width: 100%;
    }
    #sidebar-filters,
    .sidebar-filters {
      width: 100%;
    }
  }

  
  /* Ensure primary search button text and icon are white */
.core-search-bar .btn.btn-primary {
  --bs-btn-color: #fff; /* Bootstrap 5 var */
  color: #fff;          /* fallback */
}

.core-search-bar .btn.btn-primary span,
.core-search-bar .btn.btn-primary .bi {
  color: #fff !important; /* beat any over-specific global rules */
}

/* Mobile slide-in sidebar for the map page (matches FilterSidebar JS classes) */
@media (max-width: 767px) {
  /* Drawer */
  #map-sidebar-filters,
  #map-sidebar-filters.sidebar-filters {
    position: fixed;
    top: 100vh; /* start fully off-screen at the bottom */
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-height, 60px)); /* full height minus header */
    width: 100vw;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0; /* rounded top corners */
    border: none;
    border-top: 1px solid var(--border-interactive, #e5e7eb);
    overflow-y: auto;
    transform: translateY(0);
    transition: top var(--filter-transition-medium, 0.25s ease);
    background: var(--light-color, #fff);
    z-index: 4000; /* above map & controls */
    margin: 0;
    padding: 0;
    box-shadow:
      0 -4px 6px -1px rgba(0,0,0,0.1),
      0 -10px 15px -3px rgba(0,0,0,0.1);
  }

  /* When FilterSidebar adds .is-open, slide up under the header */
  #map-sidebar-filters.is-open {
    top: var(--header-height, 60px);
  }

  /* Backdrop that FilterSidebar toggles with .is-visible */
  #sidebar-backdrop,
  #drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 3990;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--filter-transition-medium, 0.25s ease);
  }
  #sidebar-backdrop.is-visible,
  #drawer-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Let dropdown escape expanded pod */
.pod-content.is-expanded { overflow: visible; }

/* Avoid paint containment clipping in the map drawer */
#map-sidebar-filters { contain: layout style; }

/* Ensure Select2 dropdown sits on top */
[id$="sidebar-filters"] .select2-container--open .select2-dropdown {
  z-index: 5000;
}