/* ========================================
   ACCESSIBILITY WIDGET STYLES
   ======================================== */

/* Accessibility Toolbar */
.accessibility-toolbar {
    position: fixed;
    top: 100px;
    right: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: -2px 2px 10px rgba(0,0,0,0.15);
    border-radius: 8px 0 0 8px;
    transition: right 0.3s ease;
}

.accessibility-toolbar.collapsed {
    right: -240px;
}

.accessibility-toggle {
    position: relative; /* Untuk positioning ::before */
    left: -50px;
    top: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2c5f2d 0%, #1e4620 100%);
    color: #fff;
    border: 3px solid #fff;
    cursor: pointer;
    border-radius: 12px 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* Hide default text */
    transition: all 0.3s ease;
    box-shadow: -2px 2px 10px rgba(0,0,0,0.3);
    overflow: visible; /* Biarkan shadow terlihat */
}

/* Wheelchair symbol menggunakan CSS content */
.accessibility-toggle i {
    font-size: 28px;
    animation: pulse 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    display: inline-block;
}

/* Fallback: Tampilkan wheelchair unicode jika icon tidak load */
.accessibility-toggle i.fa-universal-access::before {
    content: '\267F'; /* Unicode wheelchair symbol ♿ */
    font-family: Arial, sans-serif;
    font-style: normal;
    font-size: 28px;
    font-weight: bold;
}

/* Jika FontAwesome loaded, gunakan icon FontAwesome */
.accessibility-toggle i.fa-universal-access.fa::before {
    content: '\f29a'; /* FontAwesome universal access icon */
    font-family: 'FontAwesome';
}

