/**
 * Delta Web Solution · Accessibility-Styles
 * Default: KEINE Veränderung an der Site
 * Aktiv nur wenn body[data-a11y-*] gesetzt ist
 */

/* ─── Sticky-Trigger-Button (links unten) ─── */
.dw-a11y-trigger {
    position: fixed; bottom: 24px; left: 24px;
    width: 56px; height: 56px;
    background: #003B5C; color: #fff;
    border: 3px solid #EFF631;
    border-radius: 50%; cursor: pointer;
    z-index: 9990;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3), 0 0 0 4px rgba(239, 246, 49, .15);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; line-height: 1;
    transition: transform .25s, box-shadow .25s;
}
.dw-a11y-trigger:hover { transform: scale(1.08); box-shadow: 0 14px 30px rgba(0, 0, 0, .4), 0 0 0 6px rgba(239, 246, 49, .25); }
.dw-a11y-trigger:focus-visible { outline: 4px solid #EFF631; outline-offset: 4px; }

@media (max-width: 768px) {
    .dw-a11y-trigger { bottom: 16px; left: 16px; width: 48px; height: 48px; font-size: 22px; }
}

/* ─── Panel-Modal ─── */
.dw-a11y-panel { position: fixed; inset: 0; z-index: 9991; display: none; }
.dw-a11y-panel.is-open { display: block; }
.dw-a11y-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); cursor: pointer; }
.dw-a11y-card {
    position: absolute; bottom: 24px; left: 24px;
    width: 360px; max-width: calc(100vw - 32px); max-height: calc(100vh - 48px);
    background: #fff; color: #0A1620;
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
    display: flex; flex-direction: column;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}
@media (max-width: 768px) {
    .dw-a11y-card { left: 16px; right: 16px; bottom: 16px; width: auto; }
}

