/* hymaps-cyber.css — cyberpunk DOM polish for the hyMaps vector basemap
 * ──────────────────────────────────────────────────────────────────────────
 * Owned by maps-visual. The map body itself (roads, glow, buildings, gold home
 * tower, traffic) is painted on the WebGL canvas by hymaps-engine.js. This file
 * only styles the DOM CHROME around the canvas (MapLibre controls, attribution,
 * a subtle dark-mode ambiance) so the dark "Dark" map type reads as a wired
 * neon cyberpunk map. Everything is:
 *   - scoped to the active map type via <html data-hymaptype="dark"> (set by the
 *     engine), so clean / satellite / hybrid are untouched;
 *   - additive + guarded (no-ops if an element is absent);
 *   - theme-token driven, EXCEPT the intentional neon (--accent/--info) + gold
 *     accents the user explicitly asked for.
 * Load AFTER hymaps-glass.css so these dark-only overrides win.
 */

/* Neon accent fallbacks (resolve to Hypatia tokens when present). */
:root {
  --hm-cyber-neon:   var(--accent, #00ffa3);
  --hm-cyber-neon2:  var(--info, #3ac9ff);
  --hm-cyber-gold:   #ffcf4d;
  --hm-cyber-ink:    #05070f;
}

/* ── Dark map ambiance ──────────────────────────────────────────────────── */
/* A faint inner vignette over the map container deepens the neon roads/glow
 * without obscuring them. Pointer-events off so it never blocks interaction. */
html[data-hymaptype="dark"] #hm-map { background: var(--hm-cyber-ink); }
html[data-hymaptype="dark"] #hm-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.55);
}

/* ── MapLibre controls (dark only) ──────────────────────────────────────── */
html[data-hymaptype="dark"] .maplibregl-ctrl-group {
  background: rgba(6, 12, 20, 0.86);
  border: 1px solid color-mix(in srgb, var(--hm-cyber-neon) 40%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--hm-cyber-neon) 22%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
}
html[data-hymaptype="dark"] .maplibregl-ctrl-group button { background: transparent; }
html[data-hymaptype="dark"] .maplibregl-ctrl-group button + button {
  border-top: 1px solid color-mix(in srgb, var(--hm-cyber-neon) 22%, transparent);
}
html[data-hymaptype="dark"] .maplibregl-ctrl-group button:hover {
  background: color-mix(in srgb, var(--hm-cyber-neon) 14%, transparent);
}
/* MapLibre control icons are SVG masks; tint them neon in dark. */
html[data-hymaptype="dark"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: invert(74%) sepia(64%) saturate(560%) hue-rotate(105deg) brightness(104%);
}

/* ── Attribution pill (dark only) ───────────────────────────────────────── */
html[data-hymaptype="dark"] .maplibregl-ctrl-attrib {
  background: rgba(6, 12, 20, 0.7);
  color: var(--muted, rgba(200, 255, 240, 0.58));
}
html[data-hymaptype="dark"] .maplibregl-ctrl-attrib a { color: var(--hm-cyber-neon2); }

/* ── Satellite real-height-only 3D toast (reusable hook) ────────────────── */
/* hymaps-3d.js fires this message through H.toast() (generic). If the toast
 * host adds .hm-cyber-toast, this gives it a neon edge in dark map mode. */
html[data-hymaptype="dark"] .hm-cyber-toast {
  border: 1px solid color-mix(in srgb, var(--hm-cyber-neon) 55%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--hm-cyber-neon) 28%, transparent);
}

/* ── Reduced motion / low-power: drop the ambiance overlay ──────────────── */
@media (prefers-reduced-motion: reduce) {
  html[data-hymaptype="dark"] #hm-map::after { box-shadow: none; }
}
