/**
 * OF Map 4K-Snap POLISH (additive only — no redesign / no new map architecture)
 * 
 * Targets existing selectors: .of-pin-popup, .maplibregl-*, .of-logo-4k, .mapbox, .pin, .of-fusion-stamp
 * Free tiles only (OpenFreeMap). OF Company Logo sole public mark.
 */
/* 4K imagery crispness */
img.of-logo-4k,
.brand img.of-logo-4k,
.chrome-logo,
.of-logo img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  object-fit: contain;
  -ms-interpolation-mode: nearest-neighbor;
}

/* Hover windows — tighter, higher contrast, stable z */
.of-pin-popup {
  z-index: 50 !important;
}
.of-pin-popup .maplibregl-popup-content {
  padding: 6px 9px !important;
  border-radius: 5px !important;
  background: rgba(8, 12, 18, 0.97) !important;
  color: #f0f4f8 !important;
  border: 1px solid rgba(245, 196, 0, 0.42) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55) !important;
  font: 600 11px/1.25 "IBM Plex Sans", system-ui, sans-serif !important;
  max-width: 220px !important;
  letter-spacing: 0.01em;
}
.of-pin-popup .maplibregl-popup-content strong {
  font-size: 12px;
  font-weight: 700;
  color: #f5c400;
  display: block;
  margin-bottom: 2px;
}
.of-pin-popup .maplibregl-popup-tip {
  border-top-color: rgba(8, 12, 18, 0.97) !important;
}
.of-pin-popup .maplibregl-popup-close-button {
  color: #c5d0dc !important;
  font-size: 14px !important;
  padding: 0 5px !important;
  line-height: 1.2 !important;
  opacity: 0.85;
}
.of-pin-popup .maplibregl-popup-close-button:hover {
  color: #f5c400 !important;
  opacity: 1;
  background: transparent !important;
}

/* MapLibre chrome — sharper controls, no soft blur stack */
.maplibregl-ctrl-group {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  border-radius: 5px !important;
  overflow: hidden;
  border: 1px solid rgba(245, 196, 0, 0.22) !important;
}
.maplibregl-ctrl-group button {
  background-color: rgba(10, 16, 24, 0.94) !important;
  width: 30px !important;
  height: 30px !important;
}
.maplibregl-ctrl-group button:hover {
  background-color: rgba(245, 196, 0, 0.14) !important;
}
.maplibregl-ctrl-scale {
  background: rgba(8, 12, 18, 0.88) !important;
  color: #c5d0dc !important;
  border-color: rgba(245, 196, 0, 0.35) !important;
  font-size: 10px !important;
  padding: 1px 5px !important;
}
.maplibregl-canvas {
  image-rendering: -webkit-optimize-contrast;
}

/* Stacked overlays — clear z ladder + readable opacity */
.of-fusion-stamp { z-index: 40; }
.of-pin { z-index: 45; }
.maplibregl-marker { z-index: 45; }
.maplibregl-popup { z-index: 50; }
.maplibregl-ctrl-top-right,
.maplibregl-ctrl-top-left { z-index: 35; }
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right { z-index: 30; }

/* Crisis Watch SVG / pin map polish (existing classes) */
.mapbox { isolation: isolate; }
.mapbox .map-legend {
  position: relative;
  z-index: 5;
  background: rgba(4, 8, 16, 0.82);
  border-top: 1px solid rgba(245, 196, 0, 0.22);
  backdrop-filter: blur(2px);
}
.pin {
  z-index: 6;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.pin:hover,
.pin:focus-visible {
  border-color: #fff !important;
  background: rgba(245, 196, 0, 0.2) !important;
  box-shadow: 0 0 0 2px rgba(245, 196, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.5) !important;
  outline: none;
}
.pin .sub { opacity: 0.9; }

/* Cell / fill overlays stay under markers */
.of-map-cell-under,
.maplibregl-canvas-container { z-index: 1; }
