/**
 * X-TREME UCKERMARK - Accessibility (A11y) Plugin Stylesheet
 * WCAG 2.1 & 2.2 AA Compliance, High-Contrast Modes, Reading Guides & Tools
 * 100% Local Vanilla CSS - Zero External Dependencies
 */

/* ==========================================================================
   1. Font Size Scaling
   ========================================================================== */
html.a11y-font-110 { font-size: 17.6px !important; }
html.a11y-font-120 { font-size: 19.2px !important; }
html.a11y-font-130 { font-size: 20.8px !important; }
html.a11y-font-140 { font-size: 22.4px !important; }

/* ==========================================================================
   2. Contrast & Color Schemes
   ========================================================================== */

/* 2.1 High Contrast Mode (Dark Boost / 21:1) */
html.a11y-contrast-high {
    --bg-page: #000000 !important;
    --bg-surface: #0a0e17 !important;
    --bg-surface-elevated: #111827 !important;
    --bg-surface-hover: #1f293d !important;
    --text-primary: #ffffff !important;
    --text-secondary: #f3f4f6 !important;
    --text-muted: #e5e7eb !important;
    --border-subtle: #ffffff !important;
    --border-prominent: #facc15 !important;
    --accent-fire: #ff7700 !important;
    --accent-ice: #00e5ff !important;
    --focus-ring: #facc15 !important;
}

html.a11y-contrast-high a {
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}

html.a11y-contrast-high .card,
html.a11y-contrast-high .feature-pill,
html.a11y-contrast-high .btn {
    border: 2px solid #ffffff !important;
}

