/* ==========================================================================
   Radio B6 – Theme-Basis (wird NUR geladen, wenn ein anderes Theme als „Normal“ aktiv ist)

   Aufgabe: Die wenigen im Haupt-CSS fest eingetragenen Farben (Kopfzeile, Player, Glow, Live-Karte …)
   hängen hier an Variablen. Die Vorgaben unten entsprechen genau dem normalen Design – ein Theme
   überschreibt nur das, was es ändern will. Layout, Abstände, Schriften bleiben unberührt.

   Ein Theme (assets/themes/<name>/theme.css) darf setzen:
     Marken-Farben    --blue --blue-700 --blue-800 --blue-100 --blue-50      Hauptfarbe (Links, Buttons)
                      --yellow --yellow-600 --yellow-700 --yellow-100          Akzentfarbe
                      --navy-900 --navy-950                                    dunkle Flächen (Kopf, Hero, Player, Footer)
     Flächen & Text   --paper --paper-2 (Hintergrund) · --white (Kartenhintergrund)
                      --ink --ink-2 --muted (Text) · --line --line-2 (Rahmen)
                      --shadow-sm --shadow --shadow-lg (Schatten)
     Brücke (unten)   --t-* (Hover, Glow, Kopfzeile, Player, Live-Karte)
   Animationen immer nur innerhalb von  @media (prefers-reduced-motion: no-preference) { … }
   ========================================================================== */

:root {
  /* Akzent (Gelb) in Glow und Hover */
  --t-accent-rgb: 255, 200, 0;
  --t-accent-hover: #FFD633;
  --t-accent-soft: #FFE27A;
  /* Leuchtblau (Ränder, Glow) und Hauptblau als RGB */
  --t-glow-rgb: 47, 123, 255;
  --t-blue-rgb: 21, 87, 224;
  /* dunkle Halbtransparenzen (Chips, Hero-Verlauf, Fußzeile der Live-Karte) */
  --t-ink-rgb: 6, 15, 44;
  --t-hero-rgb: 6, 15, 44;
  /* Kopfzeile / Player */
  --t-topbar: #040A1F;
  --t-header: rgba(6, 15, 44, .92);
  --t-header-line: rgba(47, 123, 255, .25);
  --t-header-line-on: rgba(47, 123, 255, .4);
  --t-player: rgba(6, 15, 44, .96);
  /* Live-Karte im Hero, Wetterkarte */
  --t-card-a: rgba(13, 35, 90, .88);
  --t-card-b: rgba(4, 10, 31, .94);
  --t-card-hover: rgba(13, 35, 90, .7);
  --t-wx-b: #12307A;
  /* Zweit- und Dritt-Dekofarbe für Illustrationen */
  --t-deco-1: #fff;
  --t-deco-2: #fff;
}

