/* public/css/accessibility.css */
.accessibility-widget-wrapper {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 99999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.accessibility-fab {
    background: #1e3a8a;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    width: 55px;
    height: 55px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
}

.accessibility-fab i {
    margin: 0 !important;
    padding: 0 !important;
}

.accessibility-fab:hover {
    background: #004085;
    transform: scale(1.1);
}

.accessibility-drawer {
    position: fixed;
    top: 0;
    left: -380px;
    width: 360px;
    height: 100%;
    background: #ffffff;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease-in-out;
    z-index: 100000;
    display: flex;
    flex-direction: column;
}

.accessibility-drawer.active {
    left: 0;
}

.drawer-header {
    background: #0f2744;
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.drawer-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.drawer-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.accessibility-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: bold;
    color: #6c757d;
    display: block;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.accessibility-option-btn {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 12px;
    border-radius: 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.accessibility-option-btn:hover {
    background: #e9ecef;
}

.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.accessibility-card-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.accessibility-card-btn:hover {
    background: #e9ecef;
    border-color: #0056b3;
    color: #0056b3;
}

/* Styling Tombol Floating WhatsApp */
.whatsapp-widget-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.whatsapp-fab {
    background: #25d366;
    /* Warna hijau khas WhatsApp */
    color: #ffffff;
    border: none;
    border-radius: 50%;
    /* Bulat sempurna */
    width: 55px;
    /* Lebar tombol */
    height: 55px;
    /* Tinggi tombol */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    font-size: 30px;
    /* Ukuran ikon WhatsApp */
    transition: all 0.3s ease;
    line-height: 1;
}

.whatsapp-fab i {
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff !important;
}

.whatsapp-fab:hover {
    background: #20ba5a;
    transform: scale(1.1);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* ==========================================================================
   STATUS TOMBOL AKTIF & ANIMASI AKSESIBILITAS
   ========================================================================== */
.accessibility-card-btn.active,
.accessibility-option-btn.active {
    background: #0f2744 !important;
    color: #ffffff !important;
    border-color: #0f2744 !important;
    box-shadow: 0 4px 10px rgba(15, 39, 68, 0.35) !important;
}

.accessibility-card-btn.active i,
.accessibility-card-btn.active span,
.accessibility-option-btn.active i,
.accessibility-option-btn.active span {
    color: #ffffff !important;
}

/* Animasi Tombol Pembaca Suara (Sedang Membaca) */
@keyframes speakingPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.accessibility-option-btn.speaking {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    animation: speakingPulse 1.8s infinite ease-in-out;
}

.accessibility-option-btn.speaking i,
.accessibility-option-btn.speaking span {
    color: #ffffff !important;
}

/* ==========================================================================
   1. UKURAN TEKS (BESAR & EKSTRA BESAR)
   ========================================================================== */
html.access-font-large {
    font-size: 118% !important;
}
html.access-font-large body,
html.access-font-large p,
html.access-font-large a,
html.access-font-large li,
html.access-font-large span:not([class*="fa"]):not([class*="icon"]):not(.pulse-indicator),
html.access-font-large input,
html.access-font-large select,
html.access-font-large textarea,
html.access-font-large td,
html.access-font-large th,
html.access-font-large button:not(.accessibility-drawer *) {
    font-size: 1.15em !important;
}
html.access-font-large h1 { font-size: 2.5rem !important; }
html.access-font-large h2 { font-size: 2.2rem !important; }
html.access-font-large h3 { font-size: 1.9rem !important; }
html.access-font-large h4 { font-size: 1.6rem !important; }
html.access-font-large h5 { font-size: 1.35rem !important; }
html.access-font-large h6 { font-size: 1.2rem !important; }

html.access-font-xlarge {
    font-size: 135% !important;
}
html.access-font-xlarge body,
html.access-font-xlarge p,
html.access-font-xlarge a,
html.access-font-xlarge li,
html.access-font-xlarge span:not([class*="fa"]):not([class*="icon"]):not(.pulse-indicator),
html.access-font-xlarge input,
html.access-font-xlarge select,
html.access-font-xlarge textarea,
html.access-font-xlarge td,
html.access-font-xlarge th,
html.access-font-xlarge button:not(.accessibility-drawer *) {
    font-size: 1.3em !important;
}
html.access-font-xlarge h1 { font-size: 2.9rem !important; }
html.access-font-xlarge h2 { font-size: 2.5rem !important; }
html.access-font-xlarge h3 { font-size: 2.2rem !important; }
html.access-font-xlarge h4 { font-size: 1.9rem !important; }
html.access-font-xlarge h5 { font-size: 1.6rem !important; }
html.access-font-xlarge h6 { font-size: 1.35rem !important; }

/* ==========================================================================
   2. KONTRAS & WARNA
   ========================================================================== */

/* Kontras Tinggi (WCAG AAA: Latar Hitam, Teks Kuning, Link Cyan) */
html.access-high-contrast,
html.access-high-contrast body {
    background-color: #000000 !important;
    color: #ffff00 !important;
}

html.access-high-contrast header,
html.access-high-contrast nav,
html.access-high-contrast footer,
html.access-high-contrast section,
html.access-high-contrast main,
html.access-high-contrast div:not(.accessibility-widget-wrapper):not(.accessibility-widget-wrapper *):not(.whatsapp-widget-wrapper):not(.whatsapp-widget-wrapper *),
html.access-high-contrast .card,
html.access-high-contrast .card-body,
html.access-high-contrast .modal-content,
html.access-high-contrast .dropdown-menu,
html.access-high-contrast .top-header-modern,
html.access-high-contrast .main-navbar,
html.access-high-contrast .formulir {
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
    box-shadow: none !important;
}

html.access-high-contrast h1,
html.access-high-contrast h2,
html.access-high-contrast h3,
html.access-high-contrast h4,
html.access-high-contrast h5,
html.access-high-contrast h6,
html.access-high-contrast p,
html.access-high-contrast span:not(.accessibility-widget-wrapper *),
html.access-high-contrast li,
html.access-high-contrast td,
html.access-high-contrast th,
html.access-high-contrast label,
html.access-high-contrast strong,
html.access-high-contrast b,
html.access-high-contrast i:not(.accessibility-widget-wrapper *):not(.whatsapp-widget-wrapper *) {
    color: #ffff00 !important;
}

html.access-high-contrast a:not(.accessibility-widget-wrapper *):not(.whatsapp-widget-wrapper *) {
    color: #00ffff !important;
    text-decoration: underline !important;
}

html.access-high-contrast a:not(.accessibility-widget-wrapper *):hover {
    color: #ffffff !important;
}

html.access-high-contrast input,
html.access-high-contrast select,
html.access-high-contrast textarea,
html.access-high-contrast button:not(.accessibility-widget-wrapper *):not(.whatsapp-widget-wrapper *) {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
}

html.access-high-contrast img,
html.access-high-contrast video {
    filter: contrast(140%) brightness(110%) !important;
    border: 2px solid #ffff00 !important;
}

/* Mode Gelap (Dark Mode) */
html.access-dark-mode,
html.access-dark-mode body {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

html.access-dark-mode header,
html.access-dark-mode nav,
html.access-dark-mode footer,
html.access-dark-mode section,
html.access-dark-mode .top-header-modern,
html.access-dark-mode .main-navbar,
html.access-dark-mode .card,
html.access-dark-mode .card-body,
html.access-dark-mode .modal-content,
html.access-dark-mode .dropdown-menu,
html.access-dark-mode .dropdown-item,
html.access-dark-mode .formulir,
html.access-dark-mode .bg-white,
html.access-dark-mode .bg-light,
html.access-dark-mode [class*="bg-white"],
html.access-dark-mode [class*="bg-light"] {
    background-color: #1e293b !important;
    background-image: none !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

html.access-dark-mode .dropdown-item:hover,
html.access-dark-mode .dropdown-item:focus {
    background-color: #334155 !important;
    color: #ffffff !important;
}

html.access-dark-mode h1,
html.access-dark-mode h2,
html.access-dark-mode h3,
html.access-dark-mode h4,
html.access-dark-mode h5,
html.access-dark-mode h6,
html.access-dark-mode p,
html.access-dark-mode span:not(.badge):not(.pulse-indicator):not(.accessibility-widget-wrapper *),
html.access-dark-mode li,
html.access-dark-mode label,
html.access-dark-mode td,
html.access-dark-mode th,
html.access-dark-mode strong {
    color: #e2e8f0 !important;
}

html.access-dark-mode a:not(.btn):not(.accessibility-widget-wrapper *):not(.whatsapp-widget-wrapper *) {
    color: #60a5fa !important;
}

html.access-dark-mode input,
html.access-dark-mode select,
html.access-dark-mode textarea {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid #475569 !important;
}

html.access-dark-mode table,
html.access-dark-mode .table {
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

/* Monokrom (Grayscale) */
html.access-monochrome body > *:not(.accessibility-widget-wrapper):not(.whatsapp-widget-wrapper) {
    filter: grayscale(100%) !important;
}

/* Balik Warna (Invert) */
html.access-invert body > *:not(.accessibility-widget-wrapper):not(.whatsapp-widget-wrapper) {
    filter: invert(100%) hue-rotate(180deg) !important;
}

html.access-invert img,
html.access-invert video,
html.access-invert iframe {
    filter: invert(100%) hue-rotate(180deg) !important;
}

/* ==========================================================================
   3. KETERBACAAN & NAVIGASI
   ========================================================================== */

/* Font Standar Terbaca */
html.access-standard-font,
html.access-standard-font body,
html.access-standard-font h1,
html.access-standard-font h2,
html.access-standard-font h3,
html.access-standard-font h4,
html.access-standard-font h5,
html.access-standard-font h6,
html.access-standard-font p,
html.access-standard-font a,
html.access-standard-font span:not([class*="fa"]):not([class*="icon"]):not(.accessibility-widget-wrapper *),
html.access-standard-font li,
html.access-standard-font button,
html.access-standard-font input,
html.access-standard-font select,
html.access-standard-font textarea,
html.access-standard-font td,
html.access-standard-font th {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Jarak Spasi (Text Spacing WCAG) */
html.access-spacing body,
html.access-spacing p,
html.access-spacing span:not([class*="fa"]):not([class*="icon"]):not(.accessibility-widget-wrapper *),
html.access-spacing a:not(.accessibility-widget-wrapper *),
html.access-spacing li,
html.access-spacing h1,
html.access-spacing h2,
html.access-spacing h3,
html.access-spacing h4,
html.access-spacing h5,
html.access-spacing h6,
html.access-spacing td,
html.access-spacing th,
html.access-spacing label,
html.access-spacing div:not(.accessibility-widget-wrapper *) {
    line-height: 2 !important;
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

/* Sorot Link (Highlight Links) */
html.access-highlight-links a:not(.accessibility-widget-wrapper *):not(.whatsapp-widget-wrapper *) {
    background-color: #fef08a !important;
    color: #1e1b4b !important;
    text-decoration: underline 2px solid #000000 !important;
    font-weight: 700 !important;
    outline: 2px solid #f59e0b !important;
    outline-offset: 1px !important;
}

html.access-highlight-links a:not(.accessibility-widget-wrapper *):not(.whatsapp-widget-wrapper *):hover {
    background-color: #fde047 !important;
    color: #000000 !important;
}