/* 2.2 Light Mode (Schwarz auf Weiß) */
html.a11y-theme-light {
    --bg-page: #f8fafc !important;
    --bg-surface: #ffffff !important;
    --bg-surface-elevated: #f1f5f9 !important;
    --bg-surface-hover: #e2e8f0 !important;
    --bg-overlay: rgba(240, 244, 250, 0.95) !important;
    --text-primary: #090d16 !important;
    --text-secondary: #1e293b !important;
    --text-muted: #475569 !important;
    --text-inverse: #ffffff !important;
    --border-subtle: #cbd5e1 !important;
    --border-prominent: #94a3b8 !important;
    --accent-fire: #ea580c !important;
    --accent-ice: #0284c7 !important;
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

html.a11y-theme-light body {
    background-color: var(--bg-page) !important;
    color: var(--text-primary) !important;
}

html.a11y-theme-light .site-header {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

html.a11y-theme-light .site-footer {
    background-color: #f1f5f9 !important;
    border-top: 1px solid var(--border-subtle) !important;
}

html.a11y-theme-light .card,
html.a11y-theme-light .event-card,
html.a11y-theme-light .feature-pill {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
}

html.a11y-theme-light .modal-dialog {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

/* 2.3 Yellow on Black (Klassischer Sehbehinderten-Kontrast nach BITV) */
html.a11y-contrast-yellow {
    --bg-page: #000000 !important;
    --bg-surface: #000000 !important;
    --bg-surface-elevated: #0d0d0d !important;
    --bg-surface-hover: #1a1a1a !important;
    --text-primary: #ffff00 !important;
    --text-secondary: #ffff55 !important;
    --text-muted: #ffffaa !important;
    --border-subtle: #ffff00 !important;
    --border-prominent: #ffff00 !important;
    --accent-fire: #ffff00 !important;
    --accent-ice: #00ffff !important;
    --focus-ring: #00ffff !important;
}

html.a11y-contrast-yellow body,
html.a11y-contrast-yellow .site-header,
html.a11y-contrast-yellow .site-footer,
html.a11y-contrast-yellow .card,
html.a11y-contrast-yellow .modal-dialog {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

html.a11y-contrast-yellow a {
    color: #00ffff !important;
    text-decoration: underline !important;
}

/* 2.4 Invert Colors */
html.a11y-contrast-invert {
    filter: invert(1) hue-rotate(180deg) !important;
}

html.a11y-contrast-invert img,
html.a11y-contrast-invert video,
html.a11y-contrast-invert iframe,
html.a11y-contrast-invert .a11y-widget,
html.a11y-contrast-invert .a11y-panel,
html.a11y-contrast-invert .a11y-inspector-bar,
html.a11y-contrast-invert .a11y-inspector-drawer {
    filter: invert(1) hue-rotate(180deg) !important;
}

/* 2.5 Grayscale (Monochrom) */
html.a11y-contrast-grayscale {
    filter: grayscale(100%) !important;
}

/* ==========================================================================
   3. Typography & Legibility (WCAG 1.4.12)
   ========================================================================== */

/* 3.1 Dyslexia-Friendly Legible Font */
html.a11y-dyslexic * {
    font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, Arial, sans-serif !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
    line-height: 1.85 !important;
}

/* 3.2 Increased Line Height */
html.a11y-line-height *:not(.a11y-panel *):not(.a11y-widget *) {
    line-height: 2 !important;
}

/* 3.3 Increased Letter & Word Spacing */
html.a11y-letter-spacing *:not(.a11y-panel *):not(.a11y-widget *) {
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

/* 3.4 Text Align Left (Kein zentrierter oder Blocksatz) */
html.a11y-text-align-left *:not(.a11y-panel *):not(.a11y-widget *):not(.nav-link) {
    text-align: left !important;
}

/* ==========================================================================
   4. Visual Aids & Highlighting
   ========================================================================== */

/* 4.1 Highlight Links */
html.a11y-highlight-links a:not(.a11y-panel a):not(.a11y-widget a):not(.a11y-skip) {
    text-decoration: underline 3px !important;
    text-underline-offset: 4px !important;
    text-decoration-color: #facc15 !important;
    outline: 2px dashed #facc15 !important;
    outline-offset: 3px !important;
    background-color: rgba(250, 204, 21, 0.15) !important;
}

/* 4.2 Highlight Headings */
html.a11y-highlight-headings h1,
html.a11y-highlight-headings h2,
html.a11y-highlight-headings h3,
html.a11y-highlight-headings h4,
html.a11y-highlight-headings h5,
html.a11y-highlight-headings h6 {
    outline: 2px solid #38bdf8 !important;
    outline-offset: 4px !important;
    background-color: rgba(56, 189, 248, 0.12) !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    border-radius: 4px !important;
}

/* 4.3 Large High-Visibility Cursor */
html.a11y-cursor-large,
html.a11y-cursor-large * {
    cursor: url("data:image/svg+xml,%3Csvg width='38' height='38' viewBox='0 0 38 38' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='2,2 2,34 11,25 18,36 23,33 16,22 27,22' fill='%23ffffff' stroke='%23000000' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E"), auto !important;
}

html.a11y-cursor-large a,
html.a11y-cursor-large button,
html.a11y-cursor-large input,
html.a11y-cursor-large select,
html.a11y-cursor-large textarea,
html.a11y-cursor-large [role="button"] {
    cursor: url("data:image/svg+xml,%3Csvg width='38' height='38' viewBox='0 0 38 38' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='2,2 2,34 11,25 18,36 23,33 16,22 27,22' fill='%23f97316' stroke='%23ffffff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E"), pointer !important;
}

/* 4.4 Pause Animations & Motion */
html.a11y-pause-animations *,
html.a11y-pause-animations *::before,
html.a11y-pause-animations *::after {
    animation-play-state: paused !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
}

/* 4.5 Hide Images / Text-Only Mode */
html.a11y-hide-images img:not(.site-logo-img):not(.a11y-panel img):not(.a11y-exempt),
html.a11y-hide-images video,
html.a11y-hide-images iframe {
    opacity: 0.05 !important;
    filter: blur(4px) !important;
}

/* 4.6 Reading Guide (Leselineal) */
#a11y-reading-guide {
    display: none;
    position: fixed;
    left: 0;
    width: 100%;
    height: 38px;
    background: rgba(250, 204, 21, 0.15);
    border-top: 2px dashed #facc15;
    border-bottom: 2px dashed #facc15;
    pointer-events: none;
    z-index: 99998;
    transform: translateY(-50%);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.25);
    transition: top 60ms ease-out;
}

html.a11y-reading-guide-active #a11y-reading-guide {
    display: block;
}

/* 4.7 Reading Mask (Lesemaske) */
#a11y-reading-mask-top,
#a11y-reading-mask-bottom {
    display: none;
    position: fixed;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.72);
    pointer-events: none;
    z-index: 99998;
    transition: height 60ms ease-out;
}

#a11y-reading-mask-top {
    top: 0;
}

#a11y-reading-mask-bottom {
    bottom: 0;
}

