/* ---------- Surfaces & Cards ---------- */
.feature-card {
    /* eigene Oberfläche, passt sich Light/Dark automatisch an */
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
    box-shadow: 0 .25rem .75rem rgba(0,0,0,.04); /* Light default */
}

/* dunkler etwas kräftigerer Schatten für mehr Tiefe */
:root[data-bs-theme="dark"] .feature-card {
    box-shadow: 0 .5rem 1.25rem rgba(0,0,0,.35);
}

/* Hover-Lift */
.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.08);
}

:root[data-bs-theme="dark"] .feature-card:hover {
    box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.45);
}

/* Card-Content-Abstände */
.feature-card .card-body {
    padding: 1.25rem 1.25rem 1rem;
}

.feature-card .card-footer {
    padding: .75rem 1.25rem;
    background-color: var(--bs-tertiary-bg);
    border-top: 1px solid var(--bs-border-color);
}

/* Icons nicht zu blass: statt fester Opacity die Theme-Secondary-Farbe nutzen */
.feature-card .fs-4 { /* nur für deine großen Icons */
    color: var(--bs-secondary-color);
    opacity: 1 !important; /* überschreibt evtl. .opacity-50 */
}

/* Knopf "Mit BundID anmelden" (Einstiegsseite und Navigation); eigenes Design, nicht das offizielle BundID-Logo */
.bundid-login-btn { background: #0b4f8a; border-color: #0b4f8a; color: #fff; }
.bundid-login-btn:hover, .bundid-login-btn:focus { background: #083c69; border-color: #083c69; color: #fff; }

/* Tab-Leiste unten auf dem Handy (Views/Shared/_TabLeiste.cshtml) */
.bp-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
}

.bp-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    padding: .45rem 0 .35rem;
    font-size: .7rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.bp-tab .bi {
    font-size: 1.25rem;
}

.bp-tab.active {
    color: var(--bp-akzent);
    font-weight: 600;
}

@media (max-width: 991.98px) {
    body.has-tabbar {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom));
    }
}

/* Tab "Konto" ist ein Knopf (oeffnet das Konto-Blatt): sieht aus wie die Links der Leiste */
button.bp-tab {
    border: 0;
    background: none;
}

/* Konto-Blatt von unten (Views/Shared/_TabLeiste.cshtml): so hoch wie der Inhalt, runde Ecken oben */
.bp-konto-blatt {
    --bs-offcanvas-height: auto;
    max-height: 85vh;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    padding-bottom: env(safe-area-inset-bottom);
}

.bp-konto-blatt .list-group-item {
    padding-top: .85rem;
    padding-bottom: .85rem;
}

/* Hinweis vor der Simulation (Views/Shared/_SimulationsHinweis.cshtml): aufklappbarer Teil, Knoepfe auf dem Handy untereinander */
.bp-sim-mehr > summary {
    color: var(--bp-akzent);
    cursor: pointer;
    min-height: 24px;
}

