:root, [data-bs-theme="light"] {
    --flr-red: #E82C2A;
    --flr-red-h: #DB3532;
    --bk-red: #E82C2A;
    --bk-red-h: #F52F2C;
    --bk-red-a: #FF3633;
    --bk-secondary: #6c757d;
    --bk-secondary-h: #76818A;
    --bk-secondary-a: #7D8891;
    --bk-green: #1C9945;
    --bk-green-h: #1FA64C;
    --bk-green-a: #22B352;
    --bk-cookieBg: rgba(33, 37, 41, 0.95);
    --bk-cookieText: #FFFFFF;
    --bk-lightgray: #dee2e6;
    --bk-gray: #F2F2F2;
    /* Höhe der verkleinerten Kopfleiste beim Scrollen, für Abstände von fixierten Elementen */
    --flr-navbar-compact-h: 50px;
}

/* Sprungziele (Anker, scrollIntoView) nicht unter der fixierten Kopfleiste verstecken.
   Gescrollt wird in main (Blazor.Bootstrap: height 100vh, overflow-x hidden), nicht im Fenster */
main, .main {
    scroll-padding-top: calc(var(--flr-navbar-compact-h) + 8px);
}

/* <main> umschließt nur den Inhalt im Scroll-Container .main (MainLayout): Blazor.Bootstrap gibt jedem main height 100vh, hier zurücknehmen,
   damit der Inhalt mitwächst und der Footer unten bleibt */
.flr-inhalt {
    flex: 1 0 auto;
    height: auto;
    overflow: visible;
}

[data-bs-theme="dark"] {
    --bk-secondary: #6c757d;
    --bk-cookieBg: rgba(255, 255, 255, 0.95);
    --bk-cookieText: #212529;
    --bk-green: #13B958;
    --bk-lightgray: #dee2e6;
}
.text-orange{
    color: #FF8000 !important;
}

.fs-7 {
    font-size: 0.75rem !important
}

.flr-section {
    background: #ffffff;
    border-radius: var(--bs-border-radius);
    border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
    padding: 14px;
    overflow: hidden;
}
.flr-badge {
    font-weight: 500;
    font-size: 12px;
    background-color: var(--bk-lightgray);
    color: var(--bs-boy-color);
    padding: 3px 6px;
    text-align: center;
    border-radius: var(--bs-border-radius);
}
.flr-badge-sm {
    font-weight: 500;
    font-size: 12px;
    background-color: var(--bk-lightgray);
    color: var(--bs-boy-color);
    padding: 1px 4px;
    text-align: center;
    border-radius: var(--bs-border-radius);

}


.flr-btn {
    background: var(--bk-red);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: var(--bs-border-radius);
    transition: all 0.1s ease;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
    text-align: center !important;
    cursor: pointer;
}
    .flr-btn:hover {
        background: var(--bk-red-h);
    }

/* Listenseiten (Gruppen, Ergebnisse): Karte mit Suche und Filtern oben, Abschnitts-Überschriften und zweizeiligen Einträgen.
   Mobil Suche über die ganze Breite, darunter die Filter; ab md in einer Zeile. */
.flr-liste-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--bs-border-color);
}

.flr-liste-suche {
    position: relative;
    flex: 1 1 auto;
}

    .flr-liste-suche i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--bs-secondary-color);
        pointer-events: none;
    }

    .flr-liste-suche input {
        padding-left: 36px;
    }

/* stretch: Länder-Schaltflächen, Auswahlfelder und Zurücksetzen gleich hoch */
.flr-liste-filter-optionen {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
}

/* Auswahlfeld nimmt den Platz neben AT/DE ein, damit mobil alles in einer Zeile steht */
.flr-liste-auswahl {
    flex: 1 1 130px;
    min-width: 0;
    max-width: 220px;
}

.flr-liste-zuruecksetzen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (min-width: 768px) {
    .flr-liste-filter {
        flex-direction: row;
        align-items: center;
    }

    .flr-liste-suche {
        max-width: 420px;
    }
}