html.a11y-reading-mask-active #a11y-reading-mask-top,
html.a11y-reading-mask-active #a11y-reading-mask-bottom {
    display: block;
}

/* 4.8 Text-to-Speech Sentence Highlight & Karaoke Read-Along */
.a11y-tts-highlight {
    background-color: rgba(249, 115, 22, 0.35) !important;
    outline: 2px solid var(--accent-fire) !important;
    border-radius: 4px !important;
}

.a11y-tts-reading-now {
    outline: 3px solid #f97316 !important;
    outline-offset: 6px !important;
    background-color: rgba(249, 115, 22, 0.18) !important;
    border-radius: 8px !important;
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.4) !important;
    transition: all 250ms ease !important;
}

/* ==========================================================================
   5. Floating Accessibility Trigger Button
   ========================================================================== */
.a11y-widget-trigger {
    position: fixed;
    bottom: 24px;
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.15rem;
    background: #0f172a;
    color: #ffffff;
    border: 2px solid #38bdf8;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7), 0 0 15px rgba(56, 189, 248, 0.35);
    cursor: pointer;
    transition: all var(--transition-base, 200ms ease);
}

.a11y-widget-trigger.pos-bottom-right {
    right: 24px;
}

.a11y-widget-trigger.pos-bottom-left {
    left: 24px;
}

.a11y-widget-trigger:hover,
.a11y-widget-trigger:focus-visible {
    background: #1e293b;
    border-color: #f97316;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.8), 0 0 20px rgba(249, 115, 22, 0.45);
    outline: 3px solid #f97316;
    outline-offset: 3px;
}

.a11y-trigger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #38bdf8;
    color: #0f172a;
    border-radius: 50%;
    flex-shrink: 0;
}

.a11y-trigger-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #f97316;
    border: 2px solid #0f172a;
    border-radius: 50%;
    display: none;
}

.a11y-trigger-badge.active {
    display: block;
}

/* In-Panel Big Action Button: Ganze Seite vorlesen */
.a11y-panel-btn-read-all {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #ffffff;
    border: 2px solid #ffedd5;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45);
    cursor: pointer;
    transition: all 150ms ease;
    margin-bottom: 0.75rem;
}

.a11y-panel-btn-read-all:hover,
.a11y-panel-btn-read-all:focus-visible {
    background: linear-gradient(135deg, #c2410c, #ea580c);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.65);
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Speed selector pills inside Panel */
.a11y-speed-buttons {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.a11y-speed-btn {
    flex: 1;
    padding: 0.45rem 0.5rem;
    background: #1f293d;
    color: #cbd5e1;
    border: 1px solid #334466;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

.a11y-speed-btn:hover,
.a11y-speed-btn.active {
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
}

/* Main Universal Audio Player Bar (Universelle Piktogramm-Steuerung) */
.a11y-audio-player-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #0b1120;
    color: #ffffff;
    border-bottom: 3px solid #f97316;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85);
    z-index: 99998;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transform: translateY(-100%);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.a11y-audio-player-bar.visible {
    transform: translateY(0);
}

.a11y-audio-controls-cluster {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.a11y-player-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 150ms ease;
}

.a11y-player-btn-play {
    background: #22c55e;
    color: #0f172a;
    border-color: #86efac;
    padding: 0.6rem 1.25rem;
    font-size: 1.05rem;
}

.a11y-player-btn-play:hover,
.a11y-player-btn-play:focus-visible {
    background: #16a34a;
    color: #ffffff;
    outline: 3px solid #22c55e;
}

.a11y-player-btn-stop {
    background: #ef4444;
    color: #ffffff;
    border-color: #fca5a5;
}

.a11y-player-btn-stop:hover,
.a11y-player-btn-stop:focus-visible {
    background: #dc2626;
    outline: 3px solid #ef4444;
}

.a11y-player-btn-nav {
    background: #1f293d;
    color: #cbd5e1;
    border: 1px solid #334466;
}

.a11y-player-btn-nav:hover,
.a11y-player-btn-nav:focus-visible {
    background: #334466;
    color: #ffffff;
    border-color: #f97316;
}

.a11y-player-speed-btn {
    background: #111827;
    color: #38bdf8;
    border: 1px solid #223049;
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.a11y-player-speed-btn:hover {
    background: #1f293d;
    border-color: #38bdf8;
}

.a11y-audio-status-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: #cbd5e1;
}

.a11y-audio-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    animation: a11y-pulse-glow 1.5s infinite;
}

/* ==========================================================================
   5.1 Regular Floating Accessibility Trigger Button
   ========================================================================== */
.a11y-widget-trigger {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.1rem;
    background: #0f172a;
    color: #ffffff;
    border: 2px solid #38bdf8;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7), 0 0 15px rgba(56, 189, 248, 0.35);
    cursor: pointer;
    transition: all var(--transition-base, 200ms ease);
}

.a11y-widget-trigger.pos-bottom-right {
    right: 24px;
}

.a11y-widget-trigger.pos-bottom-left {
    left: 24px;
}

.a11y-widget-trigger:hover,
.a11y-widget-trigger:focus-visible {
    background: #1e293b;
    border-color: #f97316;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.8), 0 0 20px rgba(249, 115, 22, 0.45);
    outline: 3px solid #f97316;
    outline-offset: 3px;
}

.a11y-trigger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #38bdf8;
    color: #0f172a;
    border-radius: 50%;
    flex-shrink: 0;
}

.a11y-trigger-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #f97316;
    border: 2px solid #0f172a;
    border-radius: 50%;
    display: none;
}

.a11y-trigger-badge.active {
    display: block;
}

/* ==========================================================================
   6. Accessibility Panel / Drawer
   ========================================================================== */
.a11y-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99995;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms ease, visibility 250ms ease;
}

