/*
 * Barrierefreiheit (WCAG 2.1 AA), beide Designs, auch für Gäste und auf der Anmeldeseite.
 * Farben nur im hellen Modus angepasst; der dunkle Modus hat eigene Werte.
 */

/* Sprunglink „Zum Inhalt“: erst bei Tastaturfokus sichtbar */
.bf-skip {
    position: fixed;
    left: 8px;
    top: -80px;
    z-index: 10050;
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff;
    color: #1f2a37 !important;
    font-weight: 600;
    text-decoration: underline;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.bf-skip:focus {
    top: 8px;
}
#layout-content:focus {
    outline: none;
}

/* Kontraste (1.4.3): gedämpfte Texte, Fehlermeldungen, Platzhalter */
html:not([data-bs-theme="dark"]) {
    --bs-secondary-color: rgba(60, 60, 60, .9);
    --hh-text-color-danger: #a8231a;
    --text-color-danger: #a8231a;
}
html:not([data-bs-theme="dark"]) .alert-danger {
    color: #a8231a;
}
html:not([data-bs-theme="dark"]) .form-control::placeholder,
html:not([data-bs-theme="dark"]) .select2-selection__placeholder {
    color: #666 !important;
    opacity: 1;
}
html:not([data-bs-theme="dark"]) .fc-other-month .fc-day-number {
    color: #6f6f6f;
}
.fc-day-top.fc-other-month {
    opacity: 1 !important; /* statt 30 % Deckkraft: Tage anderer Monate über die Farbe abgesetzt */
}
/* Beschriftung der Tab-Leiste am Handy (Design „Uffi frisch“) */
html.design-neu:not([data-bs-theme="dark"]) {
    --hh-ct-bottom-menu-text-color: #4f5a64;
}
html:not([data-bs-theme="dark"]) .label-light,
html:not([data-bs-theme="dark"]) .badge.text-bg-light {
    color: #4a5560 !important;
}

/* Eingabefelder mit sichtbarem Rahmen (1.4.11, mindestens 3:1 zum Hintergrund) */
html:not([data-bs-theme="dark"]) .form-control:not(:focus),
html:not([data-bs-theme="dark"]) .form-select:not(:focus),
html:not([data-bs-theme="dark"]) .select2-container .select2-selection {
    border-color: #8a8f94 !important;
}
html[data-bs-theme="dark"] .form-control:not(:focus),
html[data-bs-theme="dark"] .form-select:not(:focus),
html[data-bs-theme="dark"] .select2-container .select2-selection {
    border-color: rgba(255, 255, 255, .45) !important;
}

