/* ===== POLIZEI-DESIGN: #1a2535 / #c8d0dc / Georgia — F13-Frontend =====
   Ueberschreibt nur die semantischen Design-Tokens des F13-Frontends.
   Der Hochkontrastmodus ([data-theme=hcm]) bleibt unberuehrt. */
:root:not([data-theme=hcm]) {
    --polizei-dunkel:   #1a2535;
    --polizei-mittel:   #243347;
    --polizei-hell:     #c8d0dc;
    --polizei-akzent:   #3a7bbf;
    --polizei-akzent2:  #2a6099;
    --hintergrund:      #edf0f4;
    --weiss:            #ffffff;
    --text-dunkel:      #1a2535;
    --text-mittel:      #3d4f63;
    --schatten:         rgba(26, 37, 53, 0.15);

    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Text */
    --content-default:      var(--text-dunkel);
    --content-muted:        #5d6f84;
    --content-placeholder:  #74859a;
    --content-link:         var(--polizei-akzent2);
    --content-link-hover:   var(--polizei-akzent);
    --content-accent:       var(--polizei-dunkel);
    --content-on-accent:    var(--weiss);
    --content-on-primary:   var(--weiss);
    --content-info:         var(--polizei-akzent2);

    /* Flaechen */
    --layer-default:            var(--hintergrund);
    --layer-subtle:             #dde3ea;
    --layer-surface:            var(--weiss);
    --layer-surface-elevated:   var(--weiss);
    --layer-surface-control:    var(--weiss);
    --layer-inverse:            var(--polizei-dunkel);
    --layer-interactive-hover:  #e4e9ef;
    --layer-interactive-active: #d6dde6;
    --layer-disabled:           #e4e9ef;
    --layer-primary:            var(--polizei-dunkel);
    --layer-primary-hover:      var(--polizei-mittel);
    --layer-primary-active:     var(--polizei-akzent2);
    --layer-accent:             var(--polizei-akzent);
    --layer-accent-subtle:      #e3ecf6;
    --layer-info-solid:         var(--polizei-akzent2);
    --layer-info-solid-hover:   var(--polizei-mittel);
    --layer-info-solid-active:  var(--polizei-dunkel);
    --layer-info-subtle:        #e3ecf6;
    --layer-info-subtle-hover:  #d3e1f1;
    --layer-info-subtle-active: #c2d5eb;

    /* Linien */
    --stroke-default:     #d6dde6;
    --stroke-strong:      var(--polizei-dunkel);
    --stroke-interactive: var(--polizei-hell);
    --stroke-focus:       var(--polizei-akzent);
    --stroke-info:        #a9c3e2;

    /* Akzentskala, die das F13-Frontend fuer seine Markenfarbe nutzt */
    --accent-primary-50:  #e3ecf6;
    --accent-primary-100: #c2d5eb;
    --accent-primary-200: #a9c3e2;
    --accent-primary-300: #7ea7d4;
    --accent-primary-400: #5a8fc8;
    --accent-primary-500: #3a7bbf;
    --accent-primary-600: #2a6099;
    --accent-primary-700: #243347;
    --accent-primary-800: #1f2c3e;
    --accent-primary-900: #1a2535;
    --accent-primary-950: #111a26;
    --accent-secondary-50:  #edf0f4;
    --accent-secondary-100: #dde3ea;
    --accent-secondary-200: #c8d0dc;
    --accent-secondary-300: #a9b6c6;
    --accent-secondary-400: #8495aa;
    --accent-secondary-500: #5d6f84;
    --accent-secondary-600: #3d4f63;
    --accent-secondary-700: #2d3d51;
    --accent-secondary-800: #243347;
    --accent-secondary-900: #1a2535;
    --accent-secondary-950: #111a26;
}

:root:not([data-theme=hcm]) body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--hintergrund);
}

/* Kopfzeile: dunkles Navy wie .app-header der Ersuchen-Liste */
:root:not([data-theme=hcm]) body > * header,
:root:not([data-theme=hcm]) #root header {
    background-color: var(--polizei-dunkel) !important;
    box-shadow: 0 2px 8px var(--schatten);
    position: relative;
    z-index: 20;
}
:root:not([data-theme=hcm]) header nav > a {
    color: var(--polizei-hell);
}
:root:not([data-theme=hcm]) header nav > a:hover {
    color: var(--weiss);
}
/* Das Logo hat fill="#0A0A0A" fest im SVG: auf Navy hell einfaerben */
:root:not([data-theme=hcm]) header nav > a svg > g {
    fill: var(--polizei-hell);
    transition: fill 0.2s ease;
}
:root:not([data-theme=hcm]) header nav > a:hover svg > g {
    fill: var(--weiss);
}