.a11y-panel-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.a11y-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 440px;
    max-width: 95vw;
    background: #0f172a;
    color: #f8fafc;
    border-left: 1px solid var(--border-subtle, #334466);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
    z-index: 99996;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.a11y-panel.pos-left {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border-subtle, #334466);
    transform: translateX(-100%);
}

.a11y-panel.open {
    transform: translateX(0);
}

/* Panel Header */
.a11y-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: #111827;
    border-bottom: 1px solid var(--border-subtle, #223049);
}

.a11y-panel-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

.a11y-close-btn {
    background: transparent;
    border: 1px solid var(--border-subtle, #334466);
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 150ms ease;
}

.a11y-close-btn:hover,
.a11y-close-btn:focus-visible {
    color: #ffffff;
    border-color: #f97316;
    background: #1f293d;
    outline: 2px solid #f97316;
}

/* Panel Body */
.a11y-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.a11y-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Font Size Stepper Control */
.a11y-stepper-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111827;
    border: 1px solid #223049;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
}

.a11y-stepper-btn {
    background: #1f293d;
    border: 1px solid #334466;
    color: #ffffff;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 150ms ease;
}

.a11y-stepper-btn:hover,
.a11y-stepper-btn:focus-visible {
    background: #f97316;
    border-color: #f97316;
    outline: 2px solid #f97316;
}

.a11y-stepper-val {
    font-weight: 800;
    font-size: 1.05rem;
    color: #38bdf8;
}

/* Grid of Toggle Buttons */
.a11y-grid-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.a11y-btn-toggle {
    background: #111827;
    border: 1px solid #223049;
    border-radius: 10px;
    padding: 0.8rem 0.75rem;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 150ms ease;
    position: relative;
}

.a11y-btn-toggle:hover,
.a11y-btn-toggle:focus-visible {
    background: #1f293d;
    border-color: #38bdf8;
    color: #ffffff;
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.a11y-btn-toggle.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: inset 0 0 0 1px #38bdf8;
}

.a11y-btn-toggle .icon-wrap {
    color: #94a3b8;
    transition: color 150ms ease;
}

.a11y-btn-toggle.active .icon-wrap {
    color: #38bdf8;
}

.a11y-btn-toggle.active::after {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #38bdf8;
}

/* TTS Player Box */
.a11y-tts-box {
    background: #111827;
    border: 1px solid #223049;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.a11y-tts-controls {
    display: flex;
    gap: 0.5rem;
}

.a11y-tts-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: #1f293d;
    border: 1px solid #334466;
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms ease;
}

.a11y-tts-btn:hover,
.a11y-tts-btn:focus-visible {
    background: #f97316;
    border-color: #f97316;
    outline: 2px solid #f97316;
}

