/* ===================================================
   ERİŞİLEBİLİRLİK PANELİ — Yeniden Tasarım
   =================================================== */

/* --- Yüzen Sekme Butonu (Sağ Orta) --- */
.acc-widget-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99999;
    width: 48px;
    height: 56px;
    background: #1e3a5f;
    color: #fff;
    border: none;
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    box-shadow: -3px 0 16px rgba(0,0,0,0.35);
    transition: width 0.25s ease, background 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.acc-widget-btn:hover {
    width: 54px;
    background: #2d5a9e;
}
.acc-widget-btn svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

/* Lightbox açıkken erişilebilirlik butonunu gizle (ilerleme düğmeleriyle çakışma önlenir) */
body:has(.lightbox.active) .acc-widget-btn {
    opacity: 0;
    pointer-events: none;
}


/* --- Panel --- */
.acc-panel {
    position: fixed;
    top: 0;
    right: -340px;
    width: 320px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #0f1e36;
    border-left: 1px solid rgba(255,255,255,0.07);
    box-shadow: -6px 0 30px rgba(0,0,0,0.5);
    z-index: 99998;
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
}
.acc-panel.acc-open { right: 0; }

/* Header */
.acc-panel-header {
    background: #0a1628;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.acc-panel-header h3 {
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.acc-panel-header h3 svg { width: 20px; height: 20px; opacity: 0.9; }
.acc-panel-close {
    background: rgba(255,255,255,0.08);
    border: none;
    color: #aaa;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 5px;
    transition: all 0.2s;
    line-height: 1;
}
.acc-panel-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Section */
.acc-section {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.acc-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #5a7da8;
    margin-bottom: 11px;
    font-weight: 600;
}

/* Buttons */
.acc-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #c5d5e8;
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.83rem;
    transition: all 0.18s;
    font-family: inherit;
    line-height: 1;
}
.acc-btn:hover { background: rgba(46,100,200,0.25); border-color: #2e64c8; color: #fff; }
.acc-btn.acc-active { background: rgba(46,100,200,0.3); border-color: #4a8af4; color: #7ab3ff; }

/* Font size controls */
.acc-font-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.acc-font-level { color: #7ab3ff; font-size: 0.83rem; min-width: 32px; text-align: center; font-weight: 600; }
.acc-font-presets { display: flex; gap: 5px; flex-wrap: wrap; }

/* Toggle row */
.acc-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.acc-toggle-row:last-child { margin-bottom: 0; }
.acc-toggle-label { color: #b8cce0; font-size: 0.86rem; display: flex; align-items: center; gap: 7px; }
.acc-toggle-label .acc-icon { font-size: 1rem; }

.acc-toggle { position: relative; width: 40px; height: 21px; flex-shrink: 0; }
.acc-toggle input { opacity: 0; width: 0; height: 0; }
.acc-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 21px;
    transition: 0.3s;
}
.acc-toggle-slider:before {
    content: '';
    position: absolute;
    width: 15px; height: 15px;
    left: 2px; bottom: 2px;
    background: #7a9dc5;
    border-radius: 50%;
    transition: 0.3s;
}
.acc-toggle input:checked + .acc-toggle-slider { background: #2563eb; border-color: #3b82f6; }
.acc-toggle input:checked + .acc-toggle-slider:before { transform: translateX(19px); background: #fff; }

/* Color blind radio buttons */
.acc-cb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.acc-cb-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    color: #b0c4dc;
    padding: 7px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.76rem;
    text-align: center;
    transition: all 0.18s;
    font-family: inherit;
    line-height: 1.3;
}
.acc-cb-btn:hover { border-color: #2e64c8; color: #fff; }
.acc-cb-btn.acc-active { background: rgba(37,99,235,0.25); border-color: #3b82f6; color: #7ab3ff; }

/* TTS Controls */
.acc-tts-controls {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}
.acc-tts-btn {
    flex: 1;
    min-width: 70px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #c5d5e8;
    padding: 8px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.acc-tts-btn:hover { background: rgba(46,100,200,0.25); border-color: #2e64c8; color: #fff; }
.acc-tts-btn.acc-active { background: rgba(37,99,235,0.3); border-color: #4a8af4; color: #7ab3ff; }
.acc-tts-speed {
    width: 100%;
    margin-top: 8px;
    accent-color: #4a8af4;
}
.acc-tts-speed-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #5a7da8;
    margin-top: 3px;
}

/* Reset */
.acc-reset-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 14px 16px;
    padding: 10px;
    background: rgba(220,53,69,0.1);
    border: 1px solid rgba(220,53,69,0.2);
    color: #f87171;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: 0.2s;
}
.acc-reset-btn:hover { background: rgba(220,53,69,0.2); }

/* =============================================
   ERİŞİLEBİLİRLİK MODU CSS SINIFLARI
   ============================================= */

/* Font boyutları (7 seviye) — YALNIZCA body metinleri etkiler */
html.acc-f1 { font-size: 12px; }
html.acc-f2 { font-size: 14px; }
html.acc-f3 { font-size: 16px; }   /* varsayılan */
html.acc-f4 { font-size: 19px; }
html.acc-f5 { font-size: 22px; }
html.acc-f6 { font-size: 26px; }
html.acc-f7 { font-size: 30px; }

/* Hero başlığı, section başlıkları ve büyük display elementler:
   Erişilebilirlik font ölçeklemesinden KORUNUR — px sabit değerler */
html[class*="acc-f"] .hero-content h1,
html[class*="acc-f"] .section-title {
    font-size: clamp(28px, 5vw, 80px) !important;
}
html[class*="acc-f"] .hero-content p {
    font-size: clamp(14px, 1.3vw, 22px) !important;
}
html.acc-f1 .hero-content h1 { font-size: clamp(28px, 5vw, 80px) !important; }
html.acc-f7 .hero-content h1 { font-size: clamp(28px, 5vw, 80px) !important; }

/* Yüksek Kontrast */
html.acc-high-contrast {
    filter: contrast(1.7) brightness(1.05);
}
/* Gri Tonlama */
html.acc-grayscale { filter: grayscale(1); }
/* Animasyon durdur */
html.acc-pause-anim *,
html.acc-pause-anim *::before,
html.acc-pause-anim *::after {
    animation-play-state: paused !important;
    transition-duration: 0ms !important;
}
/* Linkleri vurgula */
html.acc-hl-links a {
    text-decoration: underline !important;
    outline: 2px dashed #4a8af4 !important;
    outline-offset: 2px;
}
/* Disleksi fontu */
html.acc-dyslexia * {
    font-family: 'Trebuchet MS', 'Comic Sans MS', cursive !important;
    letter-spacing: 0.07em !important;
    word-spacing: 0.14em !important;
    line-height: 2 !important;
}
/* Büyük imleç */
html.acc-big-cursor, html.acc-big-cursor * { cursor: zoom-in !important; }
/* Odak halkası */
html.acc-focus-ring *:focus {
    outline: 3px solid #4a8af4 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(74,138,244,0.22) !important;
}

/* ---- Renk Körü Filtreleri ---- */

/* Protanopia (kırmızı körlüğü) */
html.acc-cb-protanopia { filter: url('#acc-filter-protanopia'); }
/* Deuteranopia (yeşil körlüğü — en yaygın) */
html.acc-cb-deuteranopia { filter: url('#acc-filter-deuteranopia'); }
/* Tritanopia (mavi-sarı körlüğü) */
html.acc-cb-tritanopia { filter: url('#acc-filter-tritanopia'); }
/* Achromatopsia (tam renk körlüğü) */
html.acc-cb-achromatopsia { filter: grayscale(1) contrast(1.2); }

/* Mobil */
@media (max-width: 480px) {
    .acc-panel { width: 100%; right: -100%; }
    .acc-widget-btn {
        top: auto;
        bottom: 20px;
        right: 0;
        transform: none;
        border-radius: 10px 0 0 10px;
    }
}

/* ---- TTS Dil Seçici ---- */
.acc-tts-lang-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.acc-tts-lang-label {
    font-size: 0.82rem;
    color: #8ca8cc;
    white-space: nowrap;
    flex-shrink: 0;
}
.acc-tts-lang-select {
    flex: 1;
    background: rgba(11,19,43,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.82rem;
    padding: 6px 8px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
.acc-tts-lang-select:focus {
    border-color: #4a8af4;
}
.acc-tts-lang-select option {
    background: #0f1e36;
    color: #fff;
}
