/* Map-specific overrides and focus styling fixes */

/* Remove default browser focus outline around Leaflet vector features */
.leaflet-container .leaflet-interactive:focus,
.leaflet-container svg path:focus,
.leaflet-container svg polygon:focus,
.leaflet-container .leaflet-pm-marker:focus,
.leaflet-container .leaflet-pm-icon:focus {
  outline: none !important;
}

/* Keep other elements' accessibility focus styles intact */

/* Ensure Leaflet tooltips are always above vector layers */
.leaflet-tooltip-pane {
  z-index: 10000 !important;
}

/* In case vector SVG has higher z-index in theme, raise tooltips further */
.leaflet-tooltip {
  /* Allow mouse to reach shapes while keeping tooltip visually on top */
  pointer-events: auto; /* restore default so Leaflet can position relative to cursor */
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}

/* Some themes add transforms to the map container which can create new stacking contexts.
   Force the tooltip element to be positioned in its own highest context. */
/* Keep Leaflet's own transform for positioning; removing it can break following the cursor */
/* .leaflet-pane.leaflet-tooltip-pane, .leaflet-tooltip.leaflet-zoom-animated { transform: none !important; } */

/* Also raise the SVG overlay pane to ensure tooltip sits above; keep tooltip even higher */
.leaflet-overlay-pane {
  z-index: 600 !important; /* vectors */
}
.leaflet-marker-pane {
  z-index: 650 !important; /* points */
}
.leaflet-popup-pane {
  z-index: 10001 !important; /* popups */
}