/* Jahr mit Pfeilen zum Umschalten ("‹ 2026 ›"), auf der Terminseite und der Bewerbskarte */
.flr-jahr-wechsel {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

    .flr-jahr-wechsel .btn {
        color: var(--bs-secondary-color);
        font-size: 1.1rem;
    }

        .flr-jahr-wechsel .btn:hover {
            color: var(--bk-red);
        }

        .flr-jahr-wechsel .btn:disabled {
            color: var(--bs-secondary-color);
            opacity: 0.3;
        }

/* Anzahl der Einträge */
.flr-liste-meta {
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

/* Link rechts in der Meta-Zeile (z. B. "Auf der Karte ansehen" bei den Terminen) */
.flr-liste-meta-link {
    color: var(--bk-red);
    font-weight: 600;
    text-decoration: none;
}

    .flr-liste-meta-link:is(:hover, :focus-visible) {
        text-decoration: underline;
    }

/* Zwischenüberschrift (Anfangsbuchstabe, Jahr) */
.flr-liste-abschnitt {
    padding: 4px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    background: var(--bk-gray);
    border-top: 1px solid var(--bs-border-color);
}

/* Eintrag: Symbol/Flagge, Name, darunter die Angaben; rechts Zusatz. Ganze Zeile anklickbar (stretched-link am Namen) */
.flr-liste-eintrag {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--bs-border-color);
    transition: background-color .15s ease;
}

    .flr-liste-eintrag:hover {
        background: #fafafa;
    }

.flr-liste-eintrag-text {
    min-width: 0;
}

.flr-liste-eintrag-name {
    font-weight: 500;
    color: var(--bs-body-color);
    text-decoration: none;
}

.flr-liste-eintrag:hover .flr-liste-eintrag-name {
    color: var(--bk-red);
}

.flr-liste-eintrag-details {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

.flr-liste-eintrag-rechts {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

/* Zeile eines Termins (Terminseite und Bewerbskarte) */
/* Vergangene Bewerbe in einem Jahr mit kommenden gedämpft */
.flr-termin-vorbei {
    opacity: .6;
}

    .flr-termin-vorbei:hover {
        opacity: 1;
    }

.flr-termin-anmeldung {
    background-color: var(--bk-green);
    color: white;
    vertical-align: text-bottom;
}

.flr-termin-kategorie {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: -3px;
}

.flr-termin-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

/* Rechts: Wochentag (Karte: Entfernung), darunter "in X Tagen" */
.flr-termin-rechts {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.flr-termin-tage {
    font-weight: 600;
    color: var(--bs-body-color);
}

/* Mobil: zweite Zeile kürzen statt umbrechen, damit rechts Platz bleibt */
@media (max-width: 767.98px) {
    .flr-liste-eintrag-details {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.flr-liste-leer {
    padding: 24px 16px;
    text-align: center;
    color: var(--bs-secondary-color);
    border-top: 1px solid var(--bs-border-color);
}

/* Einträge in den Karten der Startseite (TableBewerbe, TableErgebnisse, TableGruppen):
   links Flagge oder Datumsblatt, Name, darunter Angaben; rechts kleiner Zusatz. Die ganze Zeile ist anklickbar (stretched-link). */
.flr-karte-eintrag {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-top: 1px solid var(--bs-border-color);
    transition: background-color .15s ease;
}

    .flr-karte-eintrag:hover {
        background: #fafafa;
    }

.flr-karte-eintrag-text {
    min-width: 0;
    flex: 1 1 auto;
}

.flr-karte-eintrag-name {
    display: block;
    font-weight: 600;
    color: var(--bs-body-color);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flr-karte-eintrag:hover .flr-karte-eintrag-name {
    color: var(--bk-red);
}

.flr-karte-eintrag-details {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flr-karte-eintrag-rechts {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

/* Datumsblatt (Tag groß, Monat klein in Rot) für anstehende Bewerbe */
.flr-datumsblatt {
    flex-shrink: 0;
    width: 42px;
    padding: 3px 0;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    text-align: center;
    line-height: 1.1;
}

    .flr-datumsblatt span:first-child {
        display: block;
        font-size: 1.05rem;
        font-weight: 600;
    }

    .flr-datumsblatt span:last-child {
        display: block;
        font-size: 0.65rem;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--bk-red);
    }

/* Rücksprung-Ziel kurz neutral grau hervorheben (focusReturnAnchor in flr-custom.js). Bei Tabellen tragen die Zellen den Hintergrund, daher auch > td */
.flr-ruecksprung,
.flr-ruecksprung > td {
    animation: flr-ruecksprung 1.8s ease-out;
}

@keyframes flr-ruecksprung {
    0%, 35% {
        background-color: rgba(108, 117, 125, 0.16);
    }

    100% {
        background-color: transparent;
    }
}

/* Links im Button-Stil (<a class="flr-btn">) brauchen inline-block, sonst greifen Breite (w-100) und Abstände nicht.
   Früher erledigte das indirekt Bootstraps appearance: button über type="button", aktuelle Browser ignorieren das bei Links. */
a.flr-btn, a.flr-btn-secondary, a.flr-btn-green {
    display: inline-block;
}
    .flr-btn:active {
        background: var(--bk-red-a);
    }
    .flr-btn:disabled {
        pointer-events: none;
        background-color: var(--bs-gray-200);
        color: var(--bs-gray-600);
        user-select: none;
    }

.flr-btn-secondary {
    background: var(--bk-secondary);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: var(--bs-border-radius);
    transition: all 0.1s ease;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
    text-align: center !important;
    cursor: pointer;
}

    .flr-btn-secondary:hover {
        background: var(--bk-secondary-h);
    }
    .flr-btn-secondary:active {
        background: var(--bk-secondary-a);
    }
    .flr-btn-secondary:disabled {
        pointer-events: none;
        background-color: var(--bs-gray-200);
        color: var(--bs-gray-600);
        user-select: none;
    }

.flr-btn-green {
    background: var(--bk-green);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: var(--bs-border-radius);
    transition: all 0.1s ease;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
    text-align: center !important;
    cursor: pointer;
}

    .flr-btn-green:hover {
        background: var(--bk-green-h);
    }
    .flr-btn-green:active {
        background: var(--bk-green-a);
    }
    .flr-btn-green:disabled {
        pointer-events: none;
        background-color: var(--bs-gray-200);
        color: var(--bs-gray-600);
        user-select: none;
    }


.flr-bg-red {
    background: var(--flr-red) !important;
    background-color: var(--flr-red) !important;
    color: white !important;
}

.theme-red {
    background: var(--flr-red);
    color: white;
}


.theme-red .navbar-brand {
    color: white;

}

.theme-red .nav-item .nav-link {
    color: white;
    opacity: 0.65;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.theme-red .nav-item .nav-link:is(:hover, :focus, :active) {
    color: white;
    opacity: 1;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}


.theme-red .nav-item .nav-link.active {
    opacity: 1;
    color: white
}




.theme-red .navbar-brand:is(:hover, :focus, :active) {
    color: white;
    opacity: 1;
}

.dropdown-menu li:hover {
    cursor: pointer;
}


.flr-badge-btn {
    font-weight: 500;
    font-size: 14px;
    background-color: var(--bk-lightgray);
    color: var(--bs-boy-color);
    padding: 5px 10px;
    text-align: center;
    border-radius: var(--bs-border-radius);
    border: none;
    transition: all 0.2s ease;
}

.flr-badge-btn-sm {
    font-weight: 500;
    font-size: 12px;
    background-color: var(--bk-lightgray);
    color: var(--bs-boy-color);
    padding: 4px 8px;
    text-align: center;
    border-radius: var(--bs-border-radius);
    border: none;
    transition: all 0.2s ease;
}

.flr-badge-btn-active {
    background-color: var(--flr-red);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    color: white;
    transform: scale(1.03);
}

.flr-badge-btn:hover:active {
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    transform: scale(1.03);
}

.invalid {
    border-color: var(--bs-form-invalid-border-color) !important;
}


.flr-table-width-small {
    width: 30px;
}

.col-id-min {
    width: 1%;
    white-space: nowrap;
    font-size: 12px;
    text-align: center;
}
/* QuickGrid füllt bei Pagination jede Seite mit Leerzeilen (nur leere <td>) auf ItemsPerPage auf – diese ausblenden */
table tbody tr:not(:has(> td:not(:empty))) {
    display: none;
}

/* FocusOnNavigate (Routes.razor) setzt nach jeder Navigation den Fokus auf den Seitenkopf (für Screenreader).
   Nach einer Tastatureingabe zeigt der Browser dafür einen Fokusrahmen – der Kopf ist kein Bedienelement, daher ausblenden */
#page-header:focus {
    outline: none;
}

/* Moderator-Tabellen: Der Container scrollt waagrecht und schneidet damit auch das Aktionen-Dropdown ab.
   Mindesthöhe, damit das Menü auch bei nur ein, zwei Treffern ganz sichtbar ist */
.flr-mod-tabelle {
    min-height: 50vh;
}

/* Bewerbskarte (flr-custom.js bewerbskarte*): Punkte und Popup werden per JavaScript erzeugt, daher hier statt im Scoped-CSS.
   Punkt wie auf der Startseite (BewerbePunkteKarte): rot mit weißem Rand */
.flr-kartenpunkt {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bk-red);
    border: 2px solid #fff;
    box-shadow: 0 0 2px rgba(0, 0, 0, .4);
    transform: translateY(50%); /* Marker sitzen sonst mit der Unterkante auf dem Ort */
    cursor: pointer;
}

    .flr-kartenpunkt:hover {
        transform: translateY(50%) scale(1.3);
    }

    .flr-kartenpunkt.flr-kartenpunkt-aktiv {
        transform: translateY(50%) scale(1.4);
        background: #b91c1a;
        box-shadow: 0 0 0 3px rgba(232, 44, 42, .3);
    }

    /* Bewerb ist schon vorbei (Bewerbskarte, laufendes oder vergangenes Jahr) */
    .flr-kartenpunkt.flr-kartenpunkt-vergangen {
        background: #9aa0a6;
    }

        .flr-kartenpunkt.flr-kartenpunkt-vergangen.flr-kartenpunkt-aktiv {
            background: #6c757d;
            box-shadow: 0 0 0 3px rgba(108, 117, 125, .3);
        }

/* Bewerbskarte: Hülle um die Karte, darüber das Info-Feld */
.flr-bewerbskarte-huelle {
    position: relative;
}

/* Info-Feld unten in der Karte (Klick auf einen Punkt); lässt unten Platz für Googles Logo und Hinweise */
.flr-karteninfo {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: min(420px, calc(100% - 20px));
    padding: 10px 12px 12px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

    .flr-karteninfo.flr-karteninfo-offen {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }

.flr-karteninfo-zu {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--bs-secondary-color);
}

    .flr-karteninfo-zu:hover {
        background: var(--bk-lightgray);
        color: var(--bs-body-color);
    }

/* Inhalt des Info-Felds: Name, darunter Datum, Ort, Bewerbsart und roter Knopf */
.flr-kartenpopup-titel {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
    color: var(--bs-body-color);
    padding-right: 30px;
    margin-bottom: 6px;
}

.flr-kartenpopup {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--bs-body-color);
}

.flr-kartenpopup-zeile {
    display: flex;
    align-items: center;
    gap: 7px;
}

    .flr-kartenpopup-zeile > i,
    .flr-kartenpopup-zeile > img {
        flex: 0 0 14px;
        color: var(--bs-secondary-color);
        font-size: 0.85rem;
        text-align: center;
    }

.flr-kartenpopup-tage {
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

    .flr-kartenpopup-tage::before {
        content: "· ";
    }

a.flr-kartenpopup-link {
    display: block;
    margin-top: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
}

    a.flr-kartenpopup-link:focus-visible {
        outline: 2px solid var(--bk-red);
        outline-offset: 2px;
    }
