/* =============================================
   ACCESSIBILITY WIDGET — dfus dotan
   עומד בתקן WCAG 2.0 AA / SI 5568
   ============================================= */

/* 1. SKIP LINK */
.skip-to-main {
    position: absolute;
    top: -60px;
    right: 0;
    left: 0;
    background: #0a0a0a;
    color: #fff;
    text-align: center;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    z-index: 99999;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-to-main:focus { top: 0; }

/* 2. FOCUS — כל האתר */
*:focus-visible {
    outline: 3px solid #0a0a0a !important;
    outline-offset: 4px !important;
    border-radius: 3px !important;
    box-shadow: 0 0 0 5px rgba(0,0,0,0.12) !important;
}

/* 3. WIDGET BUTTON */
#a11y-btn {
    position: fixed;
    bottom: 28px;
    left: 20px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #0a0a0a;
    color: #fff;
    border: 3px solid #fff;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 9998;
    box-shadow: 0 4px 18px rgba(0,0,0,0.3);
    transition: transform .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Heebo', sans-serif;
}
#a11y-btn:hover, #a11y-btn:focus-visible {
    transform: scale(1.1);
    outline: 3px solid #0a0a0a !important;
    outline-offset: 5px !important;
}
#a11y-btn-label {
    position: fixed;
    bottom: 85px;
    left: 12px;
    background: #0a0a0a;
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 9997;
    letter-spacing: 0.5px;
    font-family: 'Heebo', sans-serif;
    white-space: nowrap;
}

/* 4. PANEL */
#a11y-panel {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 240px;
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
    z-index: 9996;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.97);
    transition: all 0.22s ease;
    font-family: 'Heebo', sans-serif;
}
#a11y-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.a11y-panel-head {
    background: #0a0a0a;
    color: #fff;
    padding: 13px 16px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.a11y-option {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 11px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid #f2f2f2;
    font-family: 'Heebo', sans-serif;
    font-size: 0.875rem;
    color: #222;
    cursor: pointer;
    text-align: right;
    transition: background 0.12s;
    direction: rtl;
}
.a11y-option:last-of-type { border-bottom: none; }
.a11y-option:hover, .a11y-option:focus-visible { background: #f5f5f5; }
.a11y-option.on {
    background: #f0f0f0;
    font-weight: 700;
    color: #0a0a0a;
}
.a11y-option.on .a11y-ic::after { content: ' ✓'; font-size: 0.75rem; }
.a11y-ic { font-size: 1.1rem; width: 26px; text-align: center; flex-shrink: 0; }
.a11y-reset-btn {
    display: block;
    width: calc(100% - 20px);
    margin: 8px 10px 10px;
    padding: 8px;
    background: #f5f5f5;
    border: 1.5px solid #e0e0e0;
    border-radius: 7px;
    font-family: 'Heebo', sans-serif;
    font-size: 0.78rem;
    color: #666;
    cursor: pointer;
    font-weight: 700;
    transition: background .15s;
}
.a11y-reset-btn:hover { background: #e8e8e8; }

/* 5. ACCESSIBILITY MODES */
body.a11y-big   { font-size: 120% !important; }
body.a11y-big p, body.a11y-big li,
body.a11y-big label, body.a11y-big input,
body.a11y-big textarea { font-size: 1.1em !important; }

body.a11y-contrast { filter: contrast(1.5) brightness(0.95); }
body.a11y-gray     { filter: grayscale(1); }
body.a11y-negative { filter: invert(1) hue-rotate(180deg); }

body.a11y-links a {
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    font-weight: 700 !important;
    color: #000 !important;
}

body.a11y-spacing p,
body.a11y-spacing li,
body.a11y-spacing label { line-height: 2.2 !important; letter-spacing: 0.5px !important; }

body.a11y-dyslexia,
body.a11y-dyslexia p,
body.a11y-dyslexia li,
body.a11y-dyslexia label,
body.a11y-dyslexia input,
body.a11y-dyslexia button {
    font-family: Arial, sans-serif !important;
    letter-spacing: 0.8px !important;
    word-spacing: 3px !important;
    line-height: 1.9 !important;
}

/* Screen-reader only */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
