#mapWrap, #plannerMap {
  position: absolute;
  inset: 0;
}
.leaflet-container {
  background: #0b1a12;
  font-family: inherit;
  height: 100%;
}
.leaflet-popup-content-wrapper { background: var(--panel2); color: var(--text); border-radius: 10px; }
.leaflet-popup-tip { background: var(--panel2); }
.leaflet-popup-content { font-size: 0.85em; }
.leaflet-popup-content b { color: var(--accent); }
.leaflet-interactive:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.map-tooltip {
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8em;
  padding: 5px 9px;
  box-shadow: var(--shadow-sm);
}
.map-tooltip::before { border-top-color: var(--border) !important; }

.map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 410;
  background: rgba(23, 26, 33, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.78em;
  color: var(--muted);
  max-width: calc(100% - 24px);
}
.map-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

@media (max-width: 860px) {
  .map-legend { font-size: 0.72em; gap: 10px; padding: 8px 10px; }
}

/* airspace fades out while the map zooms (see planner-view.js) */
.leaflet-airspace-pane { transition: opacity 0.14s ease-out; }
.leaflet-airspace-pane.zooming { opacity: 0; transition-duration: 0.1s; }
