/* ============================================================
   Eislöwen Power – Barrierefreiheit CSS
   WCAG 2.1 / BITV 2.0 konform
   ============================================================ */

/* ---------- Skip Links ---------- */
.elp-skip-links {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    z-index: 99999;
}

.elp-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px; height: 1px;
    overflow: hidden;
    background: var(--elp-a11y-primary, #c8102e);
    color: #fff;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 6px 6px;
    z-index: 99999;
    transition: none;
}

.elp-skip-link:focus {
    position: fixed;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: auto; height: auto;
    overflow: visible;
    outline: 3px solid #ffbf00;
    outline-offset: 2px;
}

/* ---------- Toolbar Wrapper ---------- */
.elp-a11y-toolbar {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99990;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
}

.elp-toolbar-right { right: 0; }
.elp-toolbar-left  { left: 0; }

/* ---------- Toggle Button ---------- */
.elp-toolbar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--elp-a11y-primary, #c8102e);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 12px rgba(0,0,0,0.3);
    transition: background 0.2s;
}

.elp-toolbar-right .elp-toolbar-toggle {
    border-radius: 8px 0 0 8px;
}
.elp-toolbar-left .elp-toolbar-toggle {
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 0 12px rgba(0,0,0,0.3);
}

.elp-toolbar-toggle:hover,
.elp-toolbar-toggle:focus {
    background: var(--elp-a11y-secondary, #003087);
    outline: 3px solid #ffbf00;
    outline-offset: 2px;
}

/* ---------- Panel ---------- */
.elp-toolbar-panel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 260px;
    background: #1a1a2e;
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    overflow: hidden;
}

.elp-toolbar-right .elp-toolbar-panel {
    right: 52px;
}
.elp-toolbar-left .elp-toolbar-panel {
    left: 52px;
}

/* ---------- Panel Header ---------- */
.elp-toolbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--elp-a11y-primary, #c8102e);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.elp-toolbar-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    border-radius: 4px;
}
.elp-toolbar-close:hover,
.elp-toolbar-close:focus {
    background: rgba(255,255,255,0.2);
    outline: 2px solid #ffbf00;
}

/* ---------- Sections ---------- */
.elp-toolbar-section {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.elp-toolbar-section h3 {
    margin: 0 0 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

/* ---------- Button Groups ---------- */
.elp-btn-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.elp-btn-group button {
    flex: 1;
    padding: 7px 6px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.elp-btn-group button:hover {
    background: rgba(255,255,255,0.18);
}

.elp-btn-group button:focus {
    outline: 2px solid #ffbf00;
    outline-offset: 1px;
}

.elp-btn-group button.elp-active {
    background: var(--elp-a11y-primary, #c8102e);
    border-color: var(--elp-a11y-primary, #c8102e);
}

/* ---------- Toggle List ---------- */
.elp-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.elp-toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
}

.elp-toggle-item input[type="checkbox"] {
    width: 16px; height: 16px;
    cursor: pointer;
    accent-color: var(--elp-a11y-primary, #c8102e);
}

.elp-toggle-item:hover { color: #fff; }

/* ---------- Footer ---------- */
.elp-toolbar-footer {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elp-reset-btn {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    padding: 8px;
    cursor: pointer;
    font-size: 12px;
    width: 100%;
    transition: background 0.15s;
}
.elp-reset-btn:hover { background: rgba(255,255,255,0.16); }
.elp-reset-btn:focus { outline: 2px solid #ffbf00; }

.elp-statement-link {
    color: rgba(255,255,255,0.6);
    text-align: center;
    font-size: 11px;
    text-decoration: underline;
}
.elp-statement-link:hover { color: #fff; }

/* ---------- Reading Guide ---------- */
.elp-reading-guide {
    position: fixed;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--elp-a11y-primary, #c8102e);
    opacity: 0.7;
    pointer-events: none;
    z-index: 99998;
    transition: top 0.05s linear;
}

/* ============================================================
   Body-Klassen: Kontrast & Darstellung
   ============================================================ */

/* Hoher Kontrast */
body.elp-contrast-high {
    filter: none !important;
    background: #000 !important;
    color: #fff !important;
}
body.elp-contrast-high * {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}
body.elp-contrast-high a,
body.elp-contrast-high button {
    color: #ffff00 !important;
    text-decoration: underline !important;
}
body.elp-contrast-high img {
    filter: grayscale(100%) contrast(1.2);
}

/* Invertiert */
body.elp-contrast-inverted {
    filter: invert(1) hue-rotate(180deg);
}
body.elp-contrast-inverted img,
body.elp-contrast-inverted video {
    filter: invert(1) hue-rotate(180deg);
}

/* Links hervorheben */
body.elp-highlight-links a {
    background: #ffff00 !important;
    color: #000 !important;
    text-decoration: underline !important;
    padding: 0 2px;
    border-radius: 2px;
}

/* Leseschrift */
body.elp-dyslexia * {
    font-family: 'OpenDyslexic', Arial, sans-serif !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
}

/* Animationen reduzieren */
body.elp-no-animations *,
body.elp-no-animations *::before,
body.elp-no-animations *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
}

/* Großer Cursor */
body.elp-big-cursor,
body.elp-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 3l20 12-9 2-4 9z' fill='%23fff' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") 5 3, auto !important;
}

/* Zeilenabstand */
body.elp-line-height-medium * { line-height: 1.8 !important; }
body.elp-line-height-large  * { line-height: 2.2 !important; }

/* ============================================================
   Schriftgröße (via JS gesetzt auf html)
   ============================================================ */
html.elp-font-1  { font-size: 14px !important; }
html.elp-font-2  { font-size: 16px !important; }
html.elp-font-3  { font-size: 18px !important; }
html.elp-font-4  { font-size: 20px !important; }
html.elp-font-5  { font-size: 22px !important; }

/* ============================================================
   Responsive: Toolbar mobil
   ============================================================ */
@media (max-width: 480px) {
    .elp-toolbar-panel {
        width: 220px;
    }
    .elp-toolbar-toggle {
        width: 40px;
        height: 40px;
    }
}
