html { min-height: 100%; }
body { min-height: 100vh; }
main { min-width: 0; }
footer { flex-shrink: 0; }
.navbar-logo { width: 36px; height: 42px; object-fit: contain; }
.landing-hero { border-top: .3rem solid var(--bs-danger) !important; }
.landing-logo { width: min(180px, 45vw); height: auto; filter: drop-shadow(0 .3rem .65rem rgba(0,0,0,.12)); }
.incident-link { text-decoration: none; }
.incident-link:hover { text-decoration: underline; }
.rich-content img { max-width: 100%; height: auto; }
.gallery-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.vehicle-image { width: 100%; height: 120px; object-fit: contain; }
.map-frame { width: 100%; min-height: 320px; border: 0; }
.multiselect { min-height: 15rem; }
.legacy-note { font-size: .875rem; }
.legal-content { line-height: 1.65; }
.legal-content h2 { scroll-margin-top: 6rem; }
.legal-content address { font-style: normal; }
@media (max-width: 575.98px) {
    .landing-hero .display-6 { font-size: 2rem; }
}

/* Einsatzübersicht: Jahresauswahl als kompakte Buttonleiste */
.incident-year-nav {
    position: relative;
}
.incident-year-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.incident-year-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-weight: 600;
}
.incident-table td,
.incident-table th {
    vertical-align: middle;
}

/* Einsatzdetail-Navigation */
.incident-navigation .btn { min-width: 9.5rem; }

/* Nutzerfreundliche Mehrfachauswahl im Backend */
.multi-picker-options {
    max-height: 22rem;
    overflow-y: auto;
    background: var(--bs-body-bg);
}
.multi-picker-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .8rem;
    margin: 0;
    cursor: pointer;
    border-bottom: 1px solid var(--bs-border-color);
    transition: background-color .12s ease-in-out;
}
.multi-picker-option:last-of-type { border-bottom: 0; }
.multi-picker-option:hover { background: var(--bs-tertiary-bg); }
.multi-picker-option:has(input:checked) { background: var(--bs-danger-bg-subtle); }
.multi-picker-option-legacy { background: var(--bs-warning-bg-subtle); }
.multi-picker-option.d-none { display: none !important; }

/* Foto-Lightbox */
.gallery-trigger { cursor: zoom-in; }
.gallery-trigger:focus-visible {
    outline: .2rem solid rgba(var(--bs-danger-rgb), .5);
    outline-offset: .2rem;
    border-radius: var(--bs-border-radius);
}
.photo-modal .modal-dialog { max-width: min(94vw, 1400px); }
.photo-modal-image {
    display: block;
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    background: #111;
}
.photo-modal-caption { min-height: 1.5rem; }
.photo-modal-close {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 1;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.65));
}

@media (max-width: 575.98px) {
    .incident-navigation { width: 100%; }
    .incident-navigation .btn { min-width: 0; flex: 1 1 50%; }
    .multi-picker .input-group { flex-wrap: wrap; }
    .multi-picker .input-group > .form-control { flex-basis: 100%; width: 100%; border-radius: var(--bs-border-radius-sm) !important; margin-bottom: .4rem; }
    .multi-picker .input-group > .btn:first-of-type { border-top-left-radius: var(--bs-border-radius-sm); border-bottom-left-radius: var(--bs-border-radius-sm); }
}
@media (max-width: 575.98px) {
    .incident-year-nav {
        margin-left: calc(-1 * var(--bs-gutter-x) * .5);
        margin-right: calc(-1 * var(--bs-gutter-x) * .5);
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    .incident-year-buttons {
        flex-wrap: nowrap;
        width: max-content;
        min-width: 100%;
        padding: 0 calc(var(--bs-gutter-x) * .5) .4rem;
    }
    .incident-year-button {
        flex: 0 0 auto;
        min-height: 2.75rem;
    }
    .incident-table thead {
        display: none;
    }
    .incident-table,
    .incident-table tbody,
    .incident-table tr,
    .incident-table td {
        display: block;
        width: 100%;
    }
    .incident-table tr {
        padding: .85rem 1rem;
        border-bottom: 1px solid var(--bs-border-color);
    }
    .incident-table tr:last-child {
        border-bottom: 0;
    }
    .incident-table td {
        padding: 0;
        border: 0;
        white-space: normal !important;
    }
    .incident-table td:first-child {
        margin-bottom: .2rem;
        color: var(--bs-secondary-color);
        font-size: .875rem;
    }
    .incident-table .incident-link {
        display: block;
        font-size: 1rem;
        line-height: 1.35;
    }
}

