/* Barrierefreiheit (24.10.2026) – nur geladen bei TI_BARRIEREFREI = true (config.php). Datei weglassen = alter Zustand.
   Ziel WCAG 2.2 AA; Befunde aus axe-core (Kontrast, Links im Text, Klickflächen). */

/* ---------- 1. Kontrast: Grautöne des Themes (#979797 = 2,9:1, #888 = 3,5:1) auf mindestens 4,5:1 ---------- */
.uk-text-meta, .uk-table th, .uk-breadcrumb > * > *, dt, .uk-text-muted { color: #5f6770 !important; }
.ti-bp-balken-zusatz, .ti-bp-check-hinweis { color: #5f6770 !important; }
.ti-bp-hinweis-kopf[style*="b5651d"], .ti-bp-achtung .ti-bp-hinweis-kopf { background: #96501a !important; }
.ti-q.ti-q2 { background: #3e7526 !important; }
.ti-q.ti-q3 { background: #c98a00 !important; color: #1d1d1d !important; }
.ti-vb-link { color: #003152 !important; }
.ti-treffer-art { color: #b8004b !important; }

/* ---------- 2. Links im Fließtext nicht nur über die Farbe erkennbar ---------- */
main p a:not(.uk-button):not(.uk-label), main .uk-list-bullet a, main td a, main dd a, .ti-quellen a,
.custom-html-widget a, main .ti-bp-dk-liste a, main li > a:not(.uk-button):not([class]) {
  text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px;
}

/* ---------- 3. Klickflächen mindestens 24 px ---------- */
.ti-quellen a, main li > a[target="_blank"] { display: inline-block; min-height: 24px; line-height: 24px; }

/* ---------- 4. Tastatur: deutlich sichtbarer Fokus, Sprunglink ---------- */
:focus-visible { outline: 3px solid #D60059 !important; outline-offset: 2px; }
.ti-sprunglink { position: absolute; left: 8px; top: -60px; z-index: 10000; background: #003152; color: #fff !important; padding: 10px 16px; font-weight: 700; }
.ti-sprunglink:focus { top: 8px; }

/* ---------- 5. Menü „Ansicht & Barrierefreiheit“ ---------- */
.ti-ansicht-knopf { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: #003152; background: none; border: 0; cursor: pointer; margin-right: 4px; }
.ti-ansicht-knopf:hover { color: #D60059; }
.ti-ansicht-kopfzeile { display: flex; align-items: center; }
.ti-ansicht .uk-offcanvas-bar { background: #fff; color: #3f3f3f; width: 340px; padding: 24px 22px; border-left: 4px solid #003152; }
.ti-ansicht .uk-offcanvas-close { color: #003152; }
.ti-ansicht h2 { font-size: 1.15rem; color: #003152; margin: 0 0 4px; }
.ti-ansicht h3 { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #5f6770; margin: 20px 0 8px; }
.ti-ansicht-gruppe { display: flex; flex-wrap: wrap; gap: 6px; }
.ti-ansicht-gruppe button { flex: 1 1 auto; min-height: 36px; padding: 4px 10px; background: #fff; border: 1px solid #c9d3dc; color: #003152; font-size: .85rem; cursor: pointer; }
.ti-ansicht-gruppe button[aria-pressed="true"] { background: #003152; border-color: #003152; color: #fff; }
.ti-ansicht-schalter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e5e5e5; font-size: .9rem; cursor: pointer; }
.ti-ansicht-schalter input { width: 20px; height: 20px; accent-color: #003152; }
.ti-ansicht-fuss { margin-top: 22px; font-size: .8rem; color: #5f6770; }

/* ---------- 6. Einstellungen des Menüs ---------- */
html.ti-schrift-1 :is(main, footer) { zoom: 1.12; }
html.ti-schrift-2 :is(main, footer) { zoom: 1.25; }
html.ti-links a:not(.uk-button):not(.uk-navbar-toggle):not(.uk-search-toggle) { text-decoration: underline !important; text-underline-offset: 2px; }
html.ti-kontrast main :is(p, li, td, th, dd, dt, .uk-text-meta, .uk-text-small):not(.ti-s2-held *):not(.uk-light *) { color: #000 !important; }
html.ti-kontrast .ti-s2-held :is(h1, .ti-s2-held-innen > p, .ti-s2-schnell a) { color: #fff !important; }
html.ti-kontrast main a:not(.uk-button):not(.ti-s2-held *) { color: #00264a !important; }
html.ti-kontrast .uk-card-default, html.ti-kontrast .ti-bp-hinweis { border: 2px solid #000 !important; box-shadow: none !important; }
html.ti-kontrast .ti-s2-held:before { background: rgba(0, 20, 35, .72) !important; }
html.ti-ohne-bewegung *, html.ti-ohne-bewegung *::before, html.ti-ohne-bewegung *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* ---------- 7. Titelbild: Pause-Knopf im Bild (WCAG 2.2.2), Vorschau-Schalter wandern ins Menü ---------- */
.ti-ansicht-an .ti-s6-schalter { display: none; }
.ti-s6-pause { position: absolute; right: 14px; bottom: 14px; z-index: 3; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(0, 30, 50, .6); color: #fff; border: 1px solid rgba(255, 255, 255, .5); cursor: pointer; }
.ti-s6-pause:hover { background: #D60059; }
.angehalten, .angehalten * { animation-play-state: paused !important; }
.ti-treffer mark, .ti-seiten-treffer mark { color: #1d1d1d !important; }
html.ti-kontrast main .uk-active > a:not(#_), html.ti-kontrast main .uk-button-primary:not(#_) { color: #fff !important; }
.ti-erledigt span { color: #5f6770 !important; }   /* erledigte Checklistenpunkte: durchgestrichen, aber lesbar (≥ 4,5:1) */