.dw-a11y-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; background: linear-gradient(135deg, #003B5C, #001a2a); color: #fff;
}
.dw-a11y-head h3 { font-size: 16px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.dw-a11y-close {
    background: rgba(255, 255, 255, .15); border: 0; color: #fff; width: 30px; height: 30px;
    border-radius: 50%; cursor: pointer; font-size: 14px; transition: background .25s;
}
.dw-a11y-close:hover { background: #EFF631; color: #000; }

.dw-a11y-body { padding: 16px 18px; overflow-y: auto; }
.dw-a11y-section { margin-bottom: 16px; }
.dw-a11y-section > label {
    display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px;
    color: rgba(10, 22, 32, .65); letter-spacing: 1.2px; text-transform: uppercase;
    font-weight: 700; margin-bottom: 8px;
}
.dw-a11y-fs { display: flex; gap: 6px; }
.dw-a11y-fs button {
    flex: 1; padding: 10px 8px; background: #f4f7fb; border: 1px solid rgba(0, 55, 91, .15);
    border-radius: 8px; cursor: pointer; font-family: inherit; font-weight: 800;
    transition: all .2s; color: #003B5C;
}
.dw-a11y-fs button:nth-child(1) { font-size: 13px; }
.dw-a11y-fs button:nth-child(2) { font-size: 15px; }
.dw-a11y-fs button:nth-child(3) { font-size: 18px; }
.dw-a11y-fs button:nth-child(4) { font-size: 22px; }
.dw-a11y-fs button:hover { background: rgba(239, 246, 49, .2); border-color: #EFF631; }
.dw-a11y-fs button.is-active { background: #003B5C; color: #EFF631; border-color: #003B5C; }

.dw-a11y-toggles { display: flex; flex-direction: column; gap: 8px; }
.dw-a11y-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; background: #f8fafc; border: 2px solid rgba(0, 55, 91, .12);
    border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 13px;
    color: #0A1620; text-align: left; font-weight: 600;
    transition: all .2s;
    position: relative;
}
.dw-a11y-toggle-label { flex: 1; min-width: 0; }
.dw-a11y-toggle-state {
    font-family: 'JetBrains Mono', monospace; font-size: 10px;
    letter-spacing: .12em; font-weight: 800;
    padding: 4px 8px; border-radius: 5px;
    background: rgba(91, 104, 120, .14); color: #5B6878;
    border: 1px solid transparent;
    flex-shrink: 0;
    transition: background .2s, color .2s, border-color .2s;
}
.dw-a11y-toggle:hover { background: #fff; border-color: rgba(239, 246, 49, .55); }
/* Switch ist ein <span> — explizit inline-block, sonst kollabiert es auf 0px */
.dw-a11y-switch {
    display: inline-block !important;
    width: 42px !important; height: 24px !important;
    background: rgba(0, 55, 91, .18);
    border-radius: 99px; position: relative; transition: background .25s;
    flex-shrink: 0; vertical-align: middle;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .15);
}
.dw-a11y-knob {
    display: block;
    position: absolute; left: 3px; top: 3px;
    width: 18px !important; height: 18px !important; background: #fff;
    border-radius: 50%; transition: transform .25s, background .25s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}
.dw-a11y-toggle.is-on {
    background: linear-gradient(135deg, rgba(239, 246, 49, .18), rgba(239, 246, 49, .05));
    border-color: #EFF631;
    box-shadow: 0 0 0 3px rgba(239, 246, 49, .12);
}
.dw-a11y-toggle.is-on .dw-a11y-toggle-state {
    background: #003B5C; color: #EFF631;
    border-color: #EFF631;
}
.dw-a11y-toggle.is-on .dw-a11y-switch { background: #003B5C; }
.dw-a11y-toggle.is-on .dw-a11y-knob { transform: translateX(18px); background: #EFF631; }

.dw-a11y-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(0, 55, 91, .1); }
.dw-a11y-reset {
    width: 100%; padding: 11px; background: transparent; border: 1px dashed rgba(0, 55, 91, .25);
    border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px;
    color: rgba(10, 22, 32, .65); transition: all .2s;
}
.dw-a11y-reset:hover { background: #fff5f5; border-color: #dc2626; color: #dc2626; }

body.dw-a11y-locked { overflow: hidden; }


/* ═══════════════════════════════════════════════════════════
   AKTIVE FEATURES — wirken nur wenn body[data-a11y-*] = '1'
   ═══════════════════════════════════════════════════════════ */

/* ─── Schriftgröße — html font-size + erzwungene Skalierung auf Text-Selektoren ───
   Strategie: html font-size für rem-basierte Texte, plus explizite Skalierung
   per CSS-Variable für px-basierte Texte. */
html[data-a11y-fontsize="125"] { font-size: 112.5% !important; }
html[data-a11y-fontsize="150"] { font-size: 125% !important; }
html[data-a11y-fontsize="200"] { font-size: 150% !important; }

/* CSS-Variable mit Skalierungsfaktor — kann per calc() überall eingesetzt werden */
body[data-a11y-fontsize="100"] { --a11y-fs: 1; }
body[data-a11y-fontsize="125"] { --a11y-fs: 1.15; }
body[data-a11y-fontsize="150"] { --a11y-fs: 1.30; }
body[data-a11y-fontsize="200"] { --a11y-fs: 1.55; }

/* Direkte Skalierung aller Text-Elemente (px-Basis) — :where() hält Spezifität niedrig,
   so dass spezifische Element-Styles cascadieren, aber !important erzwingt Override */
body[data-a11y-fontsize="125"] :where(p, li, td, th, label, span, a, button, input, select, textarea, blockquote, dt, dd, summary):not(.dw-a11y-icon):not(.dw-a11y-switch):not(.dw-a11y-knob):not(.dw-a11y-card *),
body[data-a11y-fontsize="150"] :where(p, li, td, th, label, span, a, button, input, select, textarea, blockquote, dt, dd, summary):not(.dw-a11y-icon):not(.dw-a11y-switch):not(.dw-a11y-knob):not(.dw-a11y-card *),
body[data-a11y-fontsize="200"] :where(p, li, td, th, label, span, a, button, input, select, textarea, blockquote, dt, dd, summary):not(.dw-a11y-icon):not(.dw-a11y-switch):not(.dw-a11y-knob):not(.dw-a11y-card *) {
    font-size: calc(1em * var(--a11y-fs)) !important;
    line-height: 1.55 !important;
}
body[data-a11y-fontsize="125"] :where(h1, h2, h3, h4, h5, h6):not(.dw-a11y-card *),
body[data-a11y-fontsize="150"] :where(h1, h2, h3, h4, h5, h6):not(.dw-a11y-card *),
body[data-a11y-fontsize="200"] :where(h1, h2, h3, h4, h5, h6):not(.dw-a11y-card *) {
    font-size: calc(1em * var(--a11y-fs)) !important;
    line-height: 1.25 !important;
}

/* ─── Hoher Kontrast — robust mit Universal-Selector + protected zones ─── */
body[data-a11y-contrast="1"] {
    background: #000 !important;
    color: #fff !important;
}
body[data-a11y-contrast="1"] *:not(.dw-a11y-trigger):not(.dw-a11y-trigger *):not(.dw-a11y-card):not(.dw-a11y-card *):not(.dw-a11y-bg):not(img):not(svg):not(svg *):not(picture):not(source):not(video) {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, .35) !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
body[data-a11y-contrast="1"] em,
body[data-a11y-contrast="1"] i,
body[data-a11y-contrast="1"] strong,
body[data-a11y-contrast="1"] b,
body[data-a11y-contrast="1"] mark {
    color: #FFEB3B !important;
    background-color: #000 !important;
}
body[data-a11y-contrast="1"] a:not(.dw-a11y-trigger):not(.dw-a11y-card a) {
    color: #FFEB3B !important;
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
}
body[data-a11y-contrast="1"] button:not(.dw-a11y-trigger):not(.dw-a11y-close):not(.dw-a11y-toggle):not([data-fs]):not(.dw-a11y-reset) {
    background-color: #000 !important;
    color: #FFEB3B !important;
    border: 2px solid #FFEB3B !important;
}
body[data-a11y-contrast="1"] input:not([type=checkbox]):not([type=radio]),
body[data-a11y-contrast="1"] textarea,
body[data-a11y-contrast="1"] select {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #FFEB3B !important;
}
body[data-a11y-contrast="1"] svg:not(.dw-a11y-card svg):not(.dw-a11y-trigger svg):not([data-no-contrast]) * {
    fill: #fff !important;
    stroke: #fff !important;
}
/* A11y-Panel & Sticky-Trigger NICHT beeinflussen — konkrete Werte (kein revert,
   weil revert auf den User-Agent-Default zurückfällt = transparenter Hintergrund) */
body[data-a11y-contrast="1"] .dw-a11y-card {
    background-color: #fff !important;
    color: #0A1620 !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card * {
    color: #0A1620 !important;
    text-shadow: none !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-head,
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-head * {
    background: transparent !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-head {
    background: linear-gradient(135deg, #003B5C, #001a2a) !important;
    color: #fff !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-head h3,
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-head .dw-a11y-close {
    color: #fff !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-close {
    background-color: rgba(255, 255, 255, .15) !important;
    border-color: transparent !important;
}
/* Schriftgrößen-Buttons */
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-fs button {
    background-color: #f4f7fb !important;
    color: #003B5C !important;
    border: 1px solid rgba(0, 55, 91, .25) !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-fs button.is-active {
    background-color: #003B5C !important;
    color: #EFF631 !important;
    border-color: #003B5C !important;
}
/* Toggle-Buttons (default + aktiv) — bleiben klar ablesbar */
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-toggle {
    background-color: #f8fafc !important;
    color: #0A1620 !important;
    border: 2px solid rgba(0, 55, 91, .25) !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-toggle.is-on {
    background: linear-gradient(135deg, rgba(239, 246, 49, .25), rgba(239, 246, 49, .08)) !important;
    border-color: #EFF631 !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-toggle-state {
    background-color: rgba(91, 104, 120, .14) !important;
    color: #5B6878 !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-toggle.is-on .dw-a11y-toggle-state {
    background-color: #003B5C !important;
    color: #EFF631 !important;
    border-color: #EFF631 !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-switch {
    background-color: rgba(0, 55, 91, .18) !important;
    border-color: transparent !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-toggle.is-on .dw-a11y-switch {
    background-color: #003B5C !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-knob {
    background-color: #fff !important;
}
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-toggle.is-on .dw-a11y-knob {
    background-color: #EFF631 !important;
}
/* Reset-Button */
body[data-a11y-contrast="1"] .dw-a11y-card .dw-a11y-reset {
    background-color: transparent !important;
    color: rgba(10, 22, 32, .65) !important;
    border: 1px dashed rgba(0, 55, 91, .25) !important;
}
/* Sticky-Trigger */
body[data-a11y-contrast="1"] .dw-a11y-trigger {
    background-color: #003B5C !important;
    color: #fff !important;
    border: 3px solid #EFF631 !important;
}

/* Dekorative Glow-Blobs/Parallax-Layer ausblenden — bei Hoher Kontrast nur Inhalt zählt */
body[data-a11y-contrast="1"] .dw-blob,
body[data-a11y-contrast="1"] .da-blob,
body[data-a11y-contrast="1"] [data-parallax],
body[data-a11y-contrast="1"] .dw-parallax,
body[data-a11y-contrast="1"] [class*="-blob"],
body[data-a11y-contrast="1"] [class*="-glow"] {
    display: none !important;
}

/* Pseudo-Elements (::before/::after) auf Sektionen + Header — nur Dekoration, weg damit */
body[data-a11y-contrast="1"] section::before,
body[data-a11y-contrast="1"] section::after,
body[data-a11y-contrast="1"] .da-header::before,
body[data-a11y-contrast="1"] .da-header::after,
body[data-a11y-contrast="1"] [class*="-card"]::before,
body[data-a11y-contrast="1"] [class*="-card"]::after {
    display: none !important;
}

/* Headings explizit weiß — manche haben ::before mit Brand-Akzent */
body[data-a11y-contrast="1"] h1,
body[data-a11y-contrast="1"] h2,
body[data-a11y-contrast="1"] h3,
body[data-a11y-contrast="1"] h4,
body[data-a11y-contrast="1"] h5,
body[data-a11y-contrast="1"] h6 {
    color: #fff !important;
    background-color: transparent !important;
}

/* Sicherstellen, dass Container-Hintergründe nicht überlagern */
body[data-a11y-contrast="1"] .dw-container,
body[data-a11y-contrast="1"] section > div,
body[data-a11y-contrast="1"] main,
body[data-a11y-contrast="1"] article,
body[data-a11y-contrast="1"] aside {
    background-color: transparent !important;
}

/* Schwarz-Weiß */
body[data-a11y-grayscale="1"] {
    filter: grayscale(1);
}
body[data-a11y-grayscale="1"] .dw-a11y-trigger,
body[data-a11y-grayscale="1"] .dw-a11y-card { filter: grayscale(0); }

/* Animationen pausieren */
body[data-a11y-motion="0"] *,
body[data-a11y-motion="0"] *::before,
body[data-a11y-motion="0"] *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
}

/* Links unterstreichen */
body[data-a11y-underline="1"] a {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
}

/* ─── Fokus-Highlight — solide gelbe 3px Outline IMMER sichtbar ─── */
body[data-a11y-focus="1"] a:not(.dw-a11y-trigger):not(.dw-a11y-card *),
body[data-a11y-focus="1"] button:not(.dw-a11y-trigger):not(.dw-a11y-close):not(.dw-a11y-card *),
body[data-a11y-focus="1"] input:not(.dw-a11y-card *),
body[data-a11y-focus="1"] textarea:not(.dw-a11y-card *),
body[data-a11y-focus="1"] select:not(.dw-a11y-card *),
body[data-a11y-focus="1"] [role="button"]:not(.dw-a11y-card *),
body[data-a11y-focus="1"] [tabindex]:not([tabindex="-1"]):not(.dw-a11y-card *) {
    outline: 3px solid #EFF631 !important;
    outline-offset: 3px !important;
    border-radius: 4px !important;
}
body[data-a11y-focus="1"] a:hover,
body[data-a11y-focus="1"] a:focus,
body[data-a11y-focus="1"] a:focus-visible,
body[data-a11y-focus="1"] button:hover,
body[data-a11y-focus="1"] button:focus,
body[data-a11y-focus="1"] button:focus-visible,
body[data-a11y-focus="1"] input:focus,
body[data-a11y-focus="1"] textarea:focus,
body[data-a11y-focus="1"] select:focus {
    outline: 5px solid #FFEB3B !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 10px rgba(239, 246, 49, .45) !important;
    z-index: 5 !important;
    position: relative !important;
}

/* Cursor vergrößern */
body[data-a11y-cursor="1"], body[data-a11y-cursor="1"] * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24"><path fill="%23EFF631" stroke="%23000" stroke-width="2" d="M5.5 3.21V20.79c0 .45.54.67.85.35l4.86-4.86h7.6c.45 0 .67-.54.35-.85L6.35 2.86c-.32-.32-.85-.1-.85.35z"/></svg>') 0 0, default !important;
}

/* Buchstaben-Abstand */
body[data-a11y-spacing="1"] {
    letter-spacing: .04em !important;
    word-spacing: .12em !important;
}

/* Zeilenabstand erhöhen */
body[data-a11y-textspacing="1"] p,
body[data-a11y-textspacing="1"] li {
    line-height: 1.9 !important;
    margin-bottom: 1.2em !important;
}

/* Lesemodus — entfernt Decorations, Animationen, Hintergrund-Bilder */
body[data-a11y-readmode="1"] {
    background: #fdfcf7 !important; color: #1a1a1a !important;
}
body[data-a11y-readmode="1"] .dw-blob,
body[data-a11y-readmode="1"] [data-mouse-parallax],
body[data-a11y-readmode="1"] [data-parallax] { display: none !important; transform: none !important; }
body[data-a11y-readmode="1"] section[class*="dw-"] {
    background: #fdfcf7 !important; padding: 24px 18px !important;
}
body[data-a11y-readmode="1"] .da-footer,
body[data-a11y-readmode="1"] .da-fab-group { display: none !important; }
body[data-a11y-readmode="1"] p,
body[data-a11y-readmode="1"] li {
    font-family: Georgia, 'Times New Roman', serif !important;
    font-size: 19px !important;
    line-height: 1.7 !important;
    color: #1a1a1a !important;
    max-width: 680px !important; margin-left: auto; margin-right: auto;
}
body[data-a11y-readmode="1"] h1,
body[data-a11y-readmode="1"] h2,
body[data-a11y-readmode="1"] h3 {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    color: #003B5C !important;
    max-width: 680px !important; margin-left: auto; margin-right: auto;
}
