
/* =========================================================
   PA BUNTOK — ACCESSIBILITY ASSISTANT
========================================================= */

.pa-accessibility-trigger,
.pa-accessibility-panel,
.pa-accessibility-panel * {
    box-sizing: border-box;
}

/* Floating trigger */
.pa-accessibility-trigger {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 13px 10px;
    border: 0;
    border-radius: 0 14px 14px 0;
    background: #0B7A3B;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
    font: inherit;
    transition: background .2s ease, padding .2s ease;
}

.pa-accessibility-trigger:hover {
    background: #075D2D;
    padding-left: 13px;
}

.pa-accessibility-trigger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pa-accessibility-trigger-icon svg {
    width: 25px;
    height: 25px;
}

.pa-accessibility-trigger-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
}

/* Panel */
.pa-accessibility-panel {
    position: fixed;
    top: 50%;
    left: 60px;
    transform: translateY(-50%);
    z-index: 99999;
    width: min(420px, calc(100vw - 75px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 20px;
    background: #fff;
    color: #273449;
    box-shadow: 0 15px 60px rgba(0, 0, 0, .28);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.pa-accessibility-panel[hidden] {
    display: none !important;
}

/* Header */
.pa-accessibility-header {
    display: flex;
    align-items: center;
    gap: 14px;
	padding: 14px 20px;
    background: linear-gradient(120deg, #087D5B, #10B981);
    color: #fff;
}

.pa-accessibility-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
}

.pa-accessibility-header-icon svg {
    width: 27px;
    height: 27px;
}

.pa-accessibility-heading {
    display: flex;
    flex: 1;
    flex-direction: column;
    line-height: 1.4;
}

.pa-accessibility-heading span {
    font-size: 14px;
    opacity: .85;
}

.pa-accessibility-heading strong {
    font-size: 19px;
    color: #fff;
}

.pa-accessibility-close {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 29px;
    line-height: 1;
    cursor: pointer;
}

/* Body */
.pa-accessibility-body {
    padding: 16px;
}

.pa-accessibility-section {
    margin-bottom: 14px;
}

.pa-accessibility-section h3 {
    margin: 0 0 10px;
    color: #98A2B3;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Text size */
.pa-accessibility-text-size {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px;
    border-radius: 15px;
    background: #F0F2F5;
}

.pa-accessibility-text-size button {
    min-width: 50px;
    height: 44px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
    color: #087D5B;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

.pa-accessibility-text-size button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.pa-accessibility-text-size span {
    font-size: 17px;
    font-weight: 700;
}

/* Settings grid */
.pa-accessibility-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pa-accessibility-grid button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 48px;
    padding: 10px;
    border: 1px solid #E1E5EB;
    border-radius: 15px;
    background: #fff;
    color: #344054;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.pa-accessibility-grid button > span:first-child {
    flex-shrink: 0;
    font-size: 21px;
}

.pa-accessibility-grid button:hover,
.pa-accessibility-grid button[aria-pressed="true"] {
    border-color: #0B7A3B;
    background: #E8F5EF;
    color: #075D2D;
}

/* Text reader */
.pa-accessibility-reader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 10px;
    border: 0;
    border-radius: 14px;
    background: #E8F5EF;
    color: #075D2D;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.pa-accessibility-reader:hover {
    background: #D5EDE1;
}

/* Reset */
.pa-accessibility-reset {
    width: 100%;
    min-height: 42px;
    padding: 10px;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    background: #fff;
    color: #667085;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pa-accessibility-reset:hover {
    border-color: #0B7A3B;
    color: #0B7A3B;
}

/* Focus visibility */
.pa-accessibility-panel button:focus-visible,
.pa-accessibility-trigger:focus-visible {
    outline: 3px solid #D4AF37;
    outline-offset: 3px;
}

/* =========================================================
   ACCESSIBILITY DISPLAY MODES
========================================================= */


/* =========================================================
   DARK MODE — PA BUNTOK
========================================================= */

body.pa-a11y-dark {
    --pa-dark-bg: #121A17;
    --pa-dark-section: #18231E;
    --pa-dark-card: #202D26;
    --pa-dark-border: #34483C;
    --pa-dark-heading: #E7F1EB;
    --pa-dark-text: #C3D0C8;
    --pa-dark-link: #8EDDB4;
}

/* Main background */
body.pa-a11y-dark #page,
body.pa-a11y-dark .site,
body.pa-a11y-dark .site-content,
body.pa-a11y-dark .content-area {
    background-color: var(--pa-dark-bg) !important;
    color: var(--pa-dark-text);
}

/* GenerateBlocks containers */
body.pa-a11y-dark #page .gb-container,
body.pa-a11y-dark #page .gb-grid-wrapper,
body.pa-a11y-dark #page .gb-grid-column {
    background-color: var(--pa-dark-section);
    color: var(--pa-dark-text);
    border-color: var(--pa-dark-border);
}

/* Article and widgets */
body.pa-a11y-dark #page .inside-article,
body.pa-a11y-dark #page .widget {
    background-color: var(--pa-dark-card);
    color: var(--pa-dark-text);
    border-color: var(--pa-dark-border);
}

/* Headings */
body.pa-a11y-dark #page h1,
body.pa-a11y-dark #page h2,
body.pa-a11y-dark #page h3,
body.pa-a11y-dark #page h4,
body.pa-a11y-dark #page h5,
body.pa-a11y-dark #page h6 {
    color: var(--pa-dark-heading);
}