.accessibility-toggle:hover,
.accessibility-toggle:focus {
    background: linear-gradient(135deg, #1e4620 0%, #2c5f2d 100%);
    transform: scale(1.05);
    box-shadow: -3px 3px 15px rgba(0,0,0,0.4);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Wheelchair symbol sebagai konten utama tombol saat collapsed */
.accessibility-toolbar.collapsed .accessibility-toggle::before {
    content: '♿';
    font-size: 22px;
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
    animation: pulse 2s ease-in-out infinite;
    line-height: 1;
}

/* Sembunyikan wheelchair symbol saat panel terbuka, ganti dengan X */
.accessibility-toolbar:not(.collapsed) .accessibility-toggle::before {
    content: '✕';
    font-size: 18px;
    color: #fff;
    animation: none;
    line-height: 1;
}

/* Hide FontAwesome icon, kita pakai wheelchair unicode */
.accessibility-toggle i.fa-universal-access {
    display: none;
}

/* Tooltip label "Aksesibilitas" dipindah ke ::after untuk tooltip */
.accessibility-toolbar::after {
    content: 'Aksesibilitas';
    position: absolute;
    top: 50%;
    left: -120px;
    transform: translateY(-50%);
    background: #2c5f2d;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    font-family: Arial, sans-serif;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.2);
}

.accessibility-toolbar:hover::after {
    opacity: 1;
}

/* Icon enhancement */
.accessibility-toggle .fa-universal-access::before {
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.accessibility-content {
    padding: 20px;
    width: 240px;
}

.accessibility-content h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #2c5f2d;
    font-weight: bold;
    text-align: center;
}

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

.accessibility-group h4 {
    font-size: 13px;
    color: #333;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.accessibility-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.accessibility-btn {
    flex: 1;
    padding: 8px 12px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 60px;
}

.accessibility-btn:hover,
.accessibility-btn:focus {
    background: #e0e0e0;
    border-color: #2c5f2d;
}

.accessibility-btn.active {
    background: #2c5f2d;
    color: #fff;
    border-color: #2c5f2d;
}

.accessibility-btn i {
    margin-right: 4px;
}

.reset-btn {
    width: 100%;
    padding: 10px;
    background: #d9534f;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.reset-btn:hover,
.reset-btn:focus {
    background: #c9302c;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2c5f2d;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 5px 0;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid #4CAF50;
}

/* ========================================
   FONT SIZE ADJUSTMENTS
   ======================================== */

/* Small Font */
body.font-small {
    font-size: 12px;
}

body.font-small h1 {
    font-size: 22px;
}

body.font-small h2 {
    font-size: 20px;
}

body.font-small h3 {
    font-size: 18px;
}

body.font-small h4 {
    font-size: 16px;
}

body.font-small .header-top-left ul li {
    font-size: 11px;
}

/* Normal Font - Default */
body.font-normal {
    font-size: 14px;
}

/* Large Font */
body.font-large {
    font-size: 16px;
}

body.font-large h1 {
    font-size: 38px;
}

body.font-large h2 {
    font-size: 32px;
}

body.font-large h3 {
    font-size: 28px;
}

body.font-large h4 {
    font-size: 24px;
}

body.font-large .header-top-left ul li {
    font-size: 15px;
}

body.font-large nav ul li a {
    font-size: 15px;
}

/* ========================================
   HIGH CONTRAST MODE
   ======================================== */

body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}

body.high-contrast * {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

body.high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.high-contrast a:hover,
body.high-contrast a:focus {
    color: #ff0 !important;
    background: #333 !important;
}

body.high-contrast button,
body.high-contrast .btn,
body.high-contrast input[type="submit"] {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}

body.high-contrast .header2-area,
body.high-contrast .main-menu-area,
body.high-contrast .footer-area-top,
body.high-contrast .footer-area-bottom {
    background: #000 !important;
}

body.high-contrast img {
    opacity: 0.8;
    border: 2px solid #fff !important;
}

/* ========================================
   DARK MODE
   ======================================== */

body.dark-mode {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

body.dark-mode .header2-area,
body.dark-mode .main-menu-area {
    background: #2d2d2d !important;
}

body.dark-mode .header-top-area {
    background: #252525 !important;
}

body.dark-mode .header-top-left ul li,
body.dark-mode .header-top-left ul li a {
    color: #e0e0e0 !important;
}

body.dark-mode nav ul li a {
    color: #e0e0e0 !important;
}

body.dark-mode nav ul li a:hover,
body.dark-mode nav ul li.active a {
    color: #fff !important;
    background: #3d3d3d !important;
}

body.dark-mode .footer-area-top,
body.dark-mode .footer-area-bottom {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

body.dark-mode .footer-box h3,
body.dark-mode .footer-box p,
body.dark-mode .footer-box a,
body.dark-mode .footer-box li {
    color: #e0e0e0 !important;
}

body.dark-mode .card,
body.dark-mode .box,
body.dark-mode .panel {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: #3d3d3d !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

/* Dark mode images - slightly dimmed */
body.dark-mode img:not(.logo-area img) {
    opacity: 0.9;
}

/* Dark mode - Content areas */
body.dark-mode main,
body.dark-mode section,
body.dark-mode article,
body.dark-mode .container,
body.dark-mode .content,
body.dark-mode .about-page1-area,
body.dark-mode .news-event-area,
body.dark-mode .counter-area {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Dark mode - Headings */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #ffffff !important;
}

/* Dark mode - Paragraphs and text */
body.dark-mode p,
body.dark-mode span,
body.dark-mode div,
body.dark-mode li,
body.dark-mode td,
body.dark-mode th {
    color: #e0e0e0 !important;
}

/* Dark mode - Links */
body.dark-mode a {
    color: #8BC34A !important; /* Hijau terang untuk link */
}

body.dark-mode a:hover {
    color: #4CAF50 !important;
}

/* Dark mode - Boxes and panels */
body.dark-mode .about-page-content-holder,
body.dark-mode .content-box,
body.dark-mode .news-wrapper,
body.dark-mode .post-date {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

/* Dark mode - Buttons */
body.dark-mode .btn,
body.dark-mode button,
body.dark-mode .view-all-accent-btn {
    background: #2c5f2d !important;
    color: #ffffff !important;
    border-color: #4CAF50 !important;
}

body.dark-mode .btn:hover,
body.dark-mode button:hover,
body.dark-mode .view-all-accent-btn:hover {
    background: #4CAF50 !important;
}

/* Dark mode - Tables */
body.dark-mode table {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

body.dark-mode table th {
    background: #3d3d3d !important;
    color: #ffffff !important;
}

body.dark-mode table td {
    border-color: #555 !important;
}

/* Dark mode - Counter area (stats) */
body.dark-mode .counter-area {
    background: #2d2d2d !important;
}

body.dark-mode .counter1-box h2,
body.dark-mode .counter1-box p {
    color: #ffffff !important;
}

/* ========================================
   FOCUS STYLES FOR KEYBOARD NAVIGATION
   ======================================== */

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
}

/* ========================================
   ADDITIONAL VISUAL ENHANCEMENTS
   ======================================== */

/* Glow effect untuk menarik perhatian */
.accessibility-toggle {
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: -2px 2px 10px rgba(0,0,0,0.3);
    }
    50% {
        box-shadow: -2px 2px 15px rgba(44,95,45,0.6),
                    0 0 20px rgba(44,95,45,0.4);
    }
}

/* Notification dot - menggunakan span element */
.accessibility-notification-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background: #8BC34A; /* Hijau terang/lime green */
    border: 2px solid #fff;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(139,195,74,0.8);
    z-index: 10;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .accessibility-toolbar {
        top: 80px;
    }

    .accessibility-content {
        width: 200px;
        padding: 15px;
    }

    .accessibility-toggle {
        width: 45px;
        height: 45px;
        left: -45px;
        font-size: 20px;
    }

    .accessibility-toggle::before {
        font-size: 8px;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    .accessibility-toolbar.collapsed {
        right: -180px;
    }

    .accessibility-content {
        width: 180px;
        padding: 12px;
    }

    .accessibility-btn {
        font-size: 11px;
        padding: 6px 8px;
    }

    .accessibility-notification-dot {
        width: 8px;
        height: 8px;
        top: 3px;
        right: 3px;
    }

    /* Smaller wheelchair on mobile */
    .accessibility-toolbar.collapsed .accessibility-toggle::before {
        font-size: 18px;
    }

    .accessibility-toolbar:not(.collapsed) .accessibility-toggle::before {
        font-size: 16px;
    }
}
