/* amrum-wetter.de – Regen-/Windradar (nur auf den Radar-Seiten geladen) */

.radar-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.rt-tab { display: inline-flex; align-items: center; gap: 8px; padding: .65em 1.25em; border-radius: 99px; border: 1px solid var(--line); color: var(--ocean); font-weight: 700; font-size: .92rem; background: #fff; transition: background .2s, color .2s, border-color .2s; }
.rt-tab:hover { border-color: var(--ocean); }
.rt-tab.is-active { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.rt-tab.is-soon { opacity: .55; cursor: default; }
.rt-tab small { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: var(--sand-l); color: var(--ocean); padding: 2px 7px; border-radius: 99px; }

.radar-stage { position: relative; border-radius: 24px; overflow: hidden; background: var(--ocean); box-shadow: var(--shadow); isolation: isolate; }
.radar-map { position: relative; width: 100%; aspect-ratio: 1 / 1; background: var(--ocean); }
@media (min-width: 700px) { .radar-map { aspect-ratio: 16 / 10; } }
@media (min-width: 1000px) { .radar-map { aspect-ratio: 16 / 9; max-height: 78vh; } }

/* Platzhalter (statisches Bild) – gleiche Fläche wie die Karte, kein Layout-Shift */
.radar-still { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; width: 100%; height: auto; }
.radar-still img { display: block; width: 100%; height: 100%; }
@media (min-width: 700px) { .radar-still { width: auto; height: 100%; } }

/* Ortsnamen (statisch und als Kartenmarker) */
.rm-marker { display: flex; align-items: center; gap: 5px; font: 700 .76rem/1 var(--sans); color: var(--ink); text-shadow: 0 0 3px #fff, 0 0 6px #fff, 0 0 2px #fff; white-space: nowrap; pointer-events: none; }
a.rm-marker { pointer-events: auto; }
a.rm-marker:hover .rm-name { text-decoration: underline; }
.rm-marker .fa { color: var(--teal); font-size: .8rem; }
.rm-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ocean); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); flex: none; }
.rm-wittduen .rm-dot { background: #d0342c; }
.rm-marker.is-area { font: italic 600 .8rem/1 var(--serif); color: #8a6420; letter-spacing: .04em; }

.radar-views { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; padding: 4px; gap: 4px; border-radius: 99px; background: rgba(7, 29, 45, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.rv-btn { border: 0; background: transparent; color: #fff; font: 700 .82rem/1 var(--sans); padding: .6em 1em; border-radius: 99px; cursor: pointer; min-height: 36px; }
.rv-btn.is-active { background: var(--sand); color: var(--ocean); }
.rv-btn:focus-visible, .radar-play:focus-visible { outline: 3px solid var(--sand-l); outline-offset: 2px; }

.radar-time { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; background: rgba(7, 29, 45, .82); color: #fff; font: 700 .84rem/1 var(--sans); pointer-events: none; font-variant-numeric: tabular-nums; }
.radar-time .dot { width: 8px; height: 8px; border-radius: 50%; background: #4fd18b; }
.radar-time.is-forecast .dot { background: var(--sand); box-shadow: 0 0 0 2px rgba(212, 168, 83, .35); }

.radar.is-loading .radar-stage::after { content: 'Karte wird geladen …'; position: absolute; right: 12px; bottom: 12px; z-index: 4; padding: 7px 13px; border-radius: 99px; background: rgba(255, 255, 255, .9); color: var(--ocean); font: 700 .8rem/1 var(--sans); }

/* MapLibre-Steuerung passend zur Seite */
.radar .maplibregl-ctrl-group { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-s); }
.radar .maplibregl-ctrl-group button { width: 36px; height: 36px; }
.radar .maplibregl-ctrl-attrib { font-size: .7rem; }
.radar .maplibregl-cooperative-gesture-screen { font: 600 1rem var(--sans); }

/* Zeitleiste */
.radar-bar { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.radar-bar[hidden] { display: none; }
.radar-play { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ocean); color: #fff; font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow-s); display: grid; place-items: center; }
.radar-play .fa-play { margin-left: 3px; }
.radar-play.is-busy { opacity: .55; cursor: progress; }
.radar-track { flex: 1; min-width: 0; }
.radar-range { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.radar-range::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--teal) 0 var(--now, 50%), var(--sand-l) var(--now, 50%) 100%); }
.radar-range::-moz-range-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--teal) 0 var(--now, 50%), var(--sand-l) var(--now, 50%) 100%); }
.radar-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--ocean); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.radar-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--ocean); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.radar-range:focus-visible { outline: 3px solid var(--sand); outline-offset: 4px; border-radius: 8px; }
.radar-scale { position: relative; height: 18px; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.radar-scale span { position: absolute; top: 0; }
.radar-scale span:first-child { left: 0; }
.radar-scale span:last-child { right: 0; }
.radar-scale .now { left: var(--now, 50%); transform: translateX(-50%); font-weight: 700; color: var(--ocean); }

/* Nowcast-Zeile, Hinweise, Legende */
.radar-nowcast { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0 0; padding: 15px 18px; border-radius: var(--radius-s); background: var(--foam); color: var(--ocean); font-weight: 600; font-size: 1.04rem; line-height: 1.45; }
.radar-nowcast .fa { font-size: 1.25rem; color: var(--teal); margin-top: 1px; }
.radar-nowcast.is-soon, .radar-nowcast.is-rain { background: #fff3d6; }
.radar-nowcast.is-soon .fa, .radar-nowcast.is-rain .fa { color: #b07a12; }
.radar .note { margin-top: 14px; }
.radar .note[hidden] { display: none; }

.radar-legend { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 3px; margin-top: 18px; font-size: .74rem; color: var(--text); font-variant-numeric: tabular-nums; }
.rl-title { font-weight: 700; margin-right: 6px; color: var(--ocean); }
.rl-step { min-width: 34px; padding-top: 4px; border-top: 8px solid var(--c); }
.rl-step:first-of-type { border-top-left-radius: 4px; }
.rl-nodata { margin-left: 12px; padding: 2px 8px; border-radius: 4px; background: repeating-linear-gradient(45deg, rgba(120, 136, 150, .55) 0 2px, rgba(120, 136, 150, .2) 2px 8px); }
.radar-source { margin-top: 12px; }

/* ---------- Windradar ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.radar-wind .radar-scale .now { left: 50%; color: var(--muted); font-weight: 400; }
.radar-wind .radar-range::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--sand) 0%, var(--sand-l) 100%); }
.radar-wind .radar-range::-moz-range-track { background: linear-gradient(90deg, var(--sand) 0%, var(--sand-l) 100%); }

.wind-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 16px; }
.unit-switch { display: inline-flex; padding: 4px; gap: 4px; border-radius: 99px; background: var(--foam); }
.unit-switch button { border: 0; background: transparent; color: var(--ocean); font: 700 .82rem/1 var(--sans); padding: .65em 1.05em; border-radius: 99px; cursor: pointer; min-height: 36px; }
.unit-switch button.is-active { background: var(--ocean); color: #fff; }
.unit-switch button:focus-visible, .wt-tabs button:focus-visible { outline: 3px solid var(--sand); outline-offset: 2px; }
.wind-legend { flex: 1; min-width: 220px; max-width: 460px; }
.wl-bar { display: block; height: 10px; border-radius: 99px; opacity: .9; }
.wl-ticks { position: relative; display: block; height: 18px; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wl-ticks span { position: absolute; top: 3px; transform: translateX(-50%); white-space: nowrap; }
.wl-ticks span:first-child { transform: none; }
.wl-ticks .wl-unit { position: static; float: right; transform: none; font-weight: 700; color: var(--ocean); margin-top: 3px; display: none; }

.radar-nowcast.is-wind { background: var(--foam); }
.radar-nowcast .wind-arrow { width: 22px; height: 22px; flex: none; }
.kite-line { display: flex; gap: 12px; margin: 12px 0 0; padding: 14px 18px; border-radius: var(--radius-s); background: #f3f1ec; color: var(--text); line-height: 1.45; }
.kite-line .fa { font-size: 1.25rem; color: var(--muted); margin-top: 1px; }
.kite-line.is-ok { background: #e3f4ec; color: var(--ink); }
.kite-line.is-ok .fa { color: #1f8a5b; }
.kite-line small { display: block; margin-top: 4px; font-size: .8rem; color: var(--muted); }

.ws-marker { display: flex; align-items: center; gap: 4px; padding: 4px 8px 4px 5px; border-radius: 99px; background: rgba(255, 255, 255, .94); color: var(--ocean); font: 800 .78rem/1 var(--sans); box-shadow: 0 2px 8px rgba(0, 0, 0, .28); cursor: default; font-variant-numeric: tabular-nums; }
.ws-marker svg { width: 16px; height: 16px; fill: var(--teal); }
.ws-marker:focus-visible { outline: 3px solid var(--sand); }

/* Tabelle 48 h */
.wind-table-wrap { margin-top: 34px; }
.wt-title { font-family: var(--display); font-size: clamp(1.25rem, 2.4vw, 1.6rem); color: var(--ocean); margin: 0 0 14px; }
.wt-title em { font-family: var(--serif); font-weight: 400; color: var(--teal); }
.wt-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--foam); margin-bottom: 12px; }
.wt-tabs button { border: 0; background: transparent; color: var(--ocean); font: 700 .88rem/1 var(--sans); padding: .7em 1.2em; border-radius: 99px; cursor: pointer; min-height: 38px; }
.wt-tabs button.is-active { background: var(--ocean); color: #fff; }
.wt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; }
.wt-scroll:focus-visible { outline: 3px solid var(--sand); outline-offset: 2px; }
.wind-table { border-collapse: separate; border-spacing: 0; font-size: .82rem; font-variant-numeric: tabular-nums; min-width: 100%; }
.wind-table th, .wind-table td { padding: 7px 6px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); min-width: 38px; }
.wind-table tr > :first-child { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; font-weight: 700; color: var(--ocean); min-width: 92px; box-shadow: 1px 0 0 var(--line); padding-left: 12px; }
.wind-table .wt-days th { background: var(--cream); color: var(--ocean); font-weight: 700; text-align: left; border-left: 2px solid var(--line); }
.wind-table .wt-days th span { color: var(--muted); font-weight: 400; }
.wind-table .wt-hours th { color: var(--muted); font-weight: 600; }
.wind-table .wt-midnight { border-left: 2px solid var(--line); }
.wind-table .wt-dir td { line-height: 1; }
.wind-table .wt-dir .wind-arrow { display: block; margin: 0 auto 3px; width: 16px; height: 16px; }
.wind-table .wt-dir span { font-size: .68rem; color: var(--muted); }
.wind-table .wt-speed td { background: var(--wc); font-weight: 800; color: var(--ink); }
.wind-table .wt-gust td { color: var(--text); }
.wind-table .wt-bft td { color: var(--muted); }
.wind-table .wt-kite td .fa { color: #1f8a5b; }
.wind-table .wt-night { color: var(--line); }
.wind-table tr:last-child > * { border-bottom: 0; }
.wind-debug { position: absolute; right: 56px; top: 12px; z-index: 5; margin: 0; padding: 8px 10px; background: rgba(0, 0, 0, .78); color: #9ff; font: 11px/1.45 ui-monospace, Menlo, Consolas, monospace; border-radius: 8px; pointer-events: none; white-space: pre; }
.motion-toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ocean); font: 700 .82rem/1 var(--sans); padding: .65em 1.1em; border-radius: 99px; cursor: pointer; min-height: 36px; }
.motion-toggle[hidden] { display: none; }
.motion-toggle.is-active { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.motion-toggle:focus-visible { outline: 3px solid var(--sand); outline-offset: 2px; }
