/* VantageOOH map chrome, shared by every map outside the React app (Event
   Targeting planner, sample study). Mirrors the Live Map (app/globals.css,
   components/UnifiedMapGL.tsx): dark-glass controls, legend and tooltips on the
   one brand basemap served by /api/map-style. Load after maplibre-gl.css. */

.vm-map { position: relative; overflow: hidden; background: #ECEEF2; }
.vm-map.vm-night { background: #0a0d21; }
.vm-map .maplibregl-canvas { outline: none; }

/* controls: dark glass, brand blue on hover (same as the Live Map) */
.vm-map .maplibregl-ctrl-group {
  background: rgba(16, 20, 43, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  border-radius: 8px !important;
}
.vm-map .maplibregl-ctrl-group button { background: transparent !important; width: 30px; height: 30px; }
.vm-map .maplibregl-ctrl-group button + button { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.vm-map .maplibregl-ctrl-group button:hover { background: #2048ff !important; }
.vm-map .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(0.85) hue-rotate(180deg); }
.vm-map .maplibregl-ctrl-top-left { top: 4px; left: 4px; }
.vm-map .maplibregl-ctrl-attrib {
  background: rgba(10, 10, 26, 0.55) !important;
  color: rgba(199, 208, 234, 0.6) !important;
  font-size: 9px !important;
  border-radius: 6px 0 0 0;
}
.vm-map .maplibregl-ctrl-attrib a { color: rgba(125, 155, 255, 0.8) !important; }
/* day basemap: white glass, grey text (blue on dark glass was unreadable there) */
.vm-map:not(.vm-night) .maplibregl-ctrl-attrib {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #5B6478 !important;
  font-size: 10px !important;
}
.vm-map:not(.vm-night) .maplibregl-ctrl-attrib a { color: #5B6478 !important; }
.vm-map:not(.vm-night) .maplibregl-ctrl-attrib-button { filter: none; }

/* glass pill (toggles, legend, small labels on the map) */
.vm-glass {
  background: rgba(16, 20, 43, 0.87);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(10, 10, 26, 0.25);
}
.vm-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  padding: 7px 12px; font-size: 11px; font-family: 'Space Grotesk', system-ui, sans-serif;
}
.vm-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.vm-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
.vm-legend i.vm-line { width: 14px; height: 2px; border-radius: 1px; box-shadow: none; }

/* tooltips: dark glass, no default chrome */
.vm-tip .maplibregl-popup-content { background: transparent; padding: 0; box-shadow: none; border: none; }
.vm-tip .maplibregl-popup-tip { border-top-color: rgba(13, 17, 38, 0.92) !important; border-bottom-color: rgba(13, 17, 38, 0.92) !important; }
.vm-tip .maplibregl-popup-close-button { color: #98a4c9; font-size: 16px; right: 4px; top: 2px; }
.map-tip {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px; line-height: 1.5;
  background: rgba(13, 17, 38, 0.92); color: #eef1fb;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid rgba(125, 155, 255, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  min-width: 160px; max-width: 280px;
}
.map-tip .tip-title { font-weight: 600; margin-bottom: 3px; color: #fff; }
.map-tip .tip-muted { color: #98a4c9; font-size: 11px; }
.map-tip .tip-strong { font-weight: 700; font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .vm-map * { transition: none !important; }
}

/* ---------- ONE modal shell for the whole platform ----------
   Same as the React Activate modal (components/Dashboard.tsx): ink scrim at
   45%, no blur, no header divider, 24px padding, sheet starts 72px down so it
   never touches a header, one 28px circular X.
     <div class="vm-scrim"><div class="vm-modal" role="dialog">
       <button class="vm-modal-x" aria-label="Close">✕</button>
       <h2 class="vm-modal-title">Title</h2> ... </div></div>            */
.vm-scrim {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 72px 16px 24px;
  background: rgba(10, 10, 26, 0.45);
  overflow-y: auto;
}
.vm-modal {
  position: relative;
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 96px); overflow-y: auto;
  padding: 24px;
  background: #fff; color: #0A0A1A;
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(10, 10, 26, 0.35);
  font-family: 'Space Grotesk', system-ui, sans-serif;
}
.vm-modal-title { margin: 0 40px 16px 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: #374151; }
.vm-modal-x {
  position: absolute; top: 20px; right: 20px;
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(10, 10, 26, 0.1); background: #fff;
  color: #6B7280; font-size: 12px; line-height: 1; cursor: pointer;
}
.vm-modal-x:hover { color: #E4574B; border-color: #E4574B; }
