/* Konyaaltı — yerel erişilebilirlik aracı (html sınıfları + --a11y-filter) */

/* Profil: animasyon / geçiş (epilepsi + ayrı “animasyonları durdur”) */
html.a11y-seizure-safe *,
html.a11y-seizure-safe *::before,
html.a11y-seizure-safe *::after,
html.a11y-stop-motion *,
html.a11y-stop-motion *::before,
html.a11y-stop-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* Birleşik görüntü filtresi (JS: --a11y-filter) — epilepsi/görme/palet bir arada */
body.public-body {
    filter: var(--a11y-filter, none);
}

html.a11y-palette-dark body.public-body {
    filter: invert(1) hue-rotate(180deg) !important;
}

html.a11y-palette-dark img,
html.a11y-palette-dark video:not(:fullscreen),
html.a11y-palette-dark iframe,
html.a11y-palette-dark picture {
    filter: invert(1) hue-rotate(180deg) !important;
}

/* ---------- Görme engelliler modu: mavi–beyaz yüksek kontrast (Bağcılar/EngelsizWeb benzeri) ---------- */
html.a11y-vision body.public-body {
    background-color: #e4ebf7 !important;
    color: #0a1f3a !important;
}

html.a11y-vision #site-navbar {
    background-color: #d5e3f5 !important;
    border-color: #5b7fb8 !important;
    --tw-border-opacity: 1 !important;
}

html.a11y-vision #site-navbar a,
html.a11y-vision #site-navbar .nav-link-core,
html.a11y-vision #site-navbar .text-white,
html.a11y-vision #site-navbar span {
    color: #082c52 !important;
}

html.a11y-vision #site-navbar [class*="bg-white"] {
    background-color: #cfe0f5 !important;
}

html.a11y-vision #nav-logo {
    filter: none !important;
}

html.a11y-vision .bg-white,
html.a11y-vision .bg-white\/95 {
    background-color: #eef4fc !important;
}

html.a11y-vision [class*="bg-slate-50"],
html.a11y-vision [class*="bg-slate-100"] {
    background-color: #e8f0fa !important;
}

html.a11y-vision .text-slate-600,
html.a11y-vision .text-slate-500,
html.a11y-vision .text-slate-700,
html.a11y-vision .text-slate-800,
html.a11y-vision .text-slate-900 {
    color: #0f2d4d !important;
}

html.a11y-vision .text-primary,
html.a11y-vision a.text-primary {
    color: #0b3d73 !important;
}

html.a11y-vision .bg-primary,
html.a11y-vision button.bg-primary,
html.a11y-vision a.bg-primary {
    background-color: #1a4d8c !important;
    color: #ffffff !important;
}

html.a11y-vision .border-slate-200,
html.a11y-vision .border-slate-300,
html.a11y-vision .border-white\/50 {
    border-color: #7a9ec4 !important;
}

html.a11y-vision footer.bg-primary,
html.a11y-vision footer[class*="bg-primary"] {
    background-color: #153d6b !important;
    color: #f1f5f9 !important;
}

html.a11y-vision footer a,
html.a11y-vision footer .text-white\/80 {
    color: #dbeafe !important;
}

html.a11y-vision #a11y-widget-panel {
    background-color: #f2f6fd !important;
    color: #0a1f3a !important;
}

html.a11y-vision #a11y-widget-panel .text-slate-900,
html.a11y-vision #a11y-widget-panel .text-slate-600,
html.a11y-vision #a11y-widget-panel .text-slate-500 {
    color: #0f2d4d !important;
}