/* Panel Footer */
.a11y-panel-footer {
    padding: 1rem 1.5rem;
    background: #111827;
    border-top: 1px solid var(--border-subtle, #223049);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.a11y-reset-all-btn {
    width: 100%;
    padding: 0.65rem 1rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 150ms ease;
}

.a11y-reset-all-btn:hover,
.a11y-reset-all-btn:focus-visible {
    background: #ef4444;
    color: #ffffff;
    outline: 2px solid #ef4444;
}

/* ==========================================================================
   7. Live In-Page A11y Inspector (Frontend-Prüftool)
   ========================================================================== */
.a11y-inspector-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99990;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: #0f172a;
    color: #38bdf8;
    border: 2px solid #38bdf8;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 200ms ease;
}

.a11y-inspector-badge:hover,
.a11y-inspector-badge:focus-visible {
    background: #38bdf8;
    color: #0f172a;
    transform: translateY(-2px);
    outline: 3px solid #38bdf8;
}

/* In-Page Element Highlights (Überlagerungsfrei: Kein Verschieben, kein Abdecken von Text oder Nachbarelementen) */
.a11y-highlight-critical {
    outline: 3px solid #ef4444 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 1px #0b1120, 0 0 14px rgba(239, 68, 68, 0.6) !important;
    animation: a11y-pulse-critical 2s infinite !important;
}

.a11y-highlight-serious {
    outline: 3px dashed #f59e0b !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 1px #0b1120, 0 0 14px rgba(245, 158, 11, 0.6) !important;
    animation: a11y-pulse-serious 2s infinite !important;
}

.a11y-highlight-moderate {
    outline: 3px dotted #38bdf8 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 1px #0b1120, 0 0 10px rgba(56, 189, 248, 0.4) !important;
}

@keyframes a11y-pulse-critical {
    0%, 100% { box-shadow: 0 0 0 1px #0b1120, 0 0 14px rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 2px #0b1120, 0 0 24px rgba(239, 68, 68, 0.85); }
}

@keyframes a11y-pulse-serious {
    0%, 100% { box-shadow: 0 0 0 1px #0b1120, 0 0 14px rgba(245, 158, 11, 0.5); }
    50% { box-shadow: 0 0 0 2px #0b1120, 0 0 24px rgba(245, 158, 11, 0.85); }
}

/* In-Page Inspector Bar & Expandable Drawer */
.a11y-inspector-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0b1120;
    color: #ffffff;
    border-top: 3px solid #38bdf8;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.8);
    z-index: 99997;
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    transform: translateY(100%);
    transition: transform 250ms ease;
}

.a11y-inspector-bar.visible {
    transform: translateY(0);
}

.a11y-inspector-bar-header {
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.a11y-inspector-stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.a11y-stat-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
}

.a11y-stat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.a11y-stat-dot.critical { background: #ef4444; }
.a11y-stat-dot.serious  { background: #f59e0b; }
.a11y-stat-dot.moderate { background: #38bdf8; }
.a11y-stat-dot.passed   { background: #22c55e; }

.a11y-inspector-drawer {
    max-height: 280px;
    overflow-y: auto;
    background: #090e1a;
    border-top: 1px solid #1e293b;
    padding: 1rem 1.5rem;
    display: none;
}

.a11y-inspector-drawer.open {
    display: block;
}

.a11y-drawer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    background: #111827;
    border: 1px solid #1f293d;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 4px solid #94a3b8;
    font-size: 0.85rem;
}

.a11y-drawer-item.critical { border-left-color: #ef4444; }
.a11y-drawer-item.serious  { border-left-color: #f59e0b; }
.a11y-drawer-item.moderate { border-left-color: #38bdf8; }

.a11y-drawer-item-title {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.a11y-drawer-item-sub {
    font-size: 0.78rem;
    color: #94a3b8;
}

.a11y-jump-btn {
    background: #38bdf8;
    color: #0f172a;
    border: none;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    transition: background 150ms ease;
}

.a11y-jump-btn:hover {
    background: #7dd3fc;
}

.a11y-drawer-empty {
    text-align: center;
    padding: 1rem;
    color: #86efac;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Flash animation on element jumped to */
.a11y-focus-flash {
    animation: a11y-flash-pulse 1.5s ease-out !important;
}

@keyframes a11y-flash-pulse {
    0% { transform: scale(1.05); outline-width: 6px; }
    50% { transform: scale(1.02); outline-width: 4px; }
    100% { transform: scale(1); outline-width: 3px; }
}