@media (max-width: 575.98px) {
    .bp-sim-knoepfe {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .bp-sim-knoepfe > .btn {
        width: 100%;
        margin: .25rem 0;
    }
}

/* Schnellzugriffe auf der Startseite (Handy, Views/Home/Index.cshtml): grosse Kacheln mit Symbol und Text */
.bp-schnellzugriff {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    height: 100%;
    min-height: 5.25rem;
    padding: .75rem .25rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    font-size: .8rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.bp-schnellzugriff .bi {
    font-size: 1.5rem;
}

.bp-schnellzugriff:active {
    transform: scale(.97);
}

/* Touch-Ziele mindestens 24 x 24 px (WCAG 2.2, Erfolgskriterium 2.5.8; Plan A8): Schalter 44 x 24 px statt 32 x 16 px */
.form-switch .form-check-input {
    width: 2.75em;
    height: 1.5em;
    margin-top: 0;
}

.form-switch .form-check-input + .form-check-label {
    margin-left: .5em;
}

/* Hauptmenue: aktiver Bereich */
.navbar .nav-link.active {
    color: var(--bp-akzent);
}

/* Hinweise der App unten, ueber der Tab-Leiste (Views/Shared/_AppHinweise.cshtml) */
.bp-app-hinweise {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(1rem + env(safe-area-inset-bottom));
    width: min(36rem, calc(100% - 2rem));
    /* ueber Kopfzeile (1020) und Tab-Leiste (1030), unter Dialogen (1050/1055); leere Flaeche laesst Klicks durch */
    z-index: 1045;
    pointer-events: none;
}

.bp-app-hinweise > * {
    pointer-events: auto;
}

@media (max-width: 991.98px) {
    body.has-tabbar .bp-app-hinweise {
        bottom: calc(4.5rem + env(safe-area-inset-bottom));
    }
}

/* Barrierefreiheit (BITV 2.0 / WCAG 2.1 AA, Pruefung mit axe-core): Text braucht mindestens 4,5:1 Kontrast.
   Das Bootstrap-Grau #6c757d (text-secondary, link-secondary, btn-outline-secondary) erreicht auf dem hellgrauen
   Grund der Kopf- und Fusszeile nur 4,45:1, im Dunkelmodus 2,8:1; Bootstrap-Blau auf Hellgrau 4,3:1. */
:root,
[data-bs-theme="light"] {
    --bs-secondary-rgb: 87, 94, 101;    /* #575e65: 6,2:1 auf #f8f9fa */
    --bp-akzent: #0a58ca;               /* aktiver Menuepunkt und Tab: 6,1:1 auf #f8f9fa */
}

[data-bs-theme="dark"] {
    --bs-secondary-rgb: 173, 181, 189;  /* #adb5bd: 6,4:1 auf #2b3035 */
    --bp-akzent: #8bb9fe;               /* 6,6:1 auf #2b3035 */
}

.btn-outline-secondary {
    --bs-btn-color: rgb(var(--bs-secondary-rgb));
    --bs-btn-border-color: rgb(var(--bs-secondary-rgb));
    --bs-btn-hover-bg: rgb(var(--bs-secondary-rgb));
    --bs-btn-hover-border-color: rgb(var(--bs-secondary-rgb));
    --bs-btn-active-bg: rgb(var(--bs-secondary-rgb));
    --bs-btn-active-border-color: rgb(var(--bs-secondary-rgb));
}

[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-hover-color: #212529;
    --bs-btn-active-color: #212529;
}

/* Blau-Rand-Knoepfe in beiden Schemata mit der Akzentfarbe (Bootstrap-Blau auf hellem Grund: 4,3:1) */
.btn-outline-primary {
    --bs-btn-color: var(--bp-akzent);
    --bs-btn-border-color: var(--bp-akzent);
}

/* Dunkelmodus: Abzeichen auf hellem Grau mit dunkler Schrift (weiss auf #adb5bd: 2,1:1), Blau-Text heller */
[data-bs-theme="dark"] .text-bg-secondary {
    color: #212529 !important;
}

[data-bs-theme="dark"] .text-primary {
    color: var(--bp-akzent) !important;
}

/* Tuerkis-Rand-Knopf (Startseite): Bootstrap-Tuerkis auf Weiss 2,0:1 -> dunkleres Tuerkis 5,1:1 */
[data-bs-theme="light"] .btn-outline-info,
:root:not([data-bs-theme="dark"]) .btn-outline-info {
    --bs-btn-color: #087990;
    --bs-btn-border-color: #087990;
}

/* Dunkelmodus: Gruen-Text heller (Bootstrap-Gruen auf #212529: 3,4:1 -> #75b798: 6,6:1) */
[data-bs-theme="dark"] .text-success {
    color: #75b798 !important;
}

/* Dunkelmodus: Rot-Text heller (Bootstrap-Rot auf #212529 3,4:1 -> #ea868f 6,1:1), z. B. "Abmelden" im Konto-Blatt */
[data-bs-theme="dark"] .text-danger {
    color: #ea868f !important;
}

/* Sprunglink fuer Tastatur und Screenreader (Views/Shared/_Navbar.cshtml) */
.bp-sprunglink:focus {
    position: fixed;
    top: .5rem;
    left: .5rem;
    z-index: 1100;
    padding: .5rem 1rem;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 2px solid var(--bp-akzent);
    border-radius: .375rem;
}
