/* =========================================================
   SKIP TO CONTENT LINK (SCREEN READER & KEYBOARD)
   ========================================================= */
.pabjn-skip-link {
    position: fixed;
    left: 16px;
    top: -120px;
    z-index: 100001;
    padding: 10px 18px;
    border-radius: 10px;
    background: #04392a;
    color: #FFD23F !important;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    transition: top 0.18s ease;
}

.pabjn-skip-link:focus {
    top: 16px;
    outline: 3px solid #F5B40A;
}

/* =========================================================
   ROOT WIDGET AKSESIBILITAS (TERISOLASI DARI MODE VISUAL)
   ========================================================= */
.pabjn-a11y-root,
.pabjn-a11y-root * {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.pabjn-a11y-root {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99990;
}

.pabjn-a11y-root.pos-left  { left: 0; }
.pabjn-a11y-root.pos-right { right: 0; }

/* Tombol Tab Vertikal Mengambang */
.pabjn-a11y-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 9px;
    border: none;
    background: linear-gradient(180deg, #067856 0%, #059669 100%);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(4, 57, 42, 0.32);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.pos-left .pabjn-a11y-trigger {
    border-radius: 0 14px 14px 0;
    border-right: 2px solid #F5B40A;
}

.pos-right .pabjn-a11y-trigger {
    border-radius: 14px 0 0 14px;
    border-left: 2px solid #F5B40A;
}

.pabjn-a11y-trigger:hover {
    background: linear-gradient(180deg, #04392a 0%, #067856 100%);
    box-shadow: 0 12px 30px rgba(4, 57, 42, 0.42);
}

.pabjn-a11y-trigger-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
    color: #FFD23F;
}

.pabjn-a11y-trigger-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
}

/* Notifikasi Halus Sapaan Suara (Jika Autoplay Ditahan Browser) */
.pabjn-welcome-toast {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 99995;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 12px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #04392a 0%, #067856 100%);
    border: 1.5px solid #F5B40A;
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(4, 57, 42, 0.35);
    animation: pabjnToastSlide 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pos-right .pabjn-welcome-toast {
    left: auto;
    right: 22px;
}

@keyframes pabjnToastSlide {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pabjn-toast-play {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    text-align: left;
    padding: 0;
}

.pabjn-toast-ico {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #F5B40A;
    color: #04392a;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.pabjn-toast-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.pabjn-toast-text strong {
    font-size: 12.5px;
    font-weight: 800;
    color: #FFD23F;
}

.pabjn-toast-text small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
}

.pabjn-toast-close {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.pabjn-toast-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* =========================================================
   PANEL DIALOG AKSESIBILITAS
   ========================================================= */
.pabjn-a11y-panel {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 348px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 36px);
    background: #ffffff;
    color: #111827;
    border-radius: 18px;
    box-shadow: 0 24px 56px -12px rgba(4, 57, 42, 0.34), 0 0 0 1px rgba(4, 57, 42, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
}

.pos-left .pabjn-a11y-panel  { left: 52px; }
.pos-right .pabjn-a11y-panel { right: 52px; }

.pabjn-a11y-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #045a40 0%, #067856 55%, #0ea87a 100%);
    border-bottom: 2px solid #F5B40A;
    color: #ffffff;
    flex-shrink: 0;
}

.pabjn-a11y-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pabjn-a11y-head-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
    color: #FFD23F;
}

.pabjn-a11y-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
}

.pabjn-a11y-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color 0.16s ease;
}

.pabjn-a11y-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.pabjn-a11y-body {
    padding: 16px 18px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pabjn-a11y-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 8px;
}

/* Kontrol Ukuran Teks */
.pabjn-font-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f3f6f5;
    border: 1px solid #e2ebe7;
    border-radius: 12px;
    padding: 5px;
}

.pabjn-font-btn {
    width: 44px;
    height: 36px;
    border: 1px solid #d5e3dd;
    border-radius: 9px;
    background: #ffffff;
    color: #04392a;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(4, 57, 42, 0.06);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pabjn-font-btn:hover:not(:disabled) {
    background: #067856;
    border-color: #067856;
    color: #ffffff;
}

.pabjn-font-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pabjn-font-val {
    font-size: 14px;
    font-weight: 800;
    color: #04392a;
}

/* Grid 8 Kartu Mode Tampilan */
.pabjn-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pabjn-opt-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 10px;
    border-radius: 12px;
    border: 1.5px solid #e5ece9;
    background: #ffffff;
    color: #1f2937;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.pabjn-opt-card svg {
    flex-shrink: 0;
    color: #067856;
}

.pabjn-opt-card:hover {
    border-color: #067856;
    background: #f3faf7;
}

