/**
 * Zendir UI — Leaflet theme (hybrid / purple-hue)
 * Use with GroundTrackMap when mapProvider="leaflet".
 * Keeps map controls on-brand and minimizes third-party branding on the frontend.
 */

/* Container: match SDK background and radius. Inherit the active theme
 * font (set by <ThemeProvider />) instead of hard-coding Roboto, so
 * Leaflet text stays consistent with the rest of the app. */
.zendir-ground-track-map .leaflet-container {
  background: #0f1520;
  font-family: var(
    --font-family-primary,
    "Public Sans",
    "Roboto",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif
  );
  cursor: grab;
}

/* Zoom controls: visible and above overlays so scroll/zoom work */
.zendir-ground-track-map .leaflet-control-zoom {
  z-index: 1000 !important;
  border: 1px solid rgba(157, 112, 255, 0.35) !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.zendir-ground-track-map .leaflet-control-zoom a,
.zendir-ground-track-map .leaflet-control-zoom a:hover {
  background: #181d2e !important;
  color: #e4e0f0 !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 20px !important;
  font-weight: bold !important;
  border: none !important;
  cursor: pointer !important;
}

.zendir-ground-track-map .leaflet-control-zoom a:hover {
  background: rgba(157, 112, 255, 0.15) !important;
  color: #b794ff !important;
}

.zendir-ground-track-map .leaflet-control-zoom-in {
  border-bottom: 1px solid rgba(157, 112, 255, 0.15) !important;
}

/* Attribution: minimal, no Leaflet branding on frontend */
.zendir-ground-track-map .leaflet-control-attribution {
  background: rgba(15, 21, 32, 0.85) !important;
  color: rgba(148, 163, 184, 0.7) !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
  border-radius: 4px 0 0 0;
  border: none;
  margin: 0 !important;
}

/* Hide "Leaflet" link in attribution so only tile provider is shown */
.zendir-ground-track-map .leaflet-control-attribution a[href*="leaflet"] {
  display: none !important;
}

.zendir-ground-track-map .leaflet-control-attribution a {
  color: rgba(157, 112, 255, 0.8) !important;
}

.zendir-ground-track-map .leaflet-control-attribution a:hover {
  color: #b794ff !important;
}

/* Popup / tooltip styling */
.zendir-ground-track-map .leaflet-popup-content-wrapper {
  background: #181d2e;
  border: 1px solid rgba(157, 112, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.zendir-ground-track-map .leaflet-popup-tip {
  background: #181d2e;
}

.zendir-ground-track-map .leaflet-popup-content {
  margin: 8px 12px;
  color: #e4e0f0;
  font-size: 12px;
}

/* Ensure map is interactive (scroll zoom, drag) */
.zendir-ground-track-map-leaflet .leaflet-container {
  touch-action: none;
}
.zendir-ground-track-map .leaflet-pane,
.zendir-ground-track-map .leaflet-tile-pane {
  pointer-events: auto;
}

/* Dragging cursor */
.zendir-ground-track-map .leaflet-grab {
  cursor: grab;
}

.zendir-ground-track-map .leaflet-dragging .leaflet-grab {
  cursor: grabbing;
}

/* ── Custom SVG div icons ──────────────────────────────────────────────────── */
.zendir-sat-icon,
.zendir-station-icon {
  background: none !important;
  border: none !important;
  /* Let the inline SVG size itself naturally */
  overflow: visible;
  pointer-events: auto;
  cursor: pointer;
}

.zendir-sat-icon:hover svg,
.zendir-station-icon:hover svg {
  filter: drop-shadow(0 0 6px currentColor);
}

/* Leaflet default icon reset (avoid blue pin override) */
.zendir-sat-icon img,
.zendir-station-icon img {
  display: none !important;
}

/* Tooltip (rich HTML) */
.zendir-leaflet-tooltip {
  background: rgba(13, 19, 35, 0.95) !important;
  border: 1px solid rgba(157, 112, 255, 0.35) !important;
  border-radius: 6px !important;
  color: #e4e0f0 !important;
  font-size: 11px !important;
  font-family: var(
    --font-family-primary,
    "Public Sans",
    "Roboto",
    "Inter",
    system-ui,
    sans-serif
  ) !important;
  padding: 5px 9px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
  white-space: nowrap;
  pointer-events: none;
}

.zendir-leaflet-tooltip::before {
  border-top-color: rgba(157, 112, 255, 0.35) !important;
}

/* ── Pin icons ──────────────────────────────────────────────────────────────── */
.zendir-pin-icon {
  background: none !important;
  border: none !important;
  overflow: visible;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.zendir-pin-icon:hover {
  transform: scale(1.15) translateY(-2px);
  z-index: 1000 !important;
}

.zendir-pin-icon img {
  display: none !important;
}

/* Pin tooltip */
.zendir-pin-tooltip {
  background: rgba(13, 19, 35, 0.95) !important;
  border: 1px solid rgba(157, 112, 255, 0.35) !important;
  border-radius: 6px !important;
  color: #e4e0f0 !important;
  font-size: 11px !important;
  font-family: var(
    --font-family-primary,
    "Public Sans",
    "Roboto",
    "Inter",
    system-ui,
    sans-serif
  ) !important;
  padding: 5px 9px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
  pointer-events: none;
}

.zendir-pin-tooltip::before {
  border-top-color: rgba(157, 112, 255, 0.35) !important;
}

/* Crosshair cursor when pins are editable (click-to-add mode) */
.zendir-pins-editable .leaflet-container {
  cursor: crosshair;
}

.zendir-pins-editable .leaflet-marker-icon {
  cursor: grab;
}

.zendir-pins-editable .leaflet-dragging .leaflet-marker-icon {
  cursor: grabbing;
}
/*$vite$:1*/