/* Fotoğraf ve videolarda mavi ton / düet (gövde filtresi değil; öğe bazlı) */
html.a11y-vision body.public-body img:not(#nav-logo):not([src*="logo"]),
html.a11y-vision body.public-body picture img,
html.a11y-vision body.public-body video:not(:fullscreen) {
    filter: grayscale(0.25) sepia(0.35) hue-rotate(188deg) saturate(1.75) contrast(1.12) brightness(0.96) !important;
}

html.a11y-vision.a11y-reduce-images body.public-body img,
html.a11y-vision.a11y-reduce-images body.public-body picture img {
    opacity: 0.22 !important;
    filter: grayscale(1) sepia(0.2) hue-rotate(185deg) saturate(1.2) !important;
}

html.a11y-cognitive main {
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

html.a11y-cognitive:not(.a11y-dyslexia-font):not(.a11y-readable-font) body.public-body {
    line-height: 1.75 !important;
    letter-spacing: 0.025em !important;
}

html.a11y-adhd body.public-body [class*="backdrop-blur"],
html.a11y-adhd body.public-body [class*="shadow-2xl"] {
    box-shadow: none !important;
}

html.a11y-adhd body.public-body img[alt="Arka plan"],
html.a11y-adhd body.public-body .opacity-20 {
    opacity: 0.06 !important;
}

html.a11y-adhd body.public-body #site-navbar {
    border-bottom-width: 1px;
}

html.a11y-blind *:focus-visible {
    outline: 3px solid #1d4ed8 !important;
    outline-offset: 3px !important;
}

html.a11y-highlight-focus *:focus-visible {
    outline: 4px solid #ea580c !important;
    outline-offset: 4px !important;
}

/* Yazı boyutu (kök rem) */
html.a11y-fs-0 {
    font-size: 93.75%;
}

html.a11y-fs-1 {
    font-size: 100%;
}

html.a11y-fs-2 {
    font-size: 112.5%;
}

html.a11y-fs-3 {
    font-size: 125%;
}

/* Satır aralığı */
html.a11y-lh-0 body.public-body {
    line-height: 1.45 !important;
}

html.a11y-lh-1 body.public-body {
    line-height: 1.65 !important;
}

html.a11y-lh-2 body.public-body {
    line-height: 1.9 !important;
}

/* Harf aralığı */
html.a11y-ls-0 body.public-body {
    letter-spacing: 0 !important;
}

html.a11y-ls-1 body.public-body {
    letter-spacing: 0.02em !important;
}

html.a11y-ls-2 body.public-body {
    letter-spacing: 0.06em !important;
}

/* Metin hizası (ana içerik) */
html.a11y-align-left main {
    text-align: left !important;
}

html.a11y-align-center main {
    text-align: center !important;
}

html.a11y-align-right main {
    text-align: right !important;
}

/* Bağlantı / başlık vurgusu */
html.a11y-highlight-links a[href] {
    text-decoration: underline !important;
    text-underline-offset: 0.2em !important;
    text-decoration-thickness: 2px !important;
}

html.a11y-highlight-titles h1,
html.a11y-highlight-titles h2,
html.a11y-highlight-titles h3,
html.a11y-highlight-titles h4,
html.a11y-highlight-titles h5,
html.a11y-highlight-titles h6,
html.a11y-highlight-titles .public-title {
    background-color: rgba(250, 204, 21, 0.28) !important;
    box-decoration-break: clone;
    padding: 0.1em 0.2em;
}

/* Okunabilir sistem fontu */
html.a11y-readable-font:not(.a11y-dyslexia-font) body.public-body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Disleksi dostu (Lexend — layout’ta font linki) */
html.a11y-dyslexia-font body.public-body {
    font-family: "Lexend", system-ui, sans-serif !important;
}

html.a11y-dyslexia-font .public-title {
    font-family: "Lexend", system-ui, sans-serif !important;
}

/* Görselleri güçlü biçimde azalt (metin odaklı okuma) */
html.a11y-reduce-images img,
html.a11y-reduce-images picture img {
    opacity: 0.14 !important;
    filter: grayscale(1) !important;
}

#a11y-widget-panel:focus {
    outline: none;
}

/* Körlük modu: seçilen metin için sesli okuma araç çubuğu */
.a11y-tts-bar {
    position: fixed;
    z-index: 96;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem;
    border-radius: 9999px;
    background: hsl(215 58% 38%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
    pointer-events: auto;
}

.a11y-tts-bar::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid hsl(215 58% 38%);
}

.a11y-tts-bar[hidden] {
    display: none !important;
}

.a11y-tts-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.a11y-tts-bar button:hover {
    background: rgba(255, 255, 255, 0.35);
}

.a11y-tts-bar button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.a11y-tts-bar svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}
