/* ==========================================================================
   Widget Aksesibilitas Disabilitas — W3C WAI • WCAG 2.2 AA
   ========================================================================== */
.a11y-ui,
.a11y-ui * {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    letter-spacing: normal;
    word-spacing: normal;
}

.a11y-ui {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2147483000;
    font-size: 13px;
    line-height: 1.4;
    color: #0f172a;
}

/* reset ringan agar gaya button/select bawaan situs tidak merusak tampilan widget */
.a11y-ui button {
    margin: 0;
    text-transform: none;
    text-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.a11y-ui .a11y-sw {
    padding: 0 !important;
    min-width: 40px !important;
    width: 40px !important;
    height: 23px !important;
    min-height: 23px !important;
}

.a11y-ui .a11y-close {
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
}

/* ukuran & jarak dalam tombol dikunci agar kebal terhadap gaya button situs */
.a11y-ui button {
    min-width: 0;
    min-height: 0;
    line-height: 1.2;
}

.a11y-ui .a11y-tab {
    padding: 8px 2px;
}

.a11y-ui .a11y-step button {
    padding: 0 8px;
    min-width: 36px;
}

.a11y-ui .a11y-act {
    padding: 0 10px;
}

.a11y-ui .a11y-btn-guide {
    padding: 0 8px;
}

.a11y-ui .a11y-btn-reset {
    padding: 0 13px;
}

.a11y-ui .a11y-foot button {
    min-width: 0;
}

/* ---------- Tombol melayang ---------- */
/* tombol bulat sempurna: gaya button bawaan situs tidak boleh mengubah ukurannya */
.a11y-ui .a11y-fab {
    box-sizing: border-box !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    padding: 0 !important;
    margin: 0 !important;
    aspect-ratio: 1 / 1;
    line-height: 0 !important;
    flex: none;
    border-radius: 50%;
    border: 2px solid #fde68a;
    background: radial-gradient(circle at 30% 25%, #fde047, #eab308);
    color: #0f172a;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3), 0 0 0 3px rgba(250, 204, 21, .22);
    transition: transform .2s ease, box-shadow .2s ease;
}

.a11y-fab:hover {
    transform: scale(1.06);
}

.a11y-fab:focus-visible,
.a11y-ui button:focus-visible,
.a11y-ui select:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 2px;
}

.a11y-fab svg {
    width: 28px !important;
    height: 28px !important;
    display: block;
}

/* ---------- Panel ---------- */
.a11y-panel {
    position: absolute;
    right: 0;
    bottom: 62px;
    width: 336px;
    max-width: calc(100vw - 24px);
    height: min(540px, calc(100vh - 110px));
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .4);
    transform-origin: bottom right;
}

.a11y-panel.is-open {
    display: flex;
    animation: a11yPop .18s ease-out;
}

@keyframes a11yPop {
    from {
        opacity: 0;
        transform: scale(.94) translateY(8px);
    }
}

.a11y-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #0e7490, #0f766e 55%, #0b6b3a);
    color: #fff;
}

.a11y-head-ic {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #facc15;
    color: #0f172a;
    display: grid;
    place-items: center;
}

.a11y-head-ic svg {
    width: 20px;
    height: 20px;
}

.a11y-head-tx {
    flex: 1;
    min-width: 0;
}

.a11y-head-tx h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.a11y-head-tx small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: rgba(255, 255, 255, .85);
}

.a11y-close {
    flex: none;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.a11y-close svg {
    width: 16px;
    height: 16px;
}

.a11y-close:hover {
    background: rgba(255, 255, 255, .35);
}

/* ---------- Tab ---------- */
.a11y-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px;
    background: #eef2f6;
}

.a11y-tab {
    border: 0;
    border-radius: 10px;
    background: transparent;
    padding: 8px 2px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.a11y-tab svg {
    width: 15px;
    height: 15px;
}

.a11y-tab:hover {
    background: #fff;
}

.a11y-tab[aria-selected="true"] {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
}

/* ---------- Isi ---------- */
.a11y-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px;
    background: #f8fafc;
    overscroll-behavior: contain;
}

.a11y-pane {
    display: none;
    gap: 7px;
    flex-direction: column;
}

.a11y-pane.is-on {
    display: flex;
}

.a11y-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.a11y-item-tx {
    flex: 1;
    min-width: 0;
}

.a11y-item-tx b {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
}

