/* ── Erişilebilirlik: panel + kipler (assets/cx/js/cx-a11y.js · partials/cx/header.php #cxA11y) ───────────────
   Her düzende yüklenir (layouts/cx.php). Kipler html sınıflarıdır; erken betik sayfa boyanmadan uygular. */

/* ── panel ── */
.cx-a11y .cx-a11y__panel { width: 336px; max-width: calc(100vw - 24px); max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); padding: 0; overflow: auto; border-radius: calc(18px * var(--ax-rs, 1)); box-shadow: 0 30px 60px -24px rgba(23, 67, 26, .55), 0 0 0 1px var(--cx-line, #e5efe6); }
.cx-a11y__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--cx-line, #e5efe6); background: #fff; }
.cx-a11y__ttl { flex: 1; display: flex; align-items: center; gap: 9px; font-size: calc(13.5px * var(--ax-fz, 1)); font-weight: 800; color: var(--ax-navy, #1b5e24); }
.cx-a11y__ttl i { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--ax-orl, #e7f2e8); color: var(--ax-navy, #1b5e24); font-size: 15px; }
.cx-a11y__reset { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--cx-line, #e5efe6); border-radius: 9px; background: #fff; color: var(--cx-text, #4f6e52); font: inherit; font-size: calc(11.5px * var(--ax-fz, 1)); font-weight: 800; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.cx-a11y__reset:hover { border-color: var(--ax-navy, #1b5e24); color: var(--ax-navy, #1b5e24); }
.cx-a11y.has-active .cx-a11y__reset { border-color: var(--ax-or, #237a2e); color: var(--ax-or, #237a2e); }
.cx-a11y__x { width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--cx-muted, #8da58f); font-size: 15px; cursor: pointer; transition: background .2s, color .2s; }
.cx-a11y__x:hover { background: var(--cx-soft, #f1f7f1); color: var(--ax-navy, #1b5e24); }
.cx-a11y__body { padding: 12px 12px 4px; }
.cx-a11y .cx-a11y__row { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.cx-a11y .cx-a11y__row > span:first-child { flex: 1; font-size: calc(12.5px * var(--ax-fz, 1)); font-weight: 800; color: var(--cx-ink, #14213d); }
.cx-a11y .cx-a11y__row button { height: 34px; border: 1px solid var(--cx-line, #e5efe6); border-radius: calc(9px * var(--ax-rs, 1)); background: var(--cx-soft, #f1f7f1); color: var(--cx-ink, #14213d); font: inherit; font-size: calc(12.5px * var(--ax-fz, 1)); font-weight: 800; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.cx-a11y .cx-a11y__row button[data-cv-font] { width: 38px; }
.cx-a11y .cx-a11y__row button:hover { border-color: var(--ax-navy, #1b5e24); color: var(--ax-navy, #1b5e24); }
.cx-a11y .cx-a11y__row--seg { flex-wrap: wrap; }
.cx-a11y .cx-a11y__row--seg > span:first-child { flex-basis: 100%; margin-bottom: 2px; }
.cx-a11y__seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 1 1 100%; gap: 2px; padding: 3px; border-radius: calc(11px * var(--ax-rs, 1)); background: var(--cx-soft, #f1f7f1); }
.cx-a11y .cx-a11y__seg button { width: auto; height: 32px; padding: 0 8px; border: 0; border-radius: calc(8px * var(--ax-rs, 1)); background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; white-space: nowrap; font-size: calc(12px * var(--ax-fz, 1)); }
.cx-a11y .cx-a11y__seg button i { font-size: 11px; }
.cx-a11y .cx-a11y__seg button[aria-pressed="true"] { background: var(--ax-navy, #1b5e24); color: #fff; }
.cx-a11y__cap { display: block; margin: 10px 2px 6px; font-size: calc(10.5px * var(--ax-fz, 1)); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cx-muted, #8da58f); }
.cx-a11y__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cx-a11y__tile { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 7px 9px; border: 1px solid var(--cx-line, #e5efe6); border-radius: calc(12px * var(--ax-rs, 1)); background: #fff; color: var(--cx-ink, #14213d); font: inherit; font-size: calc(11.5px * var(--ax-fz, 1)); font-weight: 700; line-height: 1.25; text-align: left; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.cx-a11y__tile i { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--cx-soft, #f1f7f1); color: var(--ax-navy, #1b5e24); font-size: 13px; transition: background .2s, color .2s; }
.cx-a11y__tile:hover { border-color: var(--ax-navy, #1b5e24); }
.cx-a11y__tile[aria-pressed="true"] { background: var(--ax-navy, #1b5e24); border-color: var(--ax-navy, #1b5e24); color: #fff; }
.cx-a11y__tile[aria-pressed="true"] i { background: rgba(255, 255, 255, .16); color: #fff; }
.cx-a11y__tile[hidden] { display: none; }
.cx-a11y__note { display: flex; align-items: center; gap: 7px; margin: 0; padding: 10px 16px 12px; font-size: calc(11px * var(--ax-fz, 1)); color: var(--cx-muted, #8da58f); }
.cx-a11y.has-active .cx-topbar__btn::after { content: ""; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: var(--ax-or, #237a2e); }
.cx-a11y .cx-topbar__btn { position: relative; }
@media (max-width: 480px) {
  .cx-a11y .cx-a11y__panel { width: calc(100vw - 24px); right: -6px; }
  /* üst çubuktaki (yüzmeyen) düğme solda kalabilir: telefonda panel ekrana sabitlenir */
  .cx-a11y:not(.kv-a11y):not(.cx-a11y--fab) .cx-a11y__panel { position: fixed; left: 12px; right: 12px; top: 12px; bottom: auto; width: auto; max-width: none; max-height: calc(100dvh - 24px); }
  .cx-a11y .cx-a11y__row { flex-wrap: wrap; }
  .cx-a11y .cx-a11y__row > span:first-child { flex-basis: 100%; }
}

/* ── tema kalkanı: farklı temaların genel button/a kuralları paneli boyamasın (id özgüllüğü) ── */
#cxA11y button, #cxA11y a { box-sizing: border-box; margin: 0; font-family: inherit; font-size: inherit; line-height: 1.25; letter-spacing: normal; text-transform: none; text-decoration: none; text-shadow: none; box-shadow: none; background-image: none; outline-offset: 2px; }
#cxA11y .cx-a11y__tile { min-height: 48px; padding: 7px 9px; border: 1px solid var(--cx-line, #e5efe6); border-radius: calc(12px * var(--ax-rs, 1)); background: #fff; color: var(--cx-ink, #14213d); font-size: calc(11.5px * var(--ax-fz, 1)); font-weight: 700; }
#cxA11y .cx-a11y__tile[aria-pressed="true"] { background: var(--ax-navy, #1b5e24); border-color: var(--ax-navy, #1b5e24); color: #fff; }
#cxA11y .cx-a11y__tile i { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px; font-size: 13px; }
#cxA11y .cx-a11y__row button { height: 34px; padding: 0 10px; border: 1px solid var(--cx-line, #e5efe6); border-radius: calc(9px * var(--ax-rs, 1)); background: var(--cx-soft, #f1f7f1); color: var(--cx-ink, #14213d); font-size: calc(12.5px * var(--ax-fz, 1)); font-weight: 800; }
#cxA11y .cx-a11y__row button[data-cv-font] { width: 38px; }
#cxA11y .cx-a11y__seg button { width: auto; height: 32px; padding: 0 8px; border: 0; border-radius: calc(8px * var(--ax-rs, 1)); background: transparent; font-size: calc(12px * var(--ax-fz, 1)); }
#cxA11y .cx-a11y__seg button[aria-pressed="true"] { background: var(--ax-navy, #1b5e24); color: #fff; }
#cxA11y .cx-a11y__reset { height: 30px; padding: 0 10px; border: 1px solid var(--cx-line, #e5efe6); border-radius: 9px; background: #fff; color: var(--cx-text, #4f6e52); font-size: calc(11.5px * var(--ax-fz, 1)); font-weight: 800; }
#cxA11y .cx-a11y__x { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--cx-muted, #8da58f); font-size: 15px; }
#cxA11y .cx-a11y__panel p, #cxA11y .cx-a11y__panel span, #cxA11y .cx-a11y__panel b { margin: 0; }
#cxA11y .cx-a11y__panel { overflow: auto; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); }

/* ── yüzen sürüm (cx-header.css olmayan temalar: .cx-a11y--fab) ── */
.cx-a11y--fab { position: fixed; right: 20px; bottom: 18px; z-index: 300; font-family: inherit; }
.cx-a11y--fab > .cx-topbar__btn { position: relative; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ax-navy, #1b5e24); font-size: 30px; box-shadow: 0 0 0 4px var(--ax-or3, #9ee0a6), 0 14px 26px -12px rgba(13, 42, 18, .6); cursor: pointer; transition: color .2s; }
.cx-a11y--fab > .cx-topbar__btn:hover { color: var(--ax-navy2, #123a17); }
.cx-a11y--fab .cx-a11y__panel { position: absolute; right: 0; bottom: calc(100% + 12px); top: auto; z-index: 90; display: none; background: #fff; color: var(--cx-ink, #14213d); border: 1px solid var(--cx-line, #e5efe6); font-size: 13px; text-align: left; }
.cx-a11y--fab.is-open .cx-a11y__panel { display: block; }
@media (max-width: 760px) {
  .cx-a11y--fab { right: 12px; bottom: 12px; }
  .cx-a11y--fab > .cx-topbar__btn { width: 50px; height: 50px; font-size: 25px; }
}

/* ── kipler ── */
/* altı çizili bağlantılar */
html.cx-ul body a:not(.cx-btn):not(.cxp-btn) { text-decoration: underline !important; text-underline-offset: 3px; }

/* okunabilir yazı tipi (simge yazı tipleri korunur) */
html.cx-font body :where(*:not(i, .fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"])) { font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif !important; }

/* geniş aralık */
html.cx-space body :where(p, li, dd, dt, td, th, blockquote, figcaption, label, h1, h2, h3, h4, h5, h6, a, b, strong, em, small, span:not([class^="fa-"]):not([class*=" fa-"])) { letter-spacing: .08em !important; word-spacing: .18em !important; line-height: 1.85 !important; }

/* bağlantıları vurgula */
html.cx-links body a:not(.cxp-btn):not(.cx-btn):not(.kv-nav__logo) { background: #fff3b0 !important; color: #111 !important; text-decoration: underline !important; outline: 2px solid #e6b400; outline-offset: 1px; border-radius: 3px; }
html.cx-links body a:not(.cxp-btn):not(.cx-btn):not(.kv-nav__logo) :where(*) { color: #111 !important; }

/* başlıkları vurgula */
html.cx-heads body :where(h1, h2, h3, h4, h5, h6) { outline: 2px dashed #c2410c !important; outline-offset: 5px; border-radius: 4px; }

/* büyük imleç */
html.cx-cursor, html.cx-cursor body :where(*) { cursor: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l16 12-7 1 4 7-3 1-4-7-6 5z' fill='%23000' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 7 4, auto !important; }
html.cx-cursor body :where(a, button, [role="button"], label, select, summary, input[type="checkbox"], input[type="radio"], .leaflet-interactive) { cursor: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M9 3a1.5 1.5 0 013 0v7h1V6a1.5 1.5 0 013 0v5h1V8a1.5 1.5 0 013 0v8a6 6 0 01-6 6h-2a6 6 0 01-5.2-3L3.6 13a1.5 1.5 0 012.5-1.6L9 14z' fill='%23000' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 18 5, pointer !important; }

/* animasyonları durdur */
html.cx-motion *, html.cx-motion *::before, html.cx-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }

/* görselleri gizle (yerleşim korunur) */
html.cx-noimg body :where(img, video, picture, iframe, canvas) { opacity: 0 !important; }
html.cx-noimg body :where(*) { background-image: none !important; }

/* gri tonlama: html/body'ye filter verilmez (sabit konumlu öğeleri bozar); en üstte tıklanamaz bir katman arkasını gri yapar */
html.cx-gray::after { content: ""; position: fixed; inset: 0; z-index: 2147483647; pointer-events: none; -webkit-backdrop-filter: grayscale(1); backdrop-filter: grayscale(1); }

/* odak vurgusu (klavye kullanıcıları) */
html.cx-focus body :focus { outline: 3px solid #e3a600 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px rgba(0, 0, 0, .85) !important; }

/* okuma kılavuzu */
.cx-guidebar { position: fixed; left: 0; right: 0; top: 0; z-index: 99998; height: 16px; border-top: 2px solid rgba(27, 94, 36, .9); border-bottom: 2px solid rgba(27, 94, 36, .9); background: rgba(158, 224, 166, .28); pointer-events: none; will-change: transform; }

/* sesli okuma: okunan blok */
.cx-tts-on { outline: 3px solid #e3a600 !important; outline-offset: 3px; background: rgba(255, 222, 89, .28) !important; border-radius: 4px; }
html.cx-tts body :where(p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, figcaption, label, a) { cursor: pointer; }

/* ── açık kontrast: beyaz zemin, siyah yazı, mavi bağlantı, kalın kenarlık; fotoğraflar KORUNUR ──
   (img/video kalır; satır içi url() arka planı kalır; boş kaplama öğeleri saydam olur ki altındaki fotoğraf görünsün;
    fotoğraf üstündeki yazılar okunsun diye düz zemin kutusu alır) */
html.cx-hc body, html.cx-hc body :where(*:not(img, video, svg, iframe, canvas, picture, path, circle, rect, line, polyline, polygon, g, use)) { background-color: #fff !important; color: #000 !important; border-color: #000 !important; text-shadow: none !important; box-shadow: none !important; }
html.cx-hc body :where(*:not([style*="url("])) { background-image: none !important; }
html.cx-hc body :where(:empty:not(img, video, svg, iframe, canvas, input, textarea, select, button, i, hr, br, [style*="url("])) { background-color: transparent !important; }
html.cx-hc body :where(:has(> img, > picture, > video), [style*="url("]) :where(h1, h2, h3, h4, h5, h6, p, a, small, b, strong, em, time, span:not(:empty)) { background-color: #fff !important; padding: .05em .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* fotoğraf kabının kardeşleri (üstüne binen metin panelleri): zemin saydam, yazılar zemin kutulu */
html.cx-hc body :where(:has(> img, > picture, > video)) ~ :where(*:not(img, picture, video, input, select, textarea)) { background-color: transparent !important; }
html.cx-hc body :where(:has(> img, > picture, > video)) ~ :where(*) :where(h1, h2, h3, h4, h5, h6, p, a, small, b, strong, em, time, span:not(:empty)), html.cx-hc body :where(:has(> img, > picture, > video)) ~ :where(h1, h2, h3, h4, h5, h6, p, a, small, b, strong, em, time) { background-color: #fff !important; padding: .05em .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
html.cx-hc body :where(a) { color: #0000d6 !important; text-decoration: underline !important; }
html.cx-hc body :where(a) :where(*:not(img, svg, path)) { color: #0000d6 !important; }
html.cx-hc body :where(button, [role="button"], input, select, textarea, .cx-topbar__btn) { border: 2px solid #000 !important; }
html.cx-hc body :where(.cxp-btn, .cx-btn, [aria-pressed="true"]) { background-color: #000 !important; color: #fff !important; border: 2px solid #000 !important; }
html.cx-hc body :where(.cxp-btn, .cx-btn, [aria-pressed="true"]) :where(*:not(img, svg, path)) { color: #fff !important; background-color: transparent !important; }
html.cx-hc body :where(hr, .cx-card, section, article, table, td, th, fieldset) { border-color: #000 !important; }
html.cx-hc body :where(td, th) { border: 1px solid #000 !important; }
html.cx-hc body :focus-visible { outline: 3px solid #000 !important; outline-offset: 2px !important; box-shadow: 0 0 0 7px #ffd84d !important; }
html.cx-hc body :where(::selection) { background: #ffd84d !important; color: #000 !important; }
html.cx-hc .cx-guidebar { background: rgba(255, 216, 77, .45); border-color: #000; }

/* ── koyu kontrast: siyah zemin, beyaz yazı, sarı bağlantı ve vurgular; fotoğraflar KORUNUR (açık kipteki gibi) ── */
html.cx-hcd body, html.cx-hcd body :where(*:not(img, video, svg, iframe, canvas, picture, path, circle, rect, line, polyline, polygon, g, use)) { background-color: #000 !important; color: #fff !important; border-color: #fff !important; text-shadow: none !important; box-shadow: none !important; }
html.cx-hcd body :where(*:not([style*="url("])) { background-image: none !important; }
html.cx-hcd body :where(:empty:not(img, video, svg, iframe, canvas, input, textarea, select, button, i, hr, br, [style*="url("])) { background-color: transparent !important; }
html.cx-hcd body :where(:has(> img, > picture, > video), [style*="url("]) :where(h1, h2, h3, h4, h5, h6, p, a, small, b, strong, em, time, span:not(:empty)) { background-color: #000 !important; padding: .05em .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* fotoğraf kabının kardeşleri (üstüne binen metin panelleri): zemin saydam, yazılar zemin kutulu */
html.cx-hcd body :where(:has(> img, > picture, > video)) ~ :where(*:not(img, picture, video, input, select, textarea)) { background-color: transparent !important; }
html.cx-hcd body :where(:has(> img, > picture, > video)) ~ :where(*) :where(h1, h2, h3, h4, h5, h6, p, a, small, b, strong, em, time, span:not(:empty)), html.cx-hcd body :where(:has(> img, > picture, > video)) ~ :where(h1, h2, h3, h4, h5, h6, p, a, small, b, strong, em, time) { background-color: #000 !important; padding: .05em .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
html.cx-hcd body :where(a) { color: #ffd84d !important; text-decoration: underline !important; }
html.cx-hcd body :where(a) :where(*:not(img, svg, path)) { color: #ffd84d !important; }
html.cx-hcd body :where(button, [role="button"], input, select, textarea, .cx-topbar__btn) { border: 2px solid #fff !important; }
html.cx-hcd body :where(.cxp-btn, .cx-btn, [aria-pressed="true"]) { background-color: #ffd84d !important; color: #000 !important; border: 2px solid #ffd84d !important; }
html.cx-hcd body :where(.cxp-btn, .cx-btn, [aria-pressed="true"]) :where(*:not(img, svg, path)) { color: #000 !important; background-color: transparent !important; }
html.cx-hcd body :where(hr, .cx-card, section, article, table, td, th, fieldset) { border-color: #fff !important; }
html.cx-hcd body :where(td, th) { border: 1px solid #fff !important; }
html.cx-hcd body :where(::placeholder) { color: #ddd !important; }
html.cx-hcd body :focus-visible { outline: 3px solid #ffd84d !important; outline-offset: 2px !important; box-shadow: 0 0 0 7px #000 !important; }
html.cx-hcd .cx-guidebar { background: rgba(255, 216, 77, .25); border-color: #ffd84d; }
html.cx-hcd .cx-tts-on { outline-color: #ffd84d !important; background: rgba(255, 216, 77, .18) !important; }
