/* =====================================================================
   KVYS ERİŞİLEBİLİRLİK MENÜSÜ — ön yüz ve yönetim paneli ortak stili (2026-11-24)
   Kullanım: Views/Shared/_ErisilebilirlikMenu.cshtml · Scripts/erisilebilirlik.js
   ===================================================================== */

/* Yüzen tetikleyici (ön yüz sayfaları: sol alt; panelde üst çubuktaki .yk-erisim-btn kullanılır) */
#aw3-btn {
    position: fixed;
    inset-block-end: 14px;
    inset-inline-start: 14px;
    min-inline-size: 44px;
    min-block-size: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: linear-gradient(140deg, #e20713 0%, #b8050f 55%, #8f040b 100%);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999990;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #fff, 0 6px 16px -4px rgba(163, 5, 14, 0.55);
}
@media (prefers-reduced-motion: no-preference) {
    #aw3-btn { transition: transform 0.2s ease, box-shadow 0.2s ease; }
}
#aw3-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(226, 7, 19, 0.22), 0 10px 22px -6px rgba(163, 5, 14, 0.6);
}
#aw3-btn:focus-visible {
    outline: 3px solid #0e7490;
    outline-offset: 3px;
}
#aw3-btn svg { width: 26px; height: 26px; fill: none; }
#aw3-btn .aw3-nokta {
    display: none;
    position: absolute;
    top: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #fff;
}
#aw3-btn.aktif .aw3-nokta { display: block; }

/* Yönetim panelinde üst çubuk düğmesi varken sol-alt yüzen düğmeyi gizle */
body.yk:has(.yk-erisim-btn) #aw3-btn { display: none; }

@media (max-width: 767.98px) {
    #aw3-btn { inset-inline-start: 10px; inset-block-end: 10px; }
}

/* Native <dialog> Sol Çekmece */
dialog#aw3-panel {
    position: fixed;
    inset: 0 auto 0 0;
    margin: 0;
    padding: 0;
    border: 0;
    width: min(420px, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    background: #fff;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.22);
    z-index: 999999;
}
dialog#aw3-panel:not([open]) { display: none; }
dialog#aw3-panel[open] {
    display: flex;
    flex-direction: column;
}
dialog#aw3-panel:modal {
    overscroll-behavior: contain;
}
dialog#aw3-panel::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    overflow: hidden;
    overscroll-behavior: contain;
}
@media (prefers-reduced-motion: no-preference) {
    dialog#aw3-panel[open] {
        animation: aw3Giris 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    @keyframes aw3Giris {
        from { transform: translateX(-24px); opacity: 0.6; }
        to { transform: translateX(0); opacity: 1; }
    }
}

/* Çekmece Üst Başlığı */
#aw3-panel .aw3-header {
    background: linear-gradient(135deg, #e20713, #a3050e);
    color: #fff;
    padding: 15px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
#aw3-panel .aw3-header h2 {
    margin: 0;
    font-size: 16.5px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.25;
}
#aw3-panel .aw3-header .aw3-kbd {
    font-size: 10.5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 7px;
    border-radius: 5px;
    font-weight: 700;
    white-space: nowrap;
}
#aw3-panel .aw3-close {
    background: rgba(255, 255, 255, 0.16);
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    color: #fff;
    min-width: 38px;
    min-height: 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#aw3-panel .aw3-close:hover { background: rgba(255, 255, 255, 0.3); }
#aw3-panel button:focus-visible {
    outline: 3px solid #0e7490;
    outline-offset: 2px;
}
#aw3-panel .aw3-close:focus-visible { outline-color: #fff; }

/* Sesli Okuma Bandı */
#aw3-panel .aw3-tts-banner {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 11px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}
#aw3-panel .aw3-tts-banner span {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
#aw3-panel .aw3-tts-toggle {
    position: relative;
    width: 50px;
    height: 28px;
    background: #94a3b8;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    flex-shrink: 0;
}
#aw3-panel .aw3-tts-toggle.on { background: #e20713; }
#aw3-panel .aw3-tts-toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}
#aw3-panel .aw3-tts-toggle.on::after { transform: translateX(22px); }

/* Kaydırılabilir İçerik */
#aw3-panel .aw3-scroll {
    overflow-y: auto;
    flex: 1;
    padding: 14px 16px;
}

/* Kaydırıcı / Adım Satırları */
#aw3-panel .aw3-slider-row {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 9px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
#aw3-panel .aw3-slider-row.active {
    border-color: #e20713;
    background: #fff1f2;
}
#aw3-panel .aw3-slider-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
#aw3-panel .aw3-slider-ctrl {
    display: flex;
    align-items: center;
    gap: 5px;
}
#aw3-panel .aw3-round-btn {
    min-width: 34px;
    min-height: 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #94a3b8;
    background: #fff;
    cursor: pointer;
    font-size: 17px;
    font-weight: 800;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#aw3-panel .aw3-round-btn:hover { border-color: #e20713; color: #e20713; }
#aw3-panel .aw3-slider-val {
    min-width: 46px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: #a3050e;
    font-variant-numeric: tabular-nums;
}

/* Bölüm Başlıkları (WCAG AA >= 4.5:1 kontrast) */
#aw3-panel .aw3-sec-title {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #475569;
    margin: 15px 0 9px;
    padding-bottom: 5px;
    border-bottom: 1.5px solid #e2e8f0;
}

