/* Farben fuer hellen und dunklen Modus, angelehnt an www.hit-cockpit.de.
   Dunkel greift bei prefers-color-scheme: dark, eine manuelle Wahl ueber
   data-theme="light" | "dark" auf <html> hat Vorrang. */

:root {
    color-scheme: light;

    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #eef1f5;
    --text: #17202b;
    --muted: #5a6573;
    --border: #dde2e8;
    --accent: #1d5fd1;
    --accent-hover: #164ba8;
    --accent-text: #ffffff;
    --accent-soft: #e5eefc;
    --focus: #1d5fd1;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
    --shadow-lg: 0 10px 30px rgba(16, 24, 40, .10);
    --hero-glow: #dbe7fd;

    --ok: #1f9d55;
    --warn: #e0a106;
    --err: #d64545;
    --warn-soft: #fff3cd;

    --logo-color: #22275a;
    --ok-soft: #dcf5e6;
    --check-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%231f9d55' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    /* grosser Cockpit-Block */
    --hero-from: #0b2a4a;
    --hero-to: #1d5fd1;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --bg: #0f141a;
        --surface: #171e26;
        --surface-2: #1e2731;
        --text: #e6ebf0;
        --muted: #9aa6b3;
        --border: #2b3642;
        --accent: #6ea2ff;
        --accent-hover: #8fb7ff;
        --accent-text: #0b1220;
        --accent-soft: #1b2a44;
        --focus: #8fb7ff;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
        --shadow-lg: 0 10px 30px rgba(0, 0, 0, .45);
        --hero-glow: #16243d;

        --ok: #3ccf7a;
        --warn: #f0b429;
        --err: #f07070;
        --warn-soft: #3a2d0a;

        --logo-color: #e6ebf0;
    --ok-soft: #133524;
    --check-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%237ee2a6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

        --hero-from: #08152a;
        --hero-to: #173f86;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0f141a;
    --surface: #171e26;
    --surface-2: #1e2731;
    --text: #e6ebf0;
    --muted: #9aa6b3;
    --border: #2b3642;
    --accent: #6ea2ff;
    --accent-hover: #8fb7ff;
    --accent-text: #0b1220;
    --accent-soft: #1b2a44;
    --focus: #8fb7ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .45);
    --hero-glow: #16243d;

    --ok: #3ccf7a;
    --warn: #f0b429;
    --err: #f07070;
    --warn-soft: #3a2d0a;

    --logo-color: #e6ebf0;
    --ok-soft: #133524;
    --check-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%237ee2a6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    --hero-from: #08152a;
    --hero-to: #173f86;
}

/* Umschalter Hell / Dunkel / System */
.hit-theme-switch {
    display: inline-flex;
    flex: none;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    line-height: 1;
}

.hit-theme-switch button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    justify-content: center;
    width: 30px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    cursor: pointer;
}

.hit-theme-switch button .fa {
    font-size: 14px;
}

.hit-theme-switch button:hover {
    background: var(--surface-2);
    color: var(--text);
}

.hit-theme-switch button[aria-pressed="true"] {
    background: var(--accent);
    color: var(--accent-text);
}

.hit-theme-switch button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 1px;
}

/* Beschriftung nur fuer Screenreader, sichtbar sind die Symbole */
.hit-theme-switch button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
