/* Custom Scrollbar for Sidebar & Modal */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.8);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.8);
}

/* Custom Leaflet Map Dark Controls */
.leaflet-container {
  background: #020617 !important;
  font-family: inherit;
}

.leaflet-control-zoom a {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
.leaflet-control-zoom a:hover {
  background-color: #334155 !important;
  color: #f59e0b !important;
}

/* Custom Popup Styling */
.leaflet-popup-content-wrapper {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid #334155;
  border-radius: 12px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.leaflet-popup-tip {
  background: #0f172a !important;
}

/* Accent bg helpers */
.bg-slate-850 {
  background-color: #151e2e;
}
.bg-slate-750 {
  background-color: #263346;
}

html, body {
  height: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure mobile z-index hierarchy beats Leaflet controls (z-index 400..800) */
header {
  z-index: 9999 !important;
}

#sidebar {
  z-index: 9999 !important;
}

#sidebar-backdrop {
  z-index: 9998 !important;
}

#btn-floating-filters {
  z-index: 1000 !important;
}

/* Ensure Map Legend box is ALWAYS on top of Leaflet layers & panes */
#map-legend-box {
  z-index: 1000 !important;
  pointer-events: auto !important;
}

/* Touch interaction & full-bleed positioning for Leaflet mobile map */
#map {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 250px !important;
  touch-action: pan-x pan-y !important;
  -webkit-tap-highlight-color: transparent;
}

/* Position Leaflet attribution cleanly below or unobtrusively */
.leaflet-bottom.leaflet-right {
  z-index: 400 !important;
  margin-bottom: 2px !important;
  margin-right: 2px !important;
}
.leaflet-control-attribution {
  background: rgba(15, 23, 42, 0.75) !important;
  color: #64748b !important;
  font-size: 8px !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  backdrop-filter: blur(4px);
}
.leaflet-control-attribution a {
  color: #94a3b8 !important;
}



