/* Redaktioneller Rahmen fuer live.timelapse.news.
   Haltung und Farben folgen der Mutterseite timelapse.news (Ghost, Theme "Source"):
   dunkles Burgunder, Serifentitel, Haarlinien statt Kaesten.
   Seitenbausteine stehen in redaktion-seiten.css. */

:root {
    --grund: #210404;
    --flaeche: #2b0e0e;
    --karte: #371d1d;
    --linie: #422929;
    --linie-hell: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    --text-2: rgba(255, 255, 255, 0.64);
    --text-3: rgba(255, 255, 255, 0.45);
    --akzent: #3f89e7;
    --akzent-hover: #5a9cf0;
    --live: #ff5a5f;
    --bestaetigt: #4cc38a;

    --schrift-titel: "Rufina", Georgia, "Times New Roman", serif;
    --schrift-text: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --schrift-daten: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

    --breite: 1320px;
    --breite-text: 720px;
    --rand: clamp(20px, 1.2rem + 2vw, 48px);
    --abstand: clamp(40px, 2rem + 3vw, 88px);
    --radius: 6px;
}

body.tl-redaktion {
    margin: 0;
    background: var(--grund);
    color: var(--text);
    font-family: var(--schrift-text);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.tl-redaktion a { color: inherit; }
.tl-redaktion :focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; border-radius: 2px; }
.tl-redaktion .font-serif,
.tl-redaktion h1, .tl-redaktion h2, .tl-redaktion h3 { font-family: var(--schrift-titel); letter-spacing: -0.01em; }

.tl-redaktion .hidden { display: none !important; }

.tl-brotkrumen { display: flex; gap: 8px; margin: 0 0 24px; font-size: 0.85rem; color: var(--text-3); }
.tl-brotkrumen a { color: var(--text-2); text-decoration: none; }
.tl-meldungen { max-width: var(--breite-text); margin: 0 auto 24px; display: grid; gap: 8px; }
.tl-meldung { margin: 0; padding: 12px 16px; border-left: 2px solid var(--akzent); background: var(--flaeche); color: var(--text); font-size: 0.93rem; }
.tl-meldung-error, .tl-meldung-danger { border-left-color: var(--live); }
.tl-meldung-success { border-left-color: var(--bestaetigt); }

.tl-skip {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    padding: 10px 16px; background: var(--akzent); color: #fff; border-radius: var(--radius);
}
.tl-skip:focus { top: 12px; }

/* ---------- Kopfzeile ---------- */
.tl-kopf { position: relative; z-index: 40; background: var(--grund); }
.tl-kopf-innen {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
    max-width: var(--breite); margin: 0 auto; padding: 22px var(--rand);
}
.tl-marke { justify-self: center; display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.tl-marke-name { font-family: var(--schrift-titel); font-size: clamp(1.4rem, 1.1rem + 0.9vw, 1.85rem); font-weight: 600; white-space: nowrap; }
.tl-marke-live {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--schrift-daten); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--live);
}
.tl-punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.6); animation: tl-puls 2.4s infinite; }
@keyframes tl-puls { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(255, 90, 95, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); } }

.tl-nav { display: flex; align-items: center; gap: 26px; }
.tl-link { font-size: 0.95rem; font-weight: 600; text-decoration: none; color: var(--text); white-space: nowrap; }
.tl-link:hover { opacity: 0.8; }
.tl-link.active { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.tl-nav-zusatz { display: none; }

.tl-aktionen { justify-self: end; display: flex; align-items: center; gap: 18px; }
.tl-suche { position: relative; display: flex; align-items: center; }
.tl-suche input {
    width: 170px; height: 38px; padding: 0 14px 0 36px;
    background: rgba(255, 255, 255, 0.08); color: var(--text);
    border: 1px solid transparent; border-radius: 100px; font: inherit; font-size: 0.9rem;
    transition: width 0.2s ease, background-color 0.2s ease;
}
.tl-suche input::placeholder { color: var(--text-3); }
.tl-suche input:focus { width: 230px; background: rgba(255, 255, 255, 0.12); border-color: var(--linie-hell); outline: none; }
.tl-suche i { position: absolute; left: 13px; color: var(--text-3); font-size: 0.8rem; pointer-events: none; }
.tl-knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border: 0; border-radius: var(--radius);
    background: var(--akzent); color: #fff; font: inherit; font-size: 0.92rem; font-weight: 600;
    line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background-color 0.15s ease;
}
.tl-knopf:hover { background: var(--akzent-hover); }
.tl-knopf:disabled { opacity: 0.55; cursor: not-allowed; }
.tl-knopf-leise { background: transparent; color: var(--text); border: 1px solid var(--linie-hell); }
.tl-knopf-leise:hover { background: rgba(255, 255, 255, 0.06); }
.tl-menue-knopf { display: none; width: 40px; height: 40px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text); font-size: 1.15rem; cursor: pointer; }

