/* ═══════════════════════════════════════════════════════════════════════
   Fundus der Naturbühne Hohensyburg

   Farben, Schriften und Maße sind aus `nbh-web/src/styles/global.css`
   übernommen, damit der Fundus wie ein Teil des Ganzen wirkt — abgeschrieben,
   nicht eingebunden: eine Abhängigkeit zwischen zwei Diensten wäre für ein
   Dutzend Werte der falsche Preis.

   Die Schriftdateien liegen bei der Website, nicht hier. Übernommen ist
   deshalb nur der Schriftstapel; wo TeX Gyre Adventor fehlt, greift Century
   Gothic und danach die Systemschrift.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --grund: #ffffff;
    --flaeche: #ffffff;
    --text: #000000;
    --text-leise: #575656;
    --linie: rgba(87, 86, 86, 0.102);
    --schleier: rgba(87, 86, 86, 0.078);

    --sonne: #fbdd15;
    --himmelblau: #14adda;
    --gruen: #83b83a;
    --grau: #b3b2b2;
    --grau-dunkel: #575656;
    --banner-rot: #b80000;

    --radius-karte: 20px;
    --radius-knopf: 10px;
    --schatten-karte: 0 10px 20px rgba(0, 0, 0, 0.1);

    --schrift-display: "TeX Gyre Adventor", "Century Gothic", "URW Gothic",
        "Avant Garde", ui-rounded, system-ui, sans-serif;
    --schrift-text: system-ui, -apple-system, "Segoe UI", sans-serif;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --grund: #0d0d0d;
        --flaeche: #161616;
        --text: #ffffff;
        --text-leise: #b3b2b2;
        --linie: rgba(255, 255, 255, 0.102);
        --schleier: rgba(255, 255, 255, 0.078);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--grund);
    color: var(--text);
    font-family: var(--schrift-text);
    font-size: 15px;
    line-height: 1.5;
}

h1, h2, h3 { font-family: var(--schrift-display); font-weight: 700; margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
a { color: inherit; }

/* ── Seitenleiste und Rahmen ───────────────────────────────────────────── */

.rahmen {
    display: grid;
    grid-template-columns: 254px 1fr;
    min-height: 100vh;
}

.leiste {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
    border-right: 1px solid var(--linie);
    background: var(--flaeche);
}

.leiste__marke {
    font-family: var(--schrift-display);
    font-weight: 700;
    font-size: 20px;
    text-decoration: none;
}
.leiste__marke::before {
    content: "";
    display: inline-block;
    width: 12px; height: 12px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--sonne);
}
.leiste__haus { margin: -12px 0 0 20px; font-size: 12px; color: var(--text-leise); }

.leiste__wege { display: grid; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; }
.leiste__wege a {
    display: block;
    padding: 9px 12px;
    border-radius: var(--radius-knopf);
    color: var(--text);
    text-decoration: none;
}
.leiste__wege a:hover { background: var(--schleier); }
/* Wo man ist, muss man sehen können — sonst ist eine Navigation eine Liste. */
.leiste__wege a[aria-current="page"] {
    background: var(--schleier);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--sonne);
}

.leiste__fuss {
    display: grid;
    gap: 2px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--linie);
    font-size: 13px;
}
.leiste__fuss a { padding: 6px 12px; border-radius: var(--radius-knopf); color: var(--text-leise); text-decoration: none; }
.leiste__fuss a:hover { background: var(--schleier); color: var(--text); }

.bereich { display: flex; flex-direction: column; min-width: 0; }

/* ── Seitenkopf ────────────────────────────────────────────────────────── */

.seitenkopf {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 20px;
    align-items: start;
    padding: 20px 28px;
    border-bottom: 1px solid var(--linie);
    background: var(--schleier);
}
.seitenkopf__titel { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seitenkopf__pfad { grid-column: 1; font-size: 13px; color: var(--text-leise); }
.seitenkopf__pfad a { color: inherit; }
.seitenkopf__werkzeuge { grid-row: 1; grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
    padding: 2px 10px;
    border: 1px solid var(--linie);
    border-radius: var(--radius-knopf);
    background: var(--grund);
    font-family: var(--schrift-text);
    font-size: 13px;
    color: var(--text-leise);
}

.suchfeld {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--linie);
    border-radius: var(--radius-knopf);
    background: var(--grund);
    color: var(--text);
    font: inherit;
}
.suchfeld:focus { outline: 2px solid var(--himmelblau); outline-offset: 1px; }

