/* sauna-map.css — styles for the new MapLibre-backed map section.
   Scoped under #sauna-map-root so it never bleeds into the rest of the page. */

#sauna-map-root {
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --emerald: #10b981;
  --ink: #fafafa;
  --ink-mute: rgba(250, 250, 250, 0.6);
  --ink-dim: rgba(250, 250, 250, 0.32);
  --bg: #080808;
  --line: rgba(255, 255, 255, 0.07);
}

#sauna-map-root {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 32px auto 16px;
  padding: 0 20px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

#sauna-map-root .header {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 14px; gap: 16px;
}
#sauna-map-root .header h2 {
  margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
  color: rgba(255,255,255,0.92);
}
#sauna-map-root .header p {
  margin: 4px 0 0; font-size: 12.5px; color: var(--ink-mute);
}
#sauna-map-root .rx-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--amber-soft); border: 1px solid rgba(245, 158, 11, 0.22);
  color: #fde68a; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  cursor: pointer; transition: all 160ms ease;
}
#sauna-map-root .rx-pill:hover { background: rgba(245, 158, 11, 0.18); }
#sauna-map-root .rx-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

#sauna-map-root .grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 14px;
  align-items: stretch;
}
@media (max-width: 860px) {
  #sauna-map-root .grid { grid-template-columns: 1fr; }
}

#sauna-map-root .rx-panel {
  background: linear-gradient(180deg, rgba(20,20,20,0.85), rgba(8,8,8,0.95));
  border: 1px solid var(--line);
  border-radius: 16px; padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 520px;
}
#sauna-map-root .rx-state {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber);
}
#sauna-map-root .rx-state .badge {
  padding: 2px 8px; border-radius: 999px; font-size: 10px;
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7); letter-spacing: 0.08em;
}
#sauna-map-root .rx-title { font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.92); }
#sauna-map-root .rx-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
#sauna-map-root .rx-cell {
  background: rgba(255,255,255,0.025); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
#sauna-map-root .rx-cell .k { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
#sauna-map-root .rx-cell .v { font-size: 16px; font-weight: 700; color: rgba(255,255,255,0.94); margin-top: 2px; }
#sauna-map-root .rx-cell .v small { font-size: 11px; font-weight: 500; color: var(--ink-mute); margin-left: 4px; }
#sauna-map-root .rx-rationale {
  font-size: 12px; line-height: 1.55; color: var(--ink-mute);
  border-left: 2px solid var(--amber); padding-left: 10px; margin-top: 2px;
}
#sauna-map-root .rx-rationale ul { margin: 0; padding-left: 14px; }
#sauna-map-root .rx-rationale li + li { margin-top: 4px; }
#sauna-map-root .rx-modality { display: flex; flex-wrap: wrap; gap: 6px; }
#sauna-map-root .rx-modality span {
  font-size: 10.5px; padding: 4px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.78);
  border: 1px solid var(--line);
}
#sauna-map-root .rx-modality span.primary {
  background: rgba(245,158,11,0.12); color: #fde68a; border-color: rgba(245,158,11,0.3);
}
#sauna-map-root .rx-cta {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
}
#sauna-map-root .rx-cta button {
  width: 100%; padding: 10px 14px; border-radius: 10px;
  background: rgba(245,158,11,0.16); color: #fde68a; border: 1px solid rgba(245,158,11,0.3);
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 160ms ease;
}
#sauna-map-root .rx-cta button:hover { background: rgba(245,158,11,0.25); }
#sauna-map-root .rx-cta .secondary { background: transparent; color: var(--ink-mute); border-color: var(--line); }
#sauna-map-root .rx-cta .secondary:hover { color: var(--ink); border-color: rgba(255,255,255,0.18); }

#sauna-map-root .map-wrap {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
  min-height: 520px;
}
#sauna-map-root .map-mount { position: absolute; inset: 0; }

#sauna-map-root .legend {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  background: rgba(8,8,8,0.78); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 11px; color: var(--ink-mute);
  display: flex; align-items: center; gap: 12px;
}
#sauna-map-root .legend .swatch {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; margin-right: 6px; vertical-align: -1px;
}

#sauna-map-root .count-badge {
  position: absolute; right: 14px; top: 14px; z-index: 2;
  background: rgba(245,158,11,0.14); border: 1px solid rgba(245,158,11,0.28);
  padding: 6px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #fde68a;
}

/* MapLibre popup */
.maplibregl-popup.proto-popup .maplibregl-popup-content {
  background: rgba(10,10,10,0.96);
  color: var(--ink, #fafafa);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 14px 16px 16px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  max-width: 320px;
}
.maplibregl-popup.proto-popup .maplibregl-popup-tip { display: none; }
.maplibregl-popup.proto-popup .maplibregl-popup-close-button { color: rgba(255,255,255,0.5); font-size: 18px; }

.proto-popup .popup-fit {
  position: absolute; top: 12px; right: 28px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 18%, transparent);
  color: var(--c); font-size: 13px; font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
.proto-popup .popup-name { font-size: 15px; font-weight: 700; color: #fafafa; }
.proto-popup .popup-city { font-size: 11.5px; color: rgba(255,255,255,0.5); margin-top: 2px; margin-bottom: 10px; letter-spacing: 0.03em; }
.proto-popup .popup-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; border-top: 1px solid rgba(255,255,255,0.06); font-size: 12px; }
.proto-popup .popup-row span { color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.proto-popup .popup-row b { color: rgba(255,255,255,0.9); font-weight: 600; }
.proto-popup .popup-amen { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 8px; }
.proto-popup .popup-amen span { font-size: 10px; padding: 3px 7px; border-radius: 5px; background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7); }
.proto-popup .popup-note { font-size: 11.5px; line-height: 1.45; color: rgba(255,255,255,0.55); border-top: 1px solid rgba(255,255,255,0.06); padding-top: 8px; font-style: italic; }

/* MapLibre controls dark theme */
.maplibregl-ctrl button { background-color: rgba(15,15,15,0.85) !important; color: #fde68a !important; }
.maplibregl-ctrl button svg { filter: invert(0.8); }
.maplibregl-ctrl-attrib { background: rgba(0,0,0,0.4) !important; color: rgba(255,255,255,0.4) !important; font-size: 9px !important; }
.maplibregl-ctrl-attrib a { color: rgba(255,255,255,0.55) !important; }