.tl-ressorts {
    max-width: var(--breite); margin: 0 auto; padding: 0 var(--rand); box-sizing: border-box;
    background: linear-gradient(var(--linie), var(--linie)) top / calc(100% - 2 * var(--rand)) 1px no-repeat,
                linear-gradient(var(--linie), var(--linie)) bottom / calc(100% - 2 * var(--rand)) 1px no-repeat;
    display: flex; align-items: center; gap: 24px;
}
.tl-ressorts-liste {
    flex: 1; display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; padding: 12px 0;
}
.tl-ressorts-liste::-webkit-scrollbar { display: none; }
.tl-ressorts-liste a { font-size: 0.86rem; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.tl-ressorts-liste a:hover, .tl-ressorts-liste a.active { color: var(--text); }
.tl-ressorts-meta { font-family: var(--schrift-daten); font-size: 0.75rem; color: var(--text-3); white-space: nowrap; }
.tl-ressorts-meta a { color: var(--text-2); text-decoration: none; }

#page-loader { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
#page-loader > div { height: 100%; background: var(--akzent); }

/* ---------- Inhalt ---------- */
.tl-haupt { flex: 1; padding: var(--abstand) var(--rand) 0; max-width: var(--breite); width: 100%; margin: 0 auto; box-sizing: border-box; }
.tl-haupt:has(> .tl-seite:first-child) { padding-top: 0; }
/* Lange deutsche Komposita und Raster-Kinder der Bestandsseiten duerfen ab 360 px nicht ueberlaufen. */
.tl-haupt { overflow-wrap: break-word; hyphens: auto; }
.tl-haupt .grid > *, .tl-haupt [class*="grid-cols"] > * { min-width: 0; }
.tl-haupt select, .tl-haupt input, .tl-haupt textarea { max-width: 100%; }

.tl-anzeige { max-width: var(--breite-text); margin: var(--abstand) auto 0; }
.tl-anzeige a { display: block; padding: 20px 22px; background: var(--karte); border-radius: var(--radius); text-decoration: none; }
.tl-anzeige img { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; margin-bottom: 12px; }
.tl-anzeige-label { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }

/* ---------- Fusszeile ---------- */
.tl-fuss { margin-top: var(--abstand); padding: var(--abstand) var(--rand) 40px; border-top: 1px solid var(--linie); }
.tl-fuss-innen { max-width: var(--breite); margin: 0 auto; }
.tl-fuss-oben { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 40px; }
.tl-fuss h2 { font-size: 1.5rem; margin: 0 0 12px; }
.tl-fuss h3 { font-family: var(--schrift-text); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin: 0 0 14px; }
.tl-fuss p { color: var(--text-2); font-size: 0.92rem; max-width: 34ch; margin: 0 0 18px; }
.tl-fuss ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tl-fuss li a { color: var(--text-2); text-decoration: none; font-size: 0.92rem; }
.tl-fuss li a:hover { color: var(--text); }
.tl-fuss-unten {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
    margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--linie);
    font-size: 0.82rem; color: var(--text-3);
}
.tl-fuss-unten a { color: var(--text-2); text-decoration: none; }
.tl-fuss-tor { display: inline-block; width: 10px; height: 10px; opacity: 0.04; }

/* ---------- Bestandsseiten: Tailwind-Dunkelgrau auf Burgunder umstellen ---------- */
.tl-redaktion .bg-neutral-950 { background-color: var(--grund); }
.tl-redaktion [class*="bg-neutral-900"], .tl-redaktion [class*="bg-neutral-800"] { background-color: rgba(255, 255, 255, 0.05); }
.tl-redaktion [class*="border-neutral-"] { border-color: var(--linie); }
.tl-redaktion .glass-card { background: var(--flaeche); border-color: var(--linie); border-radius: var(--radius); backdrop-filter: none; -webkit-backdrop-filter: none; }
.tl-redaktion .text-neutral-500 { color: var(--text-3); }
.tl-redaktion .text-neutral-400 { color: var(--text-2); }
.tl-redaktion input:not([type="checkbox"]):not([type="radio"]), .tl-redaktion select, .tl-redaktion textarea { color-scheme: dark; }

/* ---------- Einwilligungs-Dialog ---------- */
.tl-redaktion #cookie-wall { background: rgba(20, 2, 2, 0.88) !important; }
.tl-redaktion #cookie-wall > div > div { background: var(--flaeche) !important; border: 1px solid var(--linie) !important; border-radius: 10px !important; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5) !important; }
.tl-redaktion #consent-accept, .tl-redaktion #consent-save { background: var(--akzent) !important; animation: none !important; box-shadow: none !important; border-radius: var(--radius) !important; }

/* ---------- Mobil ---------- */
@media (max-width: 1080px) {
    .tl-kopf-innen { grid-template-columns: auto 1fr auto; gap: 12px; padding-block: 16px; }
    .tl-marke { justify-self: start; }
    .tl-menue-knopf { display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 51; }
    .tl-nav {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
        width: min(320px, 86vw); padding: 76px 28px 28px;
        flex-direction: column; align-items: stretch; gap: 4px; overflow-y: auto;
        background: var(--flaeche); border-right: 1px solid var(--linie);
        transform: translateX(-100%); transition: transform 0.25s ease; visibility: hidden;
    }
    .tl-nav.offen { transform: none; visibility: visible; }
    .tl-nav .tl-link { padding: 10px 0; font-size: 1.05rem; }
    .tl-nav-zusatz { display: block; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--linie); }
    .tl-nav-zusatz p { margin: 0 0 6px; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
    .tl-nav-zusatz .tl-link { display: block; font-weight: 500; color: var(--text-2); }
    /* Unter der Kopfzeile (z-index 40), deren Stapelkontext die Schublade enthaelt */
    #sidebar-overlay { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, 0.55); }
    .tl-suche input, .tl-suche input:focus { width: 150px; }
    .tl-ressorts-meta { display: none; }
    .tl-fuss-oben { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
    .tl-anmelden, .tl-suche { display: none; }
    .tl-kopf-innen { gap: 8px; }
    .tl-marke-name { font-size: 1.22rem; }
    .tl-marke-live { font-size: 0; gap: 0; }
    .tl-aktionen .tl-knopf { padding: 9px 12px; font-size: 0.85rem; }
    .tl-fuss-oben { grid-template-columns: 1fr; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .tl-redaktion *, .tl-redaktion *::before, .tl-redaktion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
