/* thema.css — Leiste ueber dem Kopf (Telefon, Mail, Zeiten, Slogan, Tag/Nacht, Sprachwahl) und
   Hell/Dunkel fuer Startseite + Rechtsseiten (AIPM 82/84, Entscheid Tobias 04.10.2026).
   Vorlage: www.missing-link.de (site/de/www.css, Abschnitte "Leiste" und "Hell/Dunkel").
   Geladen von landing/_layout.html.twig (nach landing.css) UND base.html.twig (Portal, dort nur
   Leiste/Logo/Farbwerte; die Portal-Dunkelregeln stehen in thema-portal.css + dunkel-*.css).

   Prinzip wie www: landing.css bleibt unberuehrt; feste Weisstoene von dort werden unten auf
   --ml-* Tokens umgelenkt (im hellen Modus wirkungsgleich), der Dunkelmodus setzt nur Tokens um.
   Das Vorab-Skript im <head> setzt data-thema="hell|dunkel" auf <html> (gespeicherte Wahl
   "ml-thema" vor Systemeinstellung); ohne JavaScript greift die prefers-color-scheme-Kopie. */

:root{
  --ml-flaeche: #fff;         /* Karten, Login, Dokumente (in landing.css fest #fff) */
  --ml-eingabe: #fff;         /* Eingabefelder */
  --ml-knopf: #bb1500;        /* rote Knoepfe mit weisser Schrift, in beiden Modi */
  --ml-knopf-hover: #7a1f1f;
  --ml-p2o-akzent: #b86b00;
  --ml-logo-grund: #fff;      /* Verlagslogos sind fuer weissen Grund gemacht */
  --ml-balken: #8e2626;       /* Leiste oben + Fuss: Bordeaux wie www (Tag), nachts dunkel */
  --ml-kopf-grund: #fff;      /* Kopf mit Logo: tags weiss, nachts dunkles Bordeaux */
}