/* 3 Sütunlu Kart Izgarası */
#aw3-panel .aw3-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
#aw3-panel .aw3-card {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 11px 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 82px;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
#aw3-panel .aw3-card:hover {
    border-color: #e20713;
    background: #fff;
    box-shadow: 0 4px 12px rgba(226, 7, 19, 0.12);
}
#aw3-panel .aw3-card.active {
    border-color: #e20713;
    background: #fff1f2;
    box-shadow: 0 0 0 2px rgba(226, 7, 19, 0.2);
}
#aw3-panel .aw3-card-icon {
    font-size: 24px;
    line-height: 1;
    color: #1e293b;
}
#aw3-panel .aw3-card-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    line-height: 1.25;
}

/* Alt Sıfırlama Çubuğu */
#aw3-panel .aw3-footer {
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}
#aw3-panel .aw3-reset {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #e20713, #a3050e);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
#aw3-panel .aw3-reset:hover { opacity: 0.92; }
#aw3-panel .aw3-credit {
    text-align: center;
    margin-top: 8px;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}
#aw3-panel .aw3-credit span { color: #a3050e; font-weight: 800; }

/* =====================================================================
   ERİŞİLEBİLİRLİK ETKİ SINIFLARI (FontAwesome / Bootstrap İkonları Korunur)
   ===================================================================== */
html.aw3-high-contrast { filter: contrast(1.6) !important; }
html.aw3-invert { filter: invert(1) hue-rotate(180deg) !important; }
html.aw3-invert img,
html.aw3-invert video,
html.aw3-invert picture,
html.aw3-invert #aw3-btn { filter: invert(1) hue-rotate(180deg) !important; }
html.aw3-grayscale { filter: grayscale(100%) !important; }
html.aw3-sepia { filter: sepia(80%) !important; }
html.aw3-low-saturation { filter: saturate(0.4) !important; }
html.aw3-high-saturation { filter: saturate(2) !important; }

html.aw3-big-cursor,
html.aw3-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M4 4l14 30 4-12 12-4z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 4 4, auto !important;
}

/* Okunabilir yazı tipi: FontAwesome ve Bootstrap ikon fontları bozulmaz */
html.aw3-dyslexia body :not(i):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not(.fa):not(.bi):not([class^="bi-"]):not(svg):not(#aw3-panel):not(#aw3-panel *) {
    font-family: 'Comic Sans MS', 'OpenDyslexic', Arial, sans-serif !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.14em !important;
}

/* Satır yüksekliği ve harf boşluğu (CSS değişkeni ile — AJAX içerikleri dahil, ikonlar hariç) */
html.aw3-lh-on body :is(p, span, a, li, td, th, label, h1, h2, h3, h4, h5, h6, input, textarea, select, button, small, strong, b, div):not(#aw3-panel):not(#aw3-panel *):not(#aw3-btn):not(.fas):not(.far):not(.bi) {
    line-height: var(--aw3-lh) !important;
}
html.aw3-ls-on body :is(p, span, a, li, td, th, label, h1, h2, h3, h4, h5, h6, input, textarea, select, button, small, strong, b):not(#aw3-panel):not(#aw3-panel *):not(#aw3-btn):not(.fas):not(.far):not(.bi) {
    letter-spacing: var(--aw3-ls) !important;
}

html.aw3-highlight-links a:not(#aw3-panel a) {
    outline: 3px solid #FF6D00 !important;
    outline-offset: 2px !important;
    text-decoration: underline !important;
    background: rgba(255, 109, 0, 0.1) !important;
}
html.aw3-hide-images img:not(#aw3-panel img) { opacity: 0.05 !important; }
html.aw3-stop-anim *:not(#aw3-panel):not(#aw3-panel *),
html.aw3-stop-anim *::before,
html.aw3-stop-anim *::after {
    animation: none !important;
    transition: none !important;
}
html.aw3-text-left body :not(#aw3-panel):not(#aw3-panel *):not(#aw3-btn) { text-align: left !important; }
html.aw3-text-right body :not(#aw3-panel):not(#aw3-panel *):not(#aw3-btn) { text-align: right !important; }
html.aw3-text-center body :not(#aw3-panel):not(#aw3-panel *):not(#aw3-btn) { text-align: center !important; }

/* Satır Vurgulama & Okuma Maskesi & Metin Büyüteç */
#aw3-line-guide {
    position: fixed;
    left: 0;
    width: 100%;
    height: 54px;
    background: rgba(250, 204, 21, 0.18);
    border-top: 2px solid rgba(217, 119, 6, 0.55);
    border-bottom: 2px solid rgba(217, 119, 6, 0.55);
    pointer-events: none;
    z-index: 999988;
    display: none;
}
#aw3-mask-top,
#aw3-mask-bot {
    position: fixed;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.68);
    pointer-events: none;
    z-index: 999988;
    display: none;
}
#aw3-mask-top { top: 0; }

#aw3-magnify-tip {
    position: fixed;
    background: #0f172a;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 20px;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-weight: 700;
    max-width: min(480px, calc(100vw - 24px));
    z-index: 999995;
    pointer-events: none;
    line-height: 1.4;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.45);
    display: none;
}

@media (pointer: coarse) {
    #aw3-panel .aw3-round-btn { min-width: 44px; min-height: 44px; width: 44px; height: 44px; }
}
@media (max-width: 480px) {
    dialog#aw3-panel { width: 100vw; }
    #aw3-panel .aw3-grid { gap: 6px; }
    #aw3-panel .aw3-card { padding: 9px 4px; min-height: 76px; }
}
