/* Schriften liegen lokal im Projekt (variable Schriften, lateinischer Zeichensatz inkl. Umlaute) */
@font-face {
    font-family: "Inter";
    src: url("fonts/inter.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("fonts/plus-jakarta-sans.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #f6f3ee;
    --surface: #ffffff;
    --ink: #1d2126;
    --ink-soft: #5d6570;
    --line: #e4ded4;
    --accent: #0f766e;
    --accent-soft: #d8eeea;
    --badge: #c2410c;
    --shadow: 0 1px 2px rgba(30, 25, 15, .06), 0 6px 20px rgba(30, 25, 15, .08);
    --radius: 14px;
    --gutter: clamp(16px, 4vw, 48px);
    --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14171b;
        --surface: #1c2025;
        --ink: #eceae6;
        --ink-soft: #a2a9b2;
        --line: #2b3038;
        --accent: #3fb8a9;
        --accent-soft: #1d3b38;
        --badge: #fb923c;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Hintergrund nicht mitscrollen, solange die Großansicht offen ist */
body:has(.lightbox) { overflow: hidden; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; margin: 0; }
h1:focus { outline: none; }

a { color: var(--accent); }

button { font: inherit; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Ein Fehler ist aufgetreten."
    }

/* ---------- Knöpfe & Formulare (von allen Seiten genutzt) ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 40px;
    padding: .5rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, opacity .15s;
}

    .btn:hover { border-color: var(--ink-soft); }
    .btn:disabled { opacity: .5; cursor: default; }
    .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

    .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
    .btn.primary:hover { filter: brightness(1.08); }
    .btn.danger { color: #b42318; }
    .btn.danger:hover { border-color: #b42318; background: #fdecea; }
    .btn.ghost { border-color: transparent; background: transparent; }
    .btn.ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
    .btn.small { min-height: 32px; padding: .3rem .75rem; font-size: .82rem; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
}

    .icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
    .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.field {
    display: grid;
    gap: .3rem;
    font-size: .85rem;
    font-weight: 500;
    color: var(--ink-soft);
}

    .field input, .field textarea {
        width: 100%;
        padding: .6rem .75rem;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--bg);
        color: var(--ink);
        font: inherit;
        font-size: 1rem; /* >= 16px, sonst zoomt iOS beim Antippen */
        font-weight: 400;
    }

    .field textarea { min-height: 90px; resize: vertical; field-sizing: content; max-height: 50vh; }

    .field input:focus, .field textarea:focus {
        outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
        border-color: var(--accent);
    }

.form-error {
    margin: 0;
    padding: .5rem .75rem;
    border-radius: 10px;
    background: #fdecea;
    color: #b42318;
    font-size: .88rem;
}

.spacer { flex: 1; }

/* echtes <input type=file> unsichtbar; geöffnet wird es über ein <label for=...> */
.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    cursor: pointer;
}

    .check input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--accent); flex: 0 0 auto; }
    .check span { display: grid; gap: .1rem; font-size: .9rem; }
    .check small { color: var(--ink-soft); font-size: .8rem; }

.denied {
    max-width: 640px;
    margin: 0 auto;
    padding: 4rem var(--gutter);
}