/* ---------- Leiste ---------- */
.ml-leiste{ background: var(--ml-balken); color: rgba(255,255,255,.92); font: 13px/1.45 "Open Sans", system-ui, sans-serif; }
.ml-leiste-innen{ max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ml-leiste-portal .ml-leiste-innen{ max-width: none; }          /* Portal: volle Breite wie .pk-kopf */
.ml-leiste-grp{ display: flex; align-items: center; gap: 24px; }
.ml-leiste-grp > a, .ml-leiste-grp > span{ display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ml-leiste a{ color: rgba(255,255,255,.92); text-decoration: none; }
.ml-leiste a:hover{ color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ml-leiste .lp-icon{ flex: none; }
.ml-thema{ display: inline-flex; align-items: center; gap: 8px; height: 30px; margin: 0; padding: 0 12px 0 10px; border-radius: 15px; border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff; font: 600 12.5px "Open Sans", system-ui, sans-serif; cursor: pointer; transition: background .15s, border-color .15s; }
.ml-thema:hover{ background: rgba(255,255,255,.14); border-color: #fff; }
.ml-thema:focus-visible, .ml-sprachwahl summary:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }
.ml-thema svg:last-of-type{ display: none; }               /* Tag: Mond + "Nacht" (= zur Nacht wechseln) */
[data-thema="dunkel"] .ml-thema svg:first-of-type{ display: none; }
[data-thema="dunkel"] .ml-thema svg:last-of-type{ display: block; }
.ml-sprachwahl{ position: relative; }
.ml-sprachwahl summary{ list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; }
.ml-sprachwahl summary::-webkit-details-marker{ display: none; }
.ml-sprachwahl ul{ position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; list-style: none; margin: 0; padding: 8px 0; min-width: 170px; background: var(--ml-flaeche); border: 1px solid var(--lp-linie, #e3e3e3); border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.ml-sprachwahl ul a{ display: flex; align-items: center; gap: 10px; padding: 7px 16px; color: var(--lp-text, #1f1f1f); font-size: 14px; }
.ml-sprachwahl ul a:hover{ background: var(--lp-grund, #f6f6f7); color: var(--lp-text, #1f1f1f); text-decoration: none; }
.ml-sprachwahl ul a[aria-current]{ color: var(--lp-rot, #bb1500); font-weight: 700; }
.ml-flagge{ flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
@media (max-width: 1080px){ .ml-leiste-weg{ display: none !important; } }
@media (max-width: 760px){
  .ml-leiste-weg, .ml-leiste-mail{ display: none !important; }
  .ml-leiste-grp{ gap: 16px; }
  .ml-thema-text{ display: none; }
  .ml-thema{ padding: 0 9px; }
}
@media (max-width: 600px){ .ml-leiste-innen{ padding: 0 16px; } }

/* ---------- Logo: Tagfassung schwarze Schrift, Nachtfassung helle Schrift (wie www) ---------- */
.ml-logo-nacht{ display: none !important; }
[data-thema="dunkel"] .ml-logo-tag{ display: none !important; }
[data-thema="dunkel"] .ml-logo-nacht{ display: block !important; }
@media (prefers-color-scheme: dark){
  :root:not([data-thema="hell"]) .ml-logo-tag{ display: none !important; }
  :root:not([data-thema="hell"]) .ml-logo-nacht{ display: block !important; }
}

/* ---------- Startseite/Rechtsseiten: feste Farben aus landing.css auf Tokens umlenken ---------- */
.lp-kopf{ background: var(--ml-kopf-grund); }
.lp-trust, .lp-karte, .lp-p2o, .lp-doku, .lp-login, .lp-btn-hell, .lp-ml35{ background: var(--ml-flaeche); }
.lp-input{ background: var(--ml-eingabe); }
.lp-btn-rot{ background: var(--ml-knopf); border-color: var(--ml-knopf); }
.lp-btn-rot:hover{ background: var(--ml-knopf-hover); border-color: var(--ml-knopf-hover); }
.lp-p2o-text .lp-eyebrow{ color: var(--ml-p2o-akzent); }
.lp-logos li{ background: var(--ml-logo-grund); }
.lp-logos span{ color: #303030; }                       /* Namenskacheln stehen immer auf hellem Grund */
.lp-fuss, .lp-fuss-unten{ background: var(--ml-balken); }
/* Icon-Farben stehen als stroke-Attribut im SVG (landing/_icons); CSS schlaegt das Attribut */
svg.lp-icon[stroke="#bb1500"]{ stroke: var(--lp-rot, #bb1500); }
svg.lp-icon[stroke="#5e5e5e"]{ stroke: var(--lp-grau, #5e5e5e); }
.lp-fehler{ background: var(--ml-fehler-grund, #fdecea); border-color: var(--ml-fehler-rand, #f1b8b0); color: var(--ml-fehler-text, #8a1a0b); }

/* ---------- Dunkle Werte ----------
   Einmal fuer "System dunkel, keine Wahl hell", einmal fuer die ausdrueckliche Wahl.
   Beide Bloecke muessen gleich bleiben (wie www.css). */
@media (prefers-color-scheme: dark){
  :root:not([data-thema="hell"]){
    color-scheme: dark;
    --lp-rot: #ff7a63; --lp-rot-dunkel: #ffa494; --lp-rot-hell: #3a1d19; --lp-orange: #e08a00;
    --lp-text: #ececee; --lp-text-2: #d6d6da; --lp-grau: #a4a4ab; --lp-grau-hell: #7d7d85;
    --lp-linie: #33333a; --lp-rahmen: #4a4a53; --lp-grund: #121214; --lp-dunkel: #0c0c0e; --lp-fuss: #08080a;
    --ml-flaeche: #1c1c20; --ml-eingabe: #121214; --ml-p2o-akzent: #f0a63a; --ml-logo-grund: #ececef;
    --ml-balken: #461010; --ml-kopf-grund: var(--ml-balken);   /* nachts = Leiste (Tobias 04.10.2026) */
    --ml-fehler-grund: #3a1d19; --ml-fehler-rand: #6b2a22; --ml-fehler-text: #ffb4a8;
  }
}
:root[data-thema="dunkel"]{
  color-scheme: dark;
  --lp-rot: #ff7a63; --lp-rot-dunkel: #ffa494; --lp-rot-hell: #3a1d19; --lp-orange: #e08a00;
  --lp-text: #ececee; --lp-text-2: #d6d6da; --lp-grau: #a4a4ab; --lp-grau-hell: #7d7d85;
  --lp-linie: #33333a; --lp-rahmen: #4a4a53; --lp-grund: #121214; --lp-dunkel: #0c0c0e; --lp-fuss: #08080a;
  --ml-flaeche: #1c1c20; --ml-eingabe: #121214; --ml-p2o-akzent: #f0a63a; --ml-logo-grund: #ececef;
  --ml-balken: #461010; --ml-kopf-grund: var(--ml-balken);   /* nachts = Leiste (Tobias 04.10.2026) */
  --ml-fehler-grund: #3a1d19; --ml-fehler-rand: #6b2a22; --ml-fehler-text: #ffb4a8;
}
:root[data-thema="hell"]{ color-scheme: light; }
.lp-fuss .ml-fuss-klein{ display: block; font-size: 12px; color: rgba(255,255,255,.7); margin-top: -4px; }   /* "Rechtsverbindlich auf Deutsch" (EN/NL) */

/* Verlagskarussell 1:1 aus www.missing-link.de www.css (Tobias 04.10.2026, AIPM 82) */
.ml-karussell{ width: 100%; overflow: hidden; padding: 6px 0 22px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.ml-karussell-band{ display: flex; width: max-content; animation: ml-karussell 150s linear infinite; }
.ml-karussell:hover .ml-karussell-band, .ml-karussell:focus-within .ml-karussell-band{ animation-play-state: paused; }
.ml-karussell .lp-logos{ display: flex; flex-wrap: nowrap; gap: 14px; padding-right: 14px; width: max-content; }
.ml-karussell .lp-logos li{ flex: none; width: 180px; }
.ml-karussell .lp-logos .ml-logo-marke{ max-height: 40px; margin-right: 10px; }
@keyframes ml-karussell{ to{ transform: translateX(-50%); } }
@media (max-width: 600px){ .ml-karussell .lp-logos li{ width: 150px; } .ml-karussell-band{ animation-duration: 120s; } }
@media (prefers-reduced-motion: reduce){
  .ml-karussell{ -webkit-mask-image: none; mask-image: none; }
  .ml-karussell-band{ animation: none; width: auto; }
  .ml-karussell .lp-logos{ flex-wrap: wrap; justify-content: center; width: auto; padding-right: 0; }
  .ml-karussell .lp-logos[aria-hidden]{ display: none; }
}
/* Variante "Buehne": ein Verlag gross in der Mitte, Nachbarn angedeutet, dreht schrittweise und endlos.
   Wird per buehne.js aus der vorhandenen Logoliste (.ml-karussell) aufgebaut. */
.ml-buehne{ --schritt: 212px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ml-buehne-zeile{ width: 100%; display: flex; align-items: center; gap: 12px; }
.ml-buehne-fenster{ position: relative; flex: 1; height: 180px; overflow: hidden; touch-action: pan-y;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ml-buehne .ml-buehne-bahn{ display: block; list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.ml-buehne-bahn li{ --s: .8; position: absolute; left: 50%; top: 50%; width: 190px; margin: 0;
  transform: translate(-50%, -50%) translateX(calc(var(--o) * var(--schritt))) scale(var(--s));
  opacity: .4; filter: grayscale(1); transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .6s, filter .6s, box-shadow .6s; }
.ml-buehne-bahn li[data-o="1"]{ --s: .9; opacity: .75; filter: grayscale(.3); }
.ml-buehne-bahn li[data-o="0"]{ --s: 1.14; opacity: 1; filter: none; z-index: 2; border-color: var(--lp-rahmen); box-shadow: 0 10px 28px rgba(0,0,0,.10); }
.ml-buehne-bahn li[data-o="x"]{ opacity: 0; pointer-events: none; }
.ml-buehne-bahn li:not([data-o="0"]) a{ cursor: pointer; }
.ml-buehne-knopf{ flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--lp-rahmen); background: var(--ml-flaeche); color: var(--lp-text); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .2s, color .2s; }
.ml-buehne-knopf:hover, .ml-buehne-knopf:focus-visible{ border-color: var(--lp-rot); color: var(--lp-rot); }
.ml-buehne-name{ margin: 0; min-height: 1.4em; font-size: 15px; font-weight: 600; color: var(--lp-text); text-align: center; }
.ml-buehne-name span{ color: var(--lp-grau); font-weight: 400; }
.ml-buehne-unsichtbar{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px){ .ml-buehne{ --schritt: 150px; } .ml-buehne-bahn li{ width: 150px; } .ml-buehne-knopf{ width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce){ .ml-buehne-bahn li{ transition: none; } }

/* Kontaktband "Fragen zum eBiml35?" wie www "Sprechen Sie mit uns" (Tobias 04.10.2026, AIPM 82) */
.lp-kontakt{ background: linear-gradient(120deg, #4a1212 0%, #7a1f1f 55%, #9c3a14 100%); }
.lp-kontakt-wege a:hover{ color: #ffd29a; }

/* Verlaufsstreifen zwischen Leiste und Logo-Kopf wie www .ml-kopf::before (Tobias 04.10.2026, AIPM 82) */
.lp-kopf, .pk-kopf{ position: sticky; }
.lp-kopf::before, .pk-kopf::before{ content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 1;
  background: linear-gradient(90deg, #7a1f1f 0%, #bb1500 45%, #e08a00 100%); pointer-events: none; }


/* ---------- Zahlenband + Aktuell (04.10.2026, Tobias): 1:1 nach www.css ----------
   Zahlen im Verlauf Bordeaux -> Rot -> Orange (nachts heller), Aktuell-Leiste mit warmem Verlauf.
   Eigene Token-Bloecke, damit die gemeinsamen Hell/Dunkel-Bloecke oben unveraendert bleiben. */
:root{
  --ml-verlauf: linear-gradient(90deg, #7a1f1f 0%, #bb1500 45%, #e08a00 100%);
  --ml-verlauf-schrift: var(--ml-verlauf);
  --ml-warm-rot: #fde6df; --ml-warm-orange: #ffefd6; --ml-aktuell-rand: #f3cfc8;
}
@media (prefers-color-scheme: dark){
  :root:not([data-thema="hell"]){ --ml-verlauf-schrift: linear-gradient(90deg, #ff7a63, #ffb347); --ml-warm-rot: #3a1d19; --ml-warm-orange: #36260f; --ml-aktuell-rand: #5a2a22; }
}
:root[data-thema="dunkel"]{ --ml-verlauf-schrift: linear-gradient(90deg, #ff7a63, #ffb347); --ml-warm-rot: #3a1d19; --ml-warm-orange: #36260f; --ml-aktuell-rand: #5a2a22; }

.ml-zahlen div{ flex-direction: column; align-items: flex-start; gap: 2px; }
.ml-zahlen b{ font-size: 30px; line-height: 1.1; letter-spacing: -.01em; color: var(--lp-rot);
  background: var(--ml-verlauf-schrift); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ml-zahlen span{ font-size: 14px; color: var(--lp-grau); }
.ml-aktuell{ background: linear-gradient(90deg, var(--ml-warm-rot), var(--ml-warm-orange)); border-bottom: 1px solid var(--ml-aktuell-rand); }
.ml-aktuell .lp-wrap{ padding-top: 14px; padding-bottom: 14px; display: flex; align-items: center; gap: 16px; font-size: 15px; color: var(--lp-text-2); }
.ml-aktuell p{ margin: 0; }
.ml-aktuell-marke{ flex: none; background: var(--ml-knopf); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.ml-aktuell a{ font-weight: 600; text-decoration: none; white-space: nowrap; }
.ml-aktuell a .lp-icon{ vertical-align: -2px; }
@media (max-width: 600px){
  .ml-zahlen{ grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .ml-aktuell .lp-wrap{ flex-direction: column; align-items: flex-start; gap: 8px; }
  .ml-aktuell a{ white-space: normal; }
}