@media (max-width: 800px) {
    .rahmen { grid-template-columns: 1fr; }
    .leiste { border-right: none; border-bottom: 1px solid var(--linie); }
    .leiste__wege { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
    .leiste__fuss { grid-auto-flow: column; justify-content: start; margin-top: 0; }
}

/* ── Knöpfe ────────────────────────────────────────────────────────────── */

.knopf {
    padding: 8px 14px;
    border: 1px solid var(--linie);
    border-radius: var(--radius-knopf);
    background: var(--flaeche);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.knopf:hover { background: var(--schleier); }
.knopf:disabled { opacity: 0.45; cursor: not-allowed; }
.knopf--wichtig { background: var(--sonne); color: #000; border-color: transparent; font-weight: 600; }
.knopf--leise { border: none; background: none; color: var(--text-leise); }
.knopf--klein { padding: 4px 9px; font-size: 13px; }

/* ── Aufbau ────────────────────────────────────────────────────────────── */

main { padding: 24px 28px 80px; }

.zeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.zeile--verteilt { justify-content: space-between; }
.leise { color: var(--text-leise); font-size: 13px; }
.hinweis { padding: 40px 0; color: var(--text-leise); text-align: center; }
.fehler { color: var(--banner-rot); }

/* ── Produktionskarten ─────────────────────────────────────────────────────
   Aufbau wie in den Wireframes: Bildfläche oben, darunter Kategorie, Titel,
   Beschreibung, Urheber und zwei Knöpfe. Die Spartenfarbe füllt die Bildfläche,
   wenn kein Titelbild im Ordner liegt — so trägt jede Produktion ihre Farbe,
   ohne dass der Text darauf stehen muss. */

.karten {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
    gap: 20px;
    margin: 4px 0 32px;
}

.karte {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--linie);
    border-radius: var(--radius-karte);
    background: var(--flaeche);
    overflow: hidden;
}
.karte:hover { box-shadow: var(--schatten-karte); }

.karte__bild {
    position: relative;
    height: 152px;
    background: var(--sparte, var(--grau));
    background-size: cover;
    background-position: center;
}
/* Über einem hochgeladenen Bild liegt ein Schleier — welches Bild jemand
   wählt, weiß hier niemand vorher, und der Titel darunter soll lesbar sein. */
.karte__bild--foto::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.35));
}

.karte__inhalt { display: grid; gap: 6px; padding: 16px; }
.karte__kategorie { font-size: 12px; color: var(--text-leise); }
.karte__titel { font-family: var(--schrift-display); font-weight: 700; font-size: 18px; }
.karte__text {
    font-size: 14px;
    color: var(--text-leise);
    /* Zwei Zeilen, dann Schluss — sonst reißen unterschiedlich lange
       Beschreibungen das Raster auseinander. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.karte__wer { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.karte__zeichen {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--schleier);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-leise);
}
.karte__wer div { font-size: 13px; line-height: 1.3; }
.karte__wer span { color: var(--text-leise); }

.karte__fuss {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding: 0 16px 16px;
}
.karte__fuss > * { flex: 1; text-align: center; text-decoration: none; }

.marke {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--schleier);
    font-size: 12px;
}
.marke--warnung { background: var(--banner-rot); color: #fff; }

/* ── Blätterleiste ─────────────────────────────────────────────────────── */

.blaettern {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin: 28px 0 0;
}

/* ── Dateilisten ───────────────────────────────────────────────────────── */

.gruppe { margin-bottom: 26px; }
.gruppe__titel {
    display: flex; gap: 8px; align-items: baseline;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--linie);
    font-family: var(--schrift-display);
}

.datei {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    align-items: center;
    padding: 9px 4px;
    border-bottom: 1px solid var(--linie);
}
.datei:hover { background: var(--schleier); }
.datei__name { font-weight: 600; word-break: break-word; }
.datei__werkzeuge { display: flex; gap: 6px; }
.datei__zeile { grid-column: 1 / -1; }

.schlagwort {
    display: inline-block;
    margin-right: 4px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--schleier);
    font-size: 12px;
}

/* ── Ablegefläche ──────────────────────────────────────────────────────── */

.ablage {
    margin: 16px 0;
    padding: 22px;
    border: 2px dashed var(--linie);
    border-radius: var(--radius-karte);
    color: var(--text-leise);
    text-align: center;
}
.ablage--bereit { border-color: var(--himmelblau); background: var(--schleier); color: var(--text); }

.fortschritt { display: grid; gap: 6px; margin-top: 12px; text-align: left; }
.fortschritt__balken {
    height: 6px;
    border-radius: 999px;
    background: var(--linie);
    overflow: hidden;
}
.fortschritt__wert { height: 100%; background: var(--himmelblau); transition: width 0.15s; }

/* ── Dialoge ───────────────────────────────────────────────────────────── */

dialog {
    width: min(560px, 92vw);
    padding: 22px;
    border: none;
    border-radius: var(--radius-karte);
    background: var(--flaeche);
    color: var(--text);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }

label { display: grid; gap: 4px; margin-bottom: 12px; font-size: 13px; color: var(--text-leise); }
input, select, textarea {
    padding: 8px 10px;
    border: 1px solid var(--linie);
    border-radius: var(--radius-knopf);
    background: var(--grund);
    color: var(--text);
    font: inherit;
}
fieldset { border: 1px solid var(--linie); border-radius: var(--radius-knopf); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--linie); font-size: 14px; }
th { font-size: 12px; color: var(--text-leise); font-weight: 600; }

/* ── Anmeldeseite ──────────────────────────────────────────────────────── */

.anmeldung {
    display: grid;
    gap: 14px;
    width: min(380px, 92vw);
    margin: 12vh auto;
    padding: 28px;
    border-radius: var(--radius-karte);
    background: var(--flaeche);
    box-shadow: var(--schatten-karte);
}