/* Seitenleiste: Panel mit dunkler Oberkante */
:root:not([data-theme=hcm]) [data-slot=sidebar-inner] {
    border-radius: 6px;
    border-top: 3px solid var(--polizei-dunkel);
    box-shadow: 0 1px 6px var(--schatten);
}
:root:not([data-theme=hcm]) [data-sidebar=menu-button][data-active=true] {
    background-color: var(--layer-accent-subtle);
    color: var(--polizei-akzent2);
    box-shadow: inset 3px 0 0 var(--polizei-akzent);
    font-weight: 600;
}

/* Eigene Nachrichten: Navy-Blase mit heller Schrift */
:root:not([data-theme=hcm]) .justify-end > .rounded-2xl.bg-layer-surface {
    background-color: var(--polizei-mittel);
    color: var(--weiss);
    border-color: var(--polizei-mittel);
    border-radius: 6px 6px 2px 6px;
    box-shadow: 0 1px 4px var(--schatten);
}

/* Eingabefeld: Panel-Optik, Akzentrahmen beim Schreiben */
:root:not([data-theme=hcm]) [class*="_inputGroup_"] {
    border-radius: 6px;
    border-top: 3px solid var(--polizei-dunkel);
    box-shadow: 0 1px 6px var(--schatten);
}
:root:not([data-theme=hcm]) [class*="_inputGroup_"]:focus-within {
    border-color: var(--polizei-akzent);
    border-top-color: var(--polizei-dunkel);
    box-shadow: 0 0 0 2px rgba(58, 123, 191, 0.25), 0 1px 6px var(--schatten);
}

/* Ausgeblendet (gilt auch im Hochkontrastmodus):
   - DSGVO-Hinweisbanner unter der Kopfzeile (#disclaimer-text sitzt drei Ebenen tief im Banner)
   - komplette Fusszeile (Logo, Version, Impressum, Datenschutz, Nutzungsbedingungen, Kontakt) */
div:has(> [class] > [class] > #disclaimer-text),
#root footer {
    display: none !important;
}

/* ===== Handy-Ansicht (unter 768 px) ===== */
@media (max-width: 767px) {
    /* Seitenleisten-Knopf in die Navy-Kopfzeile holen statt eigener weisser Zeile */
    :root:not([data-theme=hcm]) [class*="_mobileNav_"] {
        position: absolute;
        top: 4px;
        left: 4px;
        z-index: 30;
        padding: 0;
        border: 0 !important;
        background: transparent;
    }
    :root:not([data-theme=hcm]) [class*="_mobileNav_"] button {
        color: var(--polizei-hell);
    }
    :root:not([data-theme=hcm]) [class*="_mobileNav_"] button:hover,
    :root:not([data-theme=hcm]) [class*="_mobileNav_"] button:focus-visible {
        color: var(--weiss);
        background-color: rgba(255, 255, 255, 0.10);
    }
    :root:not([data-theme=hcm]) header nav {
        padding-left: 52px;
        justify-content: space-between;
    }

    /* Mehr Platz fuer den Verlauf */
    :root:not([data-theme=hcm]) [class*="_childrenWrapper_"] {
        padding: 12px 10px calc(10px + env(safe-area-inset-bottom)) !important;
    }

    /* Nachrichten etwas kompakter, eigene Blase bis 88 % breit */
    :root:not([data-theme=hcm]) .justify-end > .rounded-2xl.bg-layer-surface {
        max-width: 88%;
        padding: 10px 14px;
    }

    /* Eingabefeld: schmalere Oberkante, unten buendig */
    :root:not([data-theme=hcm]) [class*="_inputGroup_"] {
        border-top-width: 2px;
        box-shadow: 0 -2px 10px var(--schatten);
    }

    /* Ueberschrift der Startseite nicht zu gross (Seitenleiste ausgenommen) */
    :root:not([data-theme=hcm]) :is(h1, h2):not([data-sidebar] *) {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    /* Aufklappmenue: dunkle Oberkante wie die Panels */
    :root:not([data-theme=hcm]) [data-sidebar=sidebar][data-mobile=true] {
        border-top: 3px solid var(--polizei-dunkel);
        box-shadow: 4px 0 18px rgba(0, 0, 0, 0.35);
    }
}

/* Ueberschriften wie die App-Titel: Georgia, nicht fett */
:root:not([data-theme=hcm]) :is(h1, h2, h3):not([data-sidebar] *) {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: normal;
    letter-spacing: 0.02em;
    color: var(--polizei-dunkel);
}