.a11y-item-tx span {
    display: block;
    margin-top: 1px;
    font-size: 11.5px;
    color: #475569;
}

/* saklar */
.a11y-sw {
    flex: none;
    position: relative;
    width: 40px;
    height: 23px;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: background .2s;
    padding: 0;
}

.a11y-sw::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
    transition: transform .2s;
}

.a11y-sw[aria-checked="true"] {
    background: #15803d;
}

.a11y-sw[aria-checked="true"]::after {
    transform: translateX(17px);
}

/* stepper & segmen */
.a11y-step {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.a11y-step button,
.a11y-act {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    border-radius: 9px;
    min-width: 32px;
    height: 32px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.a11y-step button:hover,
.a11y-act:hover {
    background: #f1f5f9;
}

.a11y-step output {
    min-width: 40px;
    text-align: center;
    font-weight: 800;
    font-size: 12.5px;
}

.a11y-act {
    width: 100%;
    padding: 0 10px;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.a11y-act.is-primary {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

.a11y-act.is-primary:hover {
    background: #166534;
}

.a11y-note {
    margin: 0;
    padding: 9px 11px;
    border-radius: 10px;
    background: #fef9c3;
    color: #713f12;
    font-size: 12px;
}

/* panduan */
.a11y-guide {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.a11y-guide.is-on {
    display: flex;
}

.a11y-guide h3 {
    margin: 4px 0 0;
    font-size: 13.5px;
    font-weight: 800;
}

.a11y-guide p,
.a11y-guide li {
    margin: 0;
    font-size: 12px;
    color: #334155;
}

.a11y-guide ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 5px;
}

.a11y-guide kbd {
    border: 1px solid #94a3b8;
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #fff;
    padding: 0 5px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
}

/* ---------- Kaki ---------- */
.a11y-foot {
    display: flex;
    gap: 8px;
    padding: 9px 10px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.a11y-foot button {
    height: 36px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.a11y-foot svg {
    width: 15px;
    height: 15px;
}

.a11y-btn-guide {
    flex: 1;
    border: 0;
    background: #15803d;
    color: #fff;
}

.a11y-btn-guide:hover {
    background: #166534;
}

.a11y-btn-reset {
    padding: 0 13px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
}

.a11y-btn-reset:hover {
    background: #f1f5f9;
}

/* ---------- Pemandu baca & masker ---------- */
.a11y-guide-line {
    position: fixed;
    left: 0;
    right: 0;
    height: 6px;
    background: #facc15;
    box-shadow: 0 0 0 2px #000;
    z-index: 2147482000;
    pointer-events: none;
    display: none;
}

.a11y-mask-t,
.a11y-mask-b {
    position: fixed;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, .72);
    z-index: 2147482000;
    pointer-events: none;
    display: none;
}

.a11y-mask-t {
    top: 0;
}

.a11y-mask-b {
    bottom: 0;
}

html.a11y-guide-on .a11y-guide-line,
html.a11y-mask-on .a11y-mask-t,
html.a11y-mask-on .a11y-mask-b {
    display: block;
}

.a11y-speaking {
    outline: 3px solid #f59e0b !important;
    outline-offset: 2px !important;
    background: rgba(250, 204, 21, .25) !important;
}

/* ==========================================================================
   EFEK PADA HALAMAN  (widget sendiri dikecualikan lewat .a11y-ui)
   ========================================================================== */
/* --- filter warna (digabung lewat variabel) --- */
html.a11y-f body>*:not(.a11y-ui) {
    filter: var(--a11y-f1, ) var(--a11y-f2, ) var(--a11y-f3, );
}

html.a11y-mono {
    --a11y-f1: grayscale(1);
}

html.a11y-invert {
    --a11y-f2: invert(1) hue-rotate(180deg);
}

html.a11y-lowsat {
    --a11y-f3: saturate(.45);
}

html.a11y-invert body>*:not(.a11y-ui) :is(img, video, picture, canvas, iframe) {
    filter: invert(1) hue-rotate(180deg);
}

html.a11y-dark,
html.a11y-dark body {
    background: #000 !important;
}

html.a11y-light,
html.a11y-light body {
    background: #fff !important;
}

/* --- kontras gelap: hitam + kuning --- */
html.a11y-dark body>*:not(.a11y-ui),
html.a11y-dark body>*:not(.a11y-ui) *:not(img):not(video):not(svg):not(path) {
    background-color: #000 !important;
    background-image: none !important;
    color: #ffeb3b !important;
    border-color: #ffeb3b !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.a11y-dark body>*:not(.a11y-ui) a,
html.a11y-dark body>*:not(.a11y-ui) a * {
    color: #00e5ff !important;
}

html.a11y-dark body>*:not(.a11y-ui) svg {
    fill: currentColor;
}

/* --- kontras terang: hitam di atas putih --- */
html.a11y-light body>*:not(.a11y-ui),
html.a11y-light body>*:not(.a11y-ui) *:not(img):not(video):not(svg):not(path) {
    background-color: #fff !important;
    background-image: none !important;
    color: #000 !important;
    border-color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.a11y-light body>*:not(.a11y-ui) a,
html.a11y-light body>*:not(.a11y-ui) a * {
    color: #0000b8 !important;
}

/* --- tautan --- */
html.a11y-links body>*:not(.a11y-ui) a {
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    background: #fff59d !important;
    color: #0b3d91 !important;
    outline: 1px solid #0b3d91;
}

html.a11y-links body>*:not(.a11y-ui) button,
html.a11y-links body>*:not(.a11y-ui) [role="button"] {
    outline: 2px solid #0b3d91 !important;
}

/* --- latar polos --- */
html.a11y-plain body>*:not(.a11y-ui),
html.a11y-plain body>*:not(.a11y-ui) * {
    background-image: none !important;
}

html.a11y-plain body>*:not(.a11y-ui) img[alt=""],
html.a11y-plain body>*:not(.a11y-ui) img:not([alt]),
html.a11y-plain body>*:not(.a11y-ui) picture,
html.a11y-plain body>*:not(.a11y-ui) video {
    visibility: hidden !important;
}

/* --- teks --- */
html.a11y-ls body>*:not(.a11y-ui),
html.a11y-ls body>*:not(.a11y-ui) * {
    letter-spacing: .12em !important;
    word-spacing: .16em !important;
}

html.a11y-lh body>*:not(.a11y-ui),
html.a11y-lh body>*:not(.a11y-ui) * {
    line-height: 1.9 !important;
}

html.a11y-font body>*:not(.a11y-ui),
html.a11y-font body>*:not(.a11y-ui) *:not(i):not([class*="fa"]):not(svg) {
    font-family: Verdana, Tahoma, 'Trebuchet MS', Arial, sans-serif !important;
}

html.a11y-left body>*:not(.a11y-ui),
html.a11y-left body>*:not(.a11y-ui) * {
    text-align: left !important;
}

html.a11y-heads body>*:not(.a11y-ui) :is(h1, h2, h3, h4, h5, h6, [role="heading"]) {
    outline: 2px dashed #b45309 !important;
    outline-offset: 3px !important;
    background: #fffbeb !important;
    color: #000 !important;
}

html.a11y-zoom body>*:not(.a11y-ui) {
    zoom: var(--a11y-zoom, 1);
}

/* --- motorik --- */
html.a11y-cursor,
html.a11y-cursor body,
html.a11y-cursor body>*:not(.a11y-ui) * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 9-6.5 1.7L9.7 19z' fill='%23000' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, auto !important;
}

html.a11y-cursor body>*:not(.a11y-ui) :is(a, button, [role="button"], input, select, label, summary) {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M9 11V5a1.6 1.6 0 013.2 0v5l5 1.2a2 2 0 011.5 2.3l-.8 5.2a3 3 0 01-3 2.6H11a3 3 0 01-2.4-1.2L4.8 15a1.6 1.6 0 012.4-2z' fill='%23fff' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 14 4, pointer !important;
}

html.a11y-still body>*:not(.a11y-ui),
html.a11y-still body>*:not(.a11y-ui) * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

html.a11y-focus body>*:not(.a11y-ui) :focus,
html.a11y-focus body>*:not(.a11y-ui) :focus-visible {
    outline: 4px solid #f59e0b !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 7px rgba(0, 0, 0, .85) !important;
}

html.a11y-target body>*:not(.a11y-ui) :is(a, button, [role="button"], input[type="submit"], input[type="button"]) {
    min-height: 44px;
    min-width: 44px;
}

@media (max-width: 480px) {
    .a11y-ui {
        right: 14px;
        bottom: 14px;
    }

    .a11y-panel {
        position: fixed;
        right: 8px;
        left: 8px;
        bottom: 74px;
        width: auto;
        max-width: none;
    }
}

@media print {
    .a11y-ui {
        display: none !important;
    }
}