/* Links im Text nicht nur über die Farbe erkennbar (1.4.1) */
[data-ui-richtext] a:not(.btn):not(.label),
.wall-entry-container-link,
.help-block a,
.alert a:not(.btn),
.cc-message a,
.panel-body p a:not(.btn),
.panel-body :is(li, dd, dt, td, figcaption, .abfall-zeiten-name) > a:not([class]),
.panel-body > a:not([class]),
figcaption a:not(.btn),
.panel-body a[href^="tel:"]:not(.btn),
.panel-body a[href^="mailto:"]:not(.btn) {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Sichtbarer Fokus auch bei Auswahlfeldern (2.4.7), z. B. Sprachwahl in der Fußzeile */
.select2-container--focus .select2-selection,
.select2-container--open .select2-selection,
.mm-liste summary:focus-visible,
.ki-title:focus-visible {
    outline: 3px solid #446e88 !important;
    outline-offset: 2px;
}
html[data-bs-theme="dark"] .select2-container--focus .select2-selection,
html[data-bs-theme="dark"] .select2-container--open .select2-selection {
    outline-color: #9cc3dc !important;
}

/* Klickflächen mindestens 24 px (2.5.8) */
.wall-entry-header-info h4 a,
.wall-entry-header-info h5 a {
    display: inline-block;
    min-height: 24px;
    line-height: 24px;
}
.fc-event {
    min-height: 24px;
}
.showMore {
    display: inline-block;
    min-height: 24px;
    line-height: 24px;
}
.ki-age .form-check-input,
input[type="checkbox"][name="adult"] {
    width: 24px;
    height: 24px;
}
.form-button-search {
    min-width: 24px;
}

/* Gefahr-Knöpfe (Abmelden, Konto löschen): Rot des Clean-Themes (#ff3b30) hat mit Weiß nur 3,5:1 – dunkleres Rot (1.4.3) */
.btn-danger:not(.btn-outline-danger) {
    --bs-btn-bg: #c42b1c;
    --bs-btn-border-color: #c42b1c;
    --bs-btn-hover-bg: #a52414;
    --bs-btn-hover-border-color: #a52414;
    --bs-btn-active-bg: #8f1f11;
    background-color: var(--bs-btn-bg) !important;
    border-color: var(--bs-btn-border-color) !important;
    color: #fff !important;
}
.btn-danger:not(.btn-outline-danger):hover,
.btn-danger:not(.btn-outline-danger):focus-visible {
    background-color: var(--bs-btn-hover-bg) !important;
}

/* Kästchen und Optionsfelder in eigenen Formularen (Bootstrap-3-Klassen .radio/.checkbox) groß genug zum Antippen (2.5.8) */
.radio > label > input[type="radio"],
.checkbox > label > input[type="checkbox"],
label > input[type="checkbox"][name="aktiv"] {
    width: 24px;
    height: 24px;
    margin: 0 8px 0 0;
    vertical-align: -6px;
}
/* Häkchen dazu passend (z. B. „Stream-Eintrag verbergen“, „Öffentlich“ im Terminformular): Das Theme setzt ein 12-px-Symbol
   oben links in Akzentfarbe mit dunklem Zeichen – bei 24 px verrutscht und kaum lesbar. Stattdessen wie .form-check-input:
   Stahlblau mit weißem Haken in der Mitte; leerer Rand mit 3:1 Kontrast (1.4.11). Text neben dem Kästchen statt darunter. */
.checkbox > label {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    padding-left: 0;
    line-height: 1.4;
}
.checkbox > label > input[type="checkbox"] {
    flex: none;
    margin: -1px 0 0 0;
    vertical-align: 0;
    padding: 0;
    border: 2px solid #6b7680;
    border-radius: 5px;
    background-color: var(--hh-background-color-main, #fff);
}
.checkbox > label > input[type="checkbox"]:checked {
    border-color: #446e88;
    background: #446e88 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") center / 100% no-repeat;
}
.checkbox > label > input[type="checkbox"]:checked::after { content: none; }
.checkbox > label > input[type="checkbox"]:focus-visible { outline: 3px solid #e8bd3a; outline-offset: 2px; }
[data-bs-theme="dark"] .checkbox > label > input[type="checkbox"] { border-color: #9aa6b0; }
[data-bs-theme="dark"] .checkbox > label > input[type="checkbox"]:checked { border-color: #7fa9c4; background-color: #446e88; }
/* Hinweistext unter dem Kästchen bündig mit dem Text */
div.mb-3 div.checkbox .form-text { margin-left: 32px; }

/* Kommentare: Name des Verfassers nicht nur über die Farbe als Link erkennbar (1.4.1) */
.comment-heading a {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

/* „Gefällt mir“-Zähler: Link mindestens 24 px breit (2.5.8) */
a[href*="/like/like/user-list"] {
    display: inline-block;
    min-width: 24px;
    min-height: 24px;
    text-align: center;
}

/* Textabstand (1.4.12) und Umfluss (1.4.10): nichts abschneiden */
/* Untertitel im Space-Kopf: umbrechen statt „…“ (am Handy fehlte sonst die halbe Beschreibung) */
@media (max-width: 575.98px) {
    /* Kopf wächst mit dem Text mit (fest 76 px schnitt bei größerem Zeilenabstand ab); Bannerbild füllt die Fläche */
    .profile-banner-image-container {
        height: auto !important;
        min-height: 76px;
    }
    .profile-banner-image-container > .img-profile-header-background {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100% !important;
        object-fit: cover;
    }
    .profile-banner-image-container > .img-profile-data {
        position: relative !important;
        height: auto !important;
        min-height: 76px;
    }
}
.img-profile-data h2.space,
.img-profile-data h1.space {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
/* Hauptmenü am Computer: feste Höhe nur als Mindesthöhe, damit größerer Zeilenabstand nicht abgeschnitten wird */
@media (min-width: 576px) {
    #top-menu-nav > li > a {
        height: auto !important;
        min-height: 42px;
        overflow: visible !important;
    }
}
/* Fach „Mehr“: Namen bleiben einzeilig, ragen bei mehr Buchstabenabstand aber lieber etwas über als „…“ */
html.design-neu .dn-mehr .dn-ziel .dn-ziel-text {
    overflow: visible;
    text-overflow: clip;
}
/* Beitragsformular (Optionen unter „Absenden“): Theme setzt das Kästchen absolut neben einen 22-px-Einzug – passt nicht
   zu 24 px und zur Anordnung oben, deshalb auch hier Kästchen und Text nebeneinander */
.content-form-body .contentForm_options .mb-3 .checkbox > label { padding-left: 0; }
.content-form-body .contentForm_options .mb-3 .checkbox > label > input[type="checkbox"] { position: relative; top: auto; left: auto; }
/* Kalender-Terminformular („Stream-Eintrag verbergen“, „Öffentlich“): Bootstrap 5 gibt hier <input class="form-control">
   und danach <label for> als Geschwister aus (nicht im Label) – ohne das wären es 44 px hohe „Textfelder“ (neu.css)
   mit dem Text darunter. Aussehen genau wie die .form-check-Kästchen daneben („Ganztägig“, „Wiederkehrend“):
   18 px, Rand 2 px hellgrau, angehakt stahlblau mit weißem Haken, Text 12 px daneben (Wunsch Nutzer 30.10.2026). */
.checkbox { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 12px; }
.checkbox > .form-text, .checkbox > .invalid-feedback, .checkbox > .help-block { flex-basis: 100%; }
.checkbox > input[type="checkbox"] {
    flex: none;
    display: inline-block;
    width: 18px !important;
    min-width: 18px;
    height: 18px !important;
    min-height: 0 !important;
    margin: 2px 0 0 0;
    padding: 0;
    border: 2px solid #7a8086 !important;
    border-radius: 3.75px !important;
    background: var(--hh-background-color-main, #fff) !important;
    box-shadow: none !important;
}
.checkbox > input[type="checkbox"]:checked {
    border-color: #446e88 !important;
    background: #446e88 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") center / 100% no-repeat !important;
}
.checkbox > input[type="checkbox"]::after { content: none !important; }
.checkbox > input[type="checkbox"]:focus-visible { outline: 3px solid #e8bd3a; outline-offset: 2px; }
.checkbox > input[type="checkbox"] + label { flex: 1 1 0; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; cursor: pointer; }
.checkbox > label > input[type="checkbox"].form-control {
    display: inline-block; width: 24px !important; min-width: 24px; height: 24px !important; min-height: 0 !important;
    border-radius: 5px !important; box-shadow: none;
}
.checkbox > label > input[type="checkbox"].form-control:checked {
    border-color: #446e88 !important;
    background: #446e88 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") center / 100% no-repeat !important;
}
/* Die Rahmenregel für Eingabefelder (.form-control, oben) trifft diese Kästchen mit – Rand wie bei „Ganztägig“ */
html .checkbox > input[type="checkbox"].form-control:not(:checked) { border-color: #7a8086 !important; }
html .checkbox > input[type="checkbox"].form-control:checked { border-color: #446e88 !important; }

/* Leere Kästchen und Optionsfelder (Terminformular „Ganztägig“, „Wiederkehrend“, „Online event“ u. a.): Rand vom Theme
   #d7d7d7 hat nur 1,4:1 zu Weiß – #7a8086 hat 4,0:1 auf Weiß und 3,5:1 auf Sand (1.4.11, mindestens 3:1) */
html:not([data-bs-theme="dark"]) .form-check-input:not(:checked):not(:indeterminate):not(:disabled) { border-color: #7a8086 !important; }
html[data-bs-theme="dark"] .form-check-input:not(:checked):not(:indeterminate):not(:disabled),
html[data-bs-theme="dark"] .checkbox > input[type="checkbox"]:not(:checked) { border-color: #9aa6b0 !important; }