.pabjn-opt-card.is-active {
    border-color: #067856;
    background: linear-gradient(135deg, #045a40, #067856);
    color: #ffffff;
    box-shadow: 0 6px 14px -4px rgba(6, 120, 86, 0.35);
}

.pabjn-opt-card.is-active svg {
    color: #FFD23F;
}

/* Pembaca Layar (Suara) */
.pabjn-tts-primary {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 11px;
    border: 1px solid #cce7db;
    background: #e9f6f1;
    color: #045a40;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.pabjn-tts-primary:hover,
.pabjn-tts-primary.is-speaking {
    background: #067856;
    border-color: #067856;
    color: #ffffff;
}

.pabjn-tts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.pabjn-tts-sec {
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #1f2937;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pabjn-tts-sec:hover:not(:disabled) {
    border-color: #067856;
    background: #f3faf7;
    color: #04392a;
}

.pabjn-tts-sec:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pabjn-tts-slow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.pabjn-tts-slow input {
    width: 15px;
    height: 15px;
    accent-color: #067856;
}

.pabjn-a11y-note {
    margin: 10px 0 0;
    font-size: 11.5px;
    line-height: 1.5;
    color: #6b7280;
}

.pabjn-a11y-reset {
    width: 100%;
    padding: 11px 14px;
    border-radius: 11px;
    border: 1px solid #e5e7eb;
    background: #f8faf9;
    color: #6b7280;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.pabjn-a11y-reset:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* =========================================================
   EFEK 8 MODE AKSESIBILITAS PADA HALAMAN WEBSITE
   ========================================================= */

/* 1. Mode Gelap */
html.pabjn-a11y-dark body {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

html.pabjn-a11y-dark body > *:not(#pabjn-a11y-root):not(#wpadminbar) {
    background-color: #0f172a;
    color: #e2e8f0;
}

html.pabjn-a11y-dark .site-header,
html.pabjn-a11y-dark .news-section,
html.pabjn-a11y-dark .artikel-section,
html.pabjn-a11y-dark .survei-section,
html.pabjn-a11y-dark .single-main,
html.pabjn-a11y-dark .single-breadcrumb-bar,
html.pabjn-a11y-dark .info-agenda-section {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

html.pabjn-a11y-dark .quick-card,
html.pabjn-a11y-dark .bento-light,
html.pabjn-a11y-dark .news-featured-card,
html.pabjn-a11y-dark .news-side-item,
html.pabjn-a11y-dark .artikel-card,
html.pabjn-a11y-dark .board-card,
html.pabjn-a11y-dark .survei-card-survelag,
html.pabjn-a11y-dark .single-article-card,
html.pabjn-a11y-dark .sidebar-widget,
html.pabjn-a11y-dark .cal-card,
html.pabjn-a11y-dark .detail-panel-card,
html.pabjn-a11y-dark .mega-menu-panel,
html.pabjn-a11y-dark .mou-capsule,
html.pabjn-a11y-dark .mou-marquee-wrap,
html.pabjn-a11y-dark .mou-archive-table {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html.pabjn-a11y-dark :not(#pabjn-a11y-root):not(#pabjn-a11y-root *) :is(h1, h2, h3, h4, .brand-title, .section-title, .news-featured-title, .news-side-title, .artikel-card-title, .board-row-title, .mou-partner-name, .mou-cell-title) {
    color: #f8fafc !important;
}

html.pabjn-a11y-dark :not(#pabjn-a11y-root):not(#pabjn-a11y-root *) :is(p, .brand-address, .brand-contacts, .news-featured-excerpt, .board-row-meta, .single-content) {
    color: #cbd5e1 !important;
}

/* 2. Kontras Tinggi (Hitam - Kuning) */
html.pabjn-a11y-contrast body,
html.pabjn-a11y-contrast body > *:not(#pabjn-a11y-root):not(#wpadminbar),
html.pabjn-a11y-contrast body > *:not(#pabjn-a11y-root):not(#wpadminbar) * {
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffea00 !important;
    border-color: #ffea00 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.pabjn-a11y-contrast body > *:not(#pabjn-a11y-root):not(#wpadminbar) a,
html.pabjn-a11y-contrast body > *:not(#pabjn-a11y-root):not(#wpadminbar) button {
    color: #00ffff !important;
    text-decoration: underline !important;
}

/* 3. Skala Abu-abu (Diterapkan ke anak body selain widget agar position:fixed tetap aman) */
html.pabjn-a11y-grayscale body > *:not(#pabjn-a11y-root):not(#wpadminbar) {
    filter: grayscale(100%) !important;
}

/* 4. Garis Bawah Tautan */
html.pabjn-a11y-underline body > *:not(#pabjn-a11y-root):not(#wpadminbar) a {
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 2px !important;
}

/* 5. Font Mudah Dibaca */
html.pabjn-a11y-readable-font body > *:not(#pabjn-a11y-root):not(#wpadminbar),
html.pabjn-a11y-readable-font body > *:not(#pabjn-a11y-root):not(#wpadminbar) * {
    font-family: Arial, Verdana, Tahoma, sans-serif !important;
}

/* 6. Jarak Teks Lebar */
html.pabjn-a11y-spacing body > *:not(#pabjn-a11y-root):not(#wpadminbar) :is(p, a, li, span, h1, h2, h3, h4, td, th) {
    letter-spacing: 0.08em !important;
    word-spacing: 0.22em !important;
    line-height: 1.85 !important;
}

/* 7. Hentikan Animasi */
html.pabjn-a11y-stop-anim *,
html.pabjn-a11y-stop-anim *::before,
html.pabjn-a11y-stop-anim *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-play-state: paused !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
}

/* 8. Kursor Besar */
html.pabjn-a11y-big-cursor,
html.pabjn-a11y-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M5 3l24 14-10.5 2.5L13 30 5 3z' fill='%2304392a' stroke='%23FFD23F' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, auto !important;
}

@media (max-width: 520px) {
    .pos-left .pabjn-a11y-panel  { left: 12px; }
    .pos-right .pabjn-a11y-panel { right: 12px; }
    .pabjn-welcome-toast {
        left: 12px;
        right: 12px;
        bottom: 14px;
        justify-content: space-between;
    }
}