/* ---------- Brücke: feste Farben des Haupt-CSS → Variablen (Standardwerte = bisheriges Aussehen) ---------- */
.topbar { background: var(--t-topbar); }
.site-header { background: var(--t-header); border-bottom-color: var(--t-header-line); }
.site-header.is-scrolled { border-color: var(--t-header-line-on); }
.player { background: var(--t-player); }
.main-nav a[aria-current="page"]::after { box-shadow: 0 0 10px rgba(var(--t-accent-rgb), .7); }
.btn--live { box-shadow: 0 0 22px -4px rgba(var(--t-accent-rgb), .6); }
.btn--accent:hover, .btn--live:hover { --btn-bg: var(--t-accent-hover); }
.is-playing .btn--live { --btn-bg: var(--blue); --btn-fg: #fff; }          /* wie im Haupt-CSS: Während der Wiedergabe bleibt der Knopf blau */
.player__play { box-shadow: 0 6px 16px -4px rgba(var(--t-accent-rgb), .55); }
.player__play:hover { background: var(--t-accent-hover); }
.topbar__traffic:hover, .topbar__traffic[aria-current="page"] { background: var(--t-accent-hover); }
.topbar__traffic:hover .topbar__count, .topbar__traffic[aria-current="page"] .topbar__count { color: var(--t-accent-hover); }
.progress__bar { background: linear-gradient(90deg, var(--yellow), var(--t-accent-soft)); }
.hero__claim em { text-shadow: 0 0 28px rgba(var(--t-accent-rgb), .45), 0 2px 30px rgba(4, 10, 31, .5); }
.hero__kicker { background: rgba(var(--t-ink-rgb), .55); }
.hero__media::after {
  background:
    linear-gradient(180deg, rgba(var(--t-hero-rgb), .78) 0%, rgba(var(--t-hero-rgb), .35) 40%, rgba(var(--t-hero-rgb), .45) 65%, rgba(var(--t-hero-rgb), .92) 100%),
    radial-gradient(900px 420px at 88% 8%, rgba(var(--t-accent-rgb), .20), transparent 60%),
    radial-gradient(700px 380px at 6% 90%, rgba(var(--t-blue-rgb), .35), transparent 65%);
}
.live-card { background: linear-gradient(160deg, var(--t-card-a), var(--t-card-b)); border-color: rgba(var(--t-glow-rgb), .45);
  box-shadow: 0 0 0 1px rgba(var(--t-accent-rgb), .12), 0 0 40px -8px rgba(var(--t-glow-rgb), .55), 0 30px 60px -24px rgba(3, 8, 24, .75); }
.live-card__avatar { box-shadow: 0 0 0 3px var(--yellow), 0 0 22px rgba(var(--t-accent-rgb), .45); }
.live-card__foot > * { background: rgba(var(--t-ink-rgb), .55); }
.live-card__next:hover, .live-card__wa:hover { background: var(--t-card-hover); }
.live-card__play > .icon { box-shadow: 0 10px 24px -8px rgba(var(--t-accent-rgb), .7); }
.live-card__play:hover > .icon { background: var(--t-accent-hover); }
@media (min-width: 1100px) {
  .live-card__play { box-shadow: 0 10px 28px -10px rgba(var(--t-accent-rgb), .8); }
  .live-card__play > .icon { box-shadow: none; }
  .live-card__play:hover > .icon { background: none; }
}
.onair__badge, .today__media .today__time { background: rgba(var(--t-ink-rgb), .85); }
.news-card__pattern { background: radial-gradient(circle at 80% 20%, rgba(var(--t-accent-rgb), .35), transparent 45%), linear-gradient(150deg, var(--blue), var(--navy-950)); }
.promo, .join, .cta-strip { border-color: rgba(var(--t-glow-rgb), .35); }
.promo::after { background: radial-gradient(circle, rgba(var(--t-accent-rgb), .22), transparent 70%); }
.promo:hover { box-shadow: 0 0 34px -10px rgba(var(--t-glow-rgb), .7); }
.join::after { background: rgba(var(--t-accent-rgb), .14); }
.page-hero { background: radial-gradient(700px 260px at 0% 0%, rgba(var(--t-blue-rgb), .10), transparent 70%), radial-gradient(500px 200px at 100% 0%, rgba(var(--t-accent-rgb), .14), transparent 70%); }
.slot.is-now { box-shadow: 0 0 0 3px rgba(var(--t-accent-rgb), .3), var(--shadow); }
.main-nav ul.sub-nav { border-color: rgba(var(--t-glow-rgb), .35); }
@media (max-width: 980px) {
  .site-header { background: var(--navy-950); }
  .main-nav ul.sub-nav { border-color: transparent; border-left-color: rgba(var(--t-accent-rgb), .5); }
}
.wx-now__main { background: linear-gradient(160deg, var(--navy-900), var(--t-wx-b)); }
/* Hintere Ebene der Stadtsilhouette (im Layout fest als Gelb bzw. Blau eingetragen) folgt Akzent- und Hauptfarbe des Themes */
html[data-theme] .hero__silhouette path:first-child { fill: rgba(var(--t-accent-rgb), .28); }
html[data-theme] .site-footer__silhouette path:first-child { fill: rgba(var(--t-blue-rgb), .32); }

/* ---------- Dekorationsebene (fest im Bild, ohne Klicks, unter Kopfzeile/Player) ---------- */
.theme-fx { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; overflow: hidden; pointer-events: none; contain: layout paint style; }
.theme-fx > * { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; background-repeat: repeat; pointer-events: none; }
.theme-fx > .theme-fx__canvas { right: auto; bottom: auto; width: 100%; height: 100%; }   /* die Leinwand mit den Partikeln legt assets/themes/fx.js an (Größe in Pixeln) */
.theme-fx__a, .theme-fx__b, .theme-fx__c { will-change: transform; }
/* Zeichnet fx.js die Partikel, ruht die CSS-Ebene dieser Art (sie bleibt als Rückfall ohne JavaScript). Keine Abfrage von Gerät oder Bildschirmgröße. */
html.fx-js .theme-fx[data-fx="snow"] > .theme-fx__a, html.fx-js .theme-fx[data-fx="snow"] > .theme-fx__b,
html.fx-js .theme-fx[data-fx="confetti"] > .theme-fx__a, html.fx-js .theme-fx[data-fx="petals"] > .theme-fx__a { display: none; }
/* Dekor im Hero/Footer läuft nur, solange der Bereich im Bild ist (fx.js setzt die Klasse) */
html[data-theme] .fx-paused::before, html[data-theme] .fx-paused::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .theme-fx > :not(.theme-fx__canvas), .theme-fx *::before, .theme-fx *::after { animation: none !important; will-change: auto; }
}
@media print { .theme-fx, .theme-preview-pill { display: none !important; } }

/* Dekor an Kopfzeile, Hero und Footer hängt an Pseudo-Elementen; nichts davon fängt Klicks ab */
html[data-theme] .site-header::after,
html[data-theme] .hero::before, html[data-theme] .hero::after,
html[data-theme] .site-footer::before, html[data-theme] .site-footer::after {
  content: ""; position: absolute; pointer-events: none; background-repeat: no-repeat;
}
html[data-theme] .site-footer { isolation: isolate; }   /* Footer-Dekor liegt hinter den Texten, aber vor dem Hintergrund */
html[data-theme] .site-footer::before, html[data-theme] .site-footer::after { z-index: -1; }
html[data-theme] .hero::before, html[data-theme] .hero::after { z-index: -1; }  /* im Hero immer hinter dem Text */

/* Hinweis „Vorschau“ – nur für angemeldete Admins sichtbar, wenn sie ein Theme probeweise ansehen */
.theme-preview-pill {
  position: fixed; z-index: 85; left: 50%; transform: translateX(-50%); bottom: calc(var(--player-h) + 12px);
  max-width: calc(100vw - 24px); padding: .5rem 1rem; border-radius: 999px; background: #fff; color: #0B1D4D;
  border: 2px solid var(--yellow); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .45); font-size: .85rem; font-weight: 700; text-align: center;
}
.theme-preview-pill a { color: var(--blue); }