/* Body text */
body.pa-a11y-dark #page p,
body.pa-a11y-dark #page li,
body.pa-a11y-dark #page td,
body.pa-a11y-dark #page th,
body.pa-a11y-dark #page label {
    color: var(--pa-dark-text);
}

/* Links */
body.pa-a11y-dark #page a {
    color: var(--pa-dark-link);
}

/* Form controls */
body.pa-a11y-dark #page input,
body.pa-a11y-dark #page select,
body.pa-a11y-dark #page textarea {
    background-color: var(--pa-dark-card);
    color: var(--pa-dark-heading);
    border-color: var(--pa-dark-border);
}

/* High contrast */
body.pa-a11y-contrast #page {
    background: #000 !important;
    color: #fff !important;
}

body.pa-a11y-contrast #page * {
    color: #fff !important;
    border-color: #fff !important;
}

body.pa-a11y-contrast #page a {
    color: #FFFF00 !important;
    text-decoration: underline !important;
}

/* Preserve accessibility panel and trigger */
body.pa-a11y-contrast .pa-accessibility-panel,
body.pa-a11y-contrast .pa-accessibility-panel *,
body.pa-a11y-contrast .pa-accessibility-trigger {
    color: inherit !important;
    border-color: revert !important;
}


/* Grayscale */
body.pa-a11y-grayscale #page {
    filter: grayscale(100%);
}

/* Underline links */
body.pa-a11y-underline #page a {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* Readable font */
body.pa-a11y-readable #page {
    font-family: Arial, Helvetica, sans-serif !important;
}

body.pa-a11y-readable #page * {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Wider text spacing */
body.pa-a11y-spacing #page p,
body.pa-a11y-spacing #page li,
body.pa-a11y-spacing #page a,
body.pa-a11y-spacing #page label {
    letter-spacing: .08em !important;
    word-spacing: .16em !important;
    line-height: 1.8 !important;
}

/* Stop animations */
body.pa-a11y-motion #page *,
body.pa-a11y-motion #page *::before,
body.pa-a11y-motion #page *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

/* Big cursor */
body.pa-a11y-cursor,
body.pa-a11y-cursor #page,
body.pa-a11y-cursor #page * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 2 L5 25 L11 19 L16 29 L20 27 L15 17 L24 17 Z' fill='white' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 5 2, auto !important;
}

/* Text scaling */
body[style*="--pa-a11y-text-scale"] #page p,
body[style*="--pa-a11y-text-scale"] #page li,
body[style*="--pa-a11y-text-scale"] #page td,
body[style*="--pa-a11y-text-scale"] #page th,
body[style*="--pa-a11y-text-scale"] #page label {
    font-size: calc(1em * var(--pa-a11y-text-scale, 1));
}

/* Mobile */
@media (max-width: 480px) {
    .pa-accessibility-panel {
        width: calc(100vw - 24px);
        max-height: 88vh;
        border-radius: 17px;
    }
	
	.pa-accessibility-panel {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 24px);
        max-height: 88vh;
    }

    .pa-accessibility-body {
        padding: 16px;
    }

    .pa-accessibility-grid {
        gap: 8px;
    }

    .pa-accessibility-grid button {
        min-height: 58px;
        padding: 8px;
        font-size: 13px;
    }

    .pa-accessibility-trigger {
        padding: 11px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pa-accessibility-trigger,
    .pa-accessibility-grid button {
        transition: none;
    }
}
