/*
 * Panel Aksesibilitas (Gelombang 3) — gaya mandiri (tidak bergantung pada
 * kelas Tailwind supaya tidak terkena purge). Kelas pada <html>:
 *   a11y-text-1..3, a11y-contrast, a11y-gray, a11y-spacing, a11y-motion,
 *   a11y-links, a11y-font. Diatur oleh resources/js/accessibility.js.
 */

/* ---------- Tombol & panel ---------- */
[data-a11y-root] .sr-only, #a11y-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.a11y-panel, .a11y-panel * { font-family: "Plus Jakarta Sans", system-ui, sans-serif; }
.a11y-panel h2 { color: #151c29; }
.a11y-fab {
    position: fixed; right: 1rem; bottom: 6rem; z-index: 60;
    display: flex; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; border-radius: 9999px;
    background: #0b1b3b; color: #fff; border: 2px solid #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3); cursor: pointer;
}
.a11y-fab:hover { background: #17356a; }
.a11y-fab svg { width: 1.6rem; height: 1.6rem; }
.a11y-panel {
    position: fixed; right: 1rem; bottom: 10rem; z-index: 60;
    width: calc(100vw - 2rem); max-width: 22rem; max-height: calc(100vh - 12rem); overflow-y: auto;
    background: #fff; color: #151c29; border: 1px solid #93a3bf; border-radius: .75rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .3); padding: 1rem;
}
.a11y-panel[hidden], [data-a11y-root] [hidden] { display: none !important; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.a11y-title { font-size: 1rem; font-weight: 700; margin: 0; }
.a11y-section { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid #cfd9e8; }
.a11y-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.a11y-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.a11y-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    min-height: 2.5rem; padding: .35rem .7rem; border-radius: .5rem; font-size: .85rem; font-weight: 600;
    background: #fff; color: #151c29; border: 2px solid #66738a; cursor: pointer; text-align: center;
}
.a11y-btn:hover { background: #eef2f7; }
.a11y-btn[aria-pressed="true"] { background: #0b1b3b; color: #fff; border-color: #0b1b3b; }
.a11y-btn[aria-pressed="true"]::before { content: "\2713"; }
.a11y-level { min-width: 3.5rem; text-align: center; font-weight: 700; }
.a11y-close { min-height: 2.25rem; min-width: 2.25rem; padding: 0; }
.a11y-reset { width: 100%; margin-top: .75rem; }
.a11y-status { margin-top: .5rem; font-size: .8rem; min-height: 1.1rem; }
.a11y-note { margin: .5rem 0 0; font-size: .75rem; color: #4d5a70; }
.a11y-fab:focus-visible, .a11y-btn:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }

.a11y-voice { margin-top: .6rem; }
.a11y-select { width: 100%; min-height: 2.5rem; padding: .35rem .5rem; border-radius: .5rem; border: 2px solid #66738a; background: #fff; color: #151c29; font-size: .85rem; }
.a11y-select:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }

/* ---------- Ukuran teks (skala rem; menimpa html{font-size:15px} tema) ---------- */
html.a11y-text-1 { font-size: 17px !important; }
html.a11y-text-2 { font-size: 19.5px !important; }
html.a11y-text-3 { font-size: 22.5px !important; }

/* ---------- Kontras tinggi (hitam/putih/kuning) ---------- */
html.a11y-contrast, html.a11y-contrast body { background: #000 !important; background-image: none !important; color: #fff !important; }
html.a11y-contrast *, html.a11y-contrast *::before, html.a11y-contrast *::after {
    background-color: #000 !important; background-image: none !important;
    color: #fff !important; border-color: #fff !important;
    box-shadow: none !important; text-shadow: none !important;
    -webkit-text-fill-color: #fff !important;
}
html.a11y-contrast a, html.a11y-contrast a * { color: #ffeb3b !important; -webkit-text-fill-color: #ffeb3b !important; text-decoration: underline !important; }
html.a11y-contrast :focus-visible { outline: 3px solid #ffeb3b !important; outline-offset: 2px; }
html.a11y-contrast img, html.a11y-contrast video, html.a11y-contrast canvas { filter: none; }
html.a11y-contrast ::placeholder { color: #ddd !important; -webkit-text-fill-color: #ddd !important; }
html.a11y-contrast .a11y-btn[aria-pressed="true"] { background: #ffeb3b !important; color: #000 !important; -webkit-text-fill-color: #000 !important; }

/* ---------- Skala abu-abu ---------- */
html.a11y-gray { filter: grayscale(1); }

/* ---------- Spasi teks (WCAG 1.4.12) ---------- */
html.a11y-spacing body * { letter-spacing: .12em !important; word-spacing: .16em !important; line-height: 1.6 !important; }

/* ---------- Font mudah dibaca ---------- */
html.a11y-font body, html.a11y-font body * { font-family: Verdana, Tahoma, Arial, sans-serif !important; }

/* ---------- Tautan bergaris bawah ---------- */
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; }

/* ---------- Kurangi gerak ---------- */
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
html.a11y-motion .chat-ticker { overflow-y: auto; }
html.a11y-motion .chat-ticker-clone { display: none; }

/* ---------- Alat baca tambahan ---------- */
/* Kursor besar: PNG 48px (lebih andal daripada SVG di Chrome/Windows) */
html.a11y-cursor, html.a11y-cursor * {
    cursor: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAE8klEQVR4Xu1ZMUhkVxR9f8adXYm6UdRISKuQIohItLAMWbs0glVMMEy0tTFgY6E2ISxLSGPSGNEmICxIViQQUZCQSNYmJIVoZwoLZyDjBOKf9084z3dn37ozzuif+X5DLnxm/PPVe94957z77ijlBIAEAM+9d2cCQFKSJZC7kri74p0AvgTw0PO8wAUU6xDKAGjBRTwH0MWkATTEOnmbpOE8gFYAJxbEnwAG7gQIpwIEkAGgLYi/AHxiQSRjK+4SABgFrQUHnjjiLgo9NlEGAEUc6BcoviPFYkkpF4DWmhTCyclJMDs7a5mEc/tmD0C3UCqWFRAAmUwmoK5HRkaQzWaZv29BnAIYkkrEQhelKnB6ehp0dnaCIAYGBnBw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+BNAD9SfFcl7/IaQFpoRP5zCEY9cLZqp9vRWSqARgAPKiVvPzfNl3Ua0s4k3Nvba7Sws7Mjlsr7n0ciZolqmyrndFW01K2tLR4nzXRCay17CB3tLQFeSZOhotrkpUpiqQBIFU4jJGmJ3wB8BqAjkj3huuFY6veSsR3T/QDgAwD3r/s3Iw3HUt8HcAzgawDvuElEsheEDQvE7NiOyOP7zWa5sEDq34HWI65jAP/Hfyn+BXUbB6AxcFNZAAAAAElFTkSuQmCC") 3 2, auto !important;
}
html.a11y-cursor a, html.a11y-cursor a *, html.a11y-cursor button, html.a11y-cursor button *,
html.a11y-cursor [role="button"], html.a11y-cursor label, html.a11y-cursor select, html.a11y-cursor summary {
    cursor: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFdUlEQVR4Xu2ZXWhcRRiGnzlzkqZuEpO09SfqhdhSAooEiaAFixQbb9orUS9iQInEKxEsotIKRRRUatUETFvR2jtRCaipqZISvdCkELBqvRDEG6VUaLBtTEv2nDPyzZmzniTbbPYnmw34wrBhszvne2e+9/tbmA8PUAveWzPQKUuFyJpA+sSvA94GrgUimEeoppG4TDNggCngBmexX9OWOyQEWoFzjsSfwN1rhUSawDQQOhIXgSccCdFHzYp7IQFxo0B79lXWwZQbpYVeM8hHQEQcKUWolCXxEVgXE9ScLnIElLIuZDa1EO1/PHcDc+42TgFbUi5VM1hEoKWRyHyD+eRVTGujJZL1tX09D2xL3URN6GIRgdZGonPDGPMjZvIIZstNThcxiSzwZC2JOy+B6c8xwUmM+R5z/kvMttut8aH2iFQNiXvJkkH7EMxAWwbG34X+3XhhBJ5H5CmeAUaduCX0roq4C9Y8WkOUBR3A0Esw9CwqjPAiY0NtNzAGdEroXQ0SBQkIPPmUgfAC9D8Ko29CayN+GBH42hovJISMkKhq0lsWAYFSoD0ILkD3dhgbhM7N+EFI6GubI8Sd+l0ml32XvXc5KPohvoZgGjo7YGwAurvQQUikPZv0hsAu0URVKtqi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tNZoH6LwxLRLvZbb7cvUtGMQ/IhVSwriINS5I7kuL7J+A5YFO1ckKxSKLLF65msiUG8BWwG2zpUdNIQuoDwB/AIeCOBRaLqxVzs6sCIZKUG4nIqzrkrRSScmNNoubd5H+sBP4FUpTj+ROJcqIAAAAASUVORK5CYII=") 3 2, pointer !important;
}
html.a11y-cursor input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), html.a11y-cursor textarea {
    cursor: text !important;
}
/* Sorotan fokus tebal: untuk keyboard (fokus) dan juga saat kursor menunjuk elemen yang bisa diklik */
html.a11y-focus :focus, html.a11y-focus :focus-visible,
html.a11y-focus a:hover, html.a11y-focus button:hover, html.a11y-focus [role="button"]:hover,
html.a11y-focus input:hover, html.a11y-focus select:hover, html.a11y-focus textarea:hover, html.a11y-focus summary:hover {
    outline: 4px solid #ffbf00 !important; outline-offset: 3px !important;
    box-shadow: 0 0 0 7px #0b1b3b !important;
}
html.a11y-dyslexia body, html.a11y-dyslexia body * {
    font-family: "Comic Sans MS", "Trebuchet MS", Verdana, sans-serif !important;
    letter-spacing: .05em !important; word-spacing: .1em !important; text-align: left !important;
}
html.a11y-lines body * { line-height: 1.9 !important; }
html.a11y-cb-protan { filter: url('#a11y-f-protan'); }
html.a11y-cb-deutan { filter: url('#a11y-f-deutan'); }
html.a11y-cb-tritan { filter: url('#a11y-f-tritan'); }
.a11y-svgdefs { position: absolute; width: 0; height: 0; overflow: hidden; }
.a11y-ruler-bar {
    position: fixed; left: 0; right: 0; top: 40%; height: 3rem; z-index: 55; pointer-events: none;
    background: rgba(255, 235, 59, .18); border-top: 2px solid #0b1b3b; border-bottom: 2px solid #0b1b3b;
}
/* Tampilan sederhana: sembunyikan hiasan & ticker, satu kolom, ruang lega */
html.a11y-simple [aria-hidden="true"]:not(.a11y-fab *):not(.a11y-panel *):not(button *),
html.a11y-simple .chat-ticker, html.a11y-simple video, html.a11y-simple iframe { display: none !important; }
html.a11y-simple main { max-width: 48rem; margin-inline: auto; }
html.a11y-simple main * { animation: none !important; transition: none !important; }
html.a11y-simple main .grid { display: block !important; }
html.a11y-simple main .grid > * { margin-bottom: 1rem; }
html.a11y-simple body { font-size: 1.1em; }
.a11y-mic {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.75rem; min-height: 2.75rem; margin-left: .35rem; border-radius: .5rem;
    background: #fff; border: 2px solid #66738a; cursor: pointer; font-size: 1.1rem; vertical-align: middle;
}
.a11y-mic[aria-pressed="true"] { background: #b00020; color: #fff; border-color: #b00020; }
.a11y-mic:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }
@media (pointer: coarse) { .a11y-btn { min-height: 2.75rem; } }

/* ---------- Perbaikan umum ---------- */
:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }
@media (pointer: coarse) {
    main button, main [type="submit"], main select, main input:not([type="checkbox"]):not([type="radio"]) { min-height: 44px; }
    main a.inline-flex, main a[class*="px-"] { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print { [data-a11y-root] { display: none !important; } }

/* Panel dibuka dari navbar: muncul di bawah navbar di sisi kanan, bukan di pojok kanan bawah. */
body:has(.a11y-fab--nav) .a11y-panel{top:92px;bottom:auto;max-height:calc(100vh - 108px)}
@media (max-width:640px){body:has(.a11y-fab--nav) .a11y-panel{top:132px;max-height:calc(100vh - 148px)}}

/* Teks pembaca layar pada tombol yang sudah pindah ke navbar (di luar [data-a11y-root]) tetap tersembunyi. */
.a11y-fab--nav .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- Panel ringkas: ikon saja, keterangan saat disentuh / diarahkan ---------- */
.a11y-panel{padding:.55rem .65rem;max-width:21rem}
.a11y-panel .a11y-t{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.a11y-head{margin-bottom:.4rem}
.a11y-head .a11y-title{font-size:.9rem}
.a11y-head__aksi{display:flex;gap:.3rem}
.a11y-section{margin-top:.4rem;padding-top:.4rem}
.a11y-btn.a11y-ik{min-height:2.4rem;min-width:0;padding:0;border-radius:.5rem;border-width:1.5px;font-size:.85rem}
.a11y-btn.a11y-ik svg{width:1.25rem;height:1.25rem;flex:none}
.a11y-btn.a11y-ik[aria-pressed="true"]::before{content:none}
.a11y-head .a11y-ik{min-height:2.1rem;width:2.1rem}
.a11y-baris{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.a11y-ukuran{flex-wrap:nowrap;gap:.3rem}
.a11y-ukuran .a11y-ik{width:2.4rem}
.a11y-ukuran .a11y-level{min-width:2.7rem;font-size:.8rem}
.a11y-ikgrid{display:grid;grid-template-columns:repeat(6,1fr);gap:.3rem}
.a11y-ikgrid--3{grid-template-columns:repeat(3,2.4rem)}
.a11y-tts{display:flex;align-items:center;gap:.3rem}
.a11y-tts .a11y-ik{width:2.4rem;flex:none}
.a11y-tts .a11y-select{flex:1;min-width:0;min-height:2.4rem;font-size:.78rem;border-width:1.5px}
.a11y-cap{margin:.4rem 0 0;min-height:1.1rem;font-size:.8rem;font-weight:600;text-align:center;color:#151c29}
.a11y-status{margin-top:0;min-height:0;font-size:.75rem;text-align:center}
.a11y-note{margin:.3rem 0 0}
body:has(.a11y-fab--nav) .a11y-panel{top:84px;max-height:calc(100vh - 96px)}
@media (max-width:640px){body:has(.a11y-fab--nav) .a11y-panel{top:112px;max-height:calc(100vh - 124px)}}