/**
 * ================================================================
 * ACCESSIBILITY THEME - RSUD TIDAR
 * Modern, Smooth, Elegant, Clean & Consistent Accessibility UI
 * Pure CSS (Zero Server Load, GPU accelerated, 60fps)
 * ================================================================
 */

/* Keyframe Animations */
@keyframes aswBtnEntrance {
    0% {
        opacity: 0;
        transform: scale(0.6) translateY(25px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-3px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes aswPulseGlow {
    0%, 100% {
        box-shadow: 0 10px 28px rgba(1, 4, 136, 0.28),
                    0 2px 6px rgba(90, 184, 255, 0.4),
                    inset 0 1px 2px rgba(255, 255, 255, 0.8);
    }
    50% {
        box-shadow: 0 12px 34px rgba(1, 4, 136, 0.4),
                    0 0 18px rgba(90, 184, 255, 0.5),
                    inset 0 1px 2px rgba(255, 255, 255, 0.9);
    }
}

@keyframes aswPanelSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-35px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes aswOverlayFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* ================================================================
 * 1. FLOATING ACCESSIBILITY BUTTON (.asw-menu-btn)
 * Sesuai estetika RSUD Tidar: 50x50px, bottom 30px, left 30px
 * ================================================================ */
.asw-menu-btn {
    display: flex !important;
    visibility: visible !important;
    z-index: 999999 !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    left: 30px !important;
    bottom: 30px !important;
    position: fixed !important;
    border-radius: 50% !important;
    outline: none !important;
    cursor: pointer !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    background: linear-gradient(135deg, #5ab8ff 0%, #0848ca 65%, #010488 100%) !important;
    box-shadow: 0 10px 28px rgba(1, 4, 136, 0.28),
                0 2px 6px rgba(90, 184, 255, 0.4),
                inset 0 1px 2px rgba(255, 255, 255, 0.8) !important;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    text-decoration: none !important;
    animation: aswBtnEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both,
               aswPulseGlow 3s ease-in-out infinite !important;
}

/* Hover State */
.asw-menu-btn:hover {
    background: linear-gradient(135deg, #38a0ec 0%, #010488 100%) !important;
    border-color: #ffffff !important;
    transform: scale(1.12) translateY(-3px) !important;
    box-shadow: 0 16px 36px rgba(1, 4, 136, 0.42),
                0 0 20px rgba(90, 184, 255, 0.55),
                inset 0 1.5px 3px rgba(255, 255, 255, 0.9) !important;
}

/* Active / Click State */
.asw-menu-btn:active {
    transform: scale(0.94) translateY(1px) !important;
    box-shadow: 0 6px 18px rgba(1, 4, 136, 0.3) !important;
}

/* Icon Inside Button */
.asw-menu-btn svg {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    min-height: 25px !important;
    max-width: 25px !important;
    max-height: 25px !important;
    fill: #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(1, 4, 136, 0.4)) !important;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.asw-menu-btn:hover svg {
    transform: scale(1.12) rotate(6deg) !important;
}

/* ================================================================
 * 2. OVERLAY BACKDROP
 * ================================================================ */
.asw-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999998 !important;
    background: rgba(15, 41, 66, 0.4) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    animation: aswOverlayFadeIn 0.3s ease-out forwards !important;
}

/* ================================================================
 * 3. ACCESSIBILITY MODAL / DRAWER PANEL (.asw-menu)
 * ================================================================ */
.asw-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    width: 440px !important;
    max-width: 90vw !important;
    z-index: 1000000 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #f8fbfe !important;
    border-right: 1px solid rgba(226, 236, 245, 0.9) !important;
    box-shadow: 12px 0 45px rgba(15, 41, 66, 0.18) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    overflow: hidden !important;
    animation: aswPanelSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Panel Header */
.asw-menu-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    min-height: 62px !important;
    background: linear-gradient(135deg, #0848ca 0%, #010488 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 16px rgba(1, 4, 136, 0.22) !important;
    position: relative !important;
    z-index: 2 !important;
}

.asw-menu-header > div {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.asw-menu-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif !important;
    font-size: 16.5px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Header Action Buttons (Reset & Close) */
.asw-menu-reset,
.asw-menu-close {
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
}

.asw-menu-reset svg,
.asw-menu-close svg {
    width: 16px !important;
    height: 16px !important;
    fill: #ffffff !important;
    transition: transform 0.3s ease !important;
}

.asw-menu-reset:hover,
.asw-menu-close:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: #ffffff !important;
    transform: scale(1.08) !important;
    outline: none !important;
}

.asw-menu-reset:hover svg {
    transform: rotate(-180deg) !important;
}

.asw-menu-close:hover svg {
    transform: rotate(90deg) !important;
}

/* ================================================================
 * 4. SCROLLABLE CONTENT BODY
 * ================================================================ */
.asw-menu-content {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 18px !important;
    scroll-behavior: smooth !important;
}

.asw-menu-content::-webkit-scrollbar {
    width: 5px !important;
}

.asw-menu-content::-webkit-scrollbar-track {
    background: transparent !important;
}

.asw-menu-content::-webkit-scrollbar-thumb {
    background: rgba(8, 72, 202, 0.22) !important;
    border-radius: 10px !important;
}

.asw-menu-content::-webkit-scrollbar-thumb:hover {
    background: rgba(8, 72, 202, 0.4) !important;
}

/* Card Sections */
.asw-card {
    background: #ffffff !important;
    border: 1px solid rgba(226, 236, 245, 0.95) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    margin: 0 0 14px 0 !important;
    box-shadow: 0 4px 14px rgba(15, 41, 66, 0.03) !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.asw-card:hover {
    border-color: rgba(90, 184, 255, 0.5) !important;
    box-shadow: 0 6px 20px rgba(15, 41, 66, 0.06) !important;
}

.asw-card-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #0848ca !important;
    text-transform: uppercase !important;
    letter-spacing: 0.7px !important;
    padding: 0 0 10px 0 !important;
    margin: 0 0 12px 0 !important;
    border-bottom: 1px solid rgba(234, 242, 250, 0.9) !important;
}

/* Language Selector */
.asw-menu .asw-select {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    border: 1.5px solid rgba(226, 236, 245, 1) !important;
    background: #f8fbfe !important;
    color: #0f2942 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    outline: none !important;
    transition: all 0.25s ease !important;
}

.asw-menu .asw-select:hover {
    border-color: #5ab8ff !important;
    background: #ffffff !important;
}

.asw-menu .asw-select:focus {
    border-color: #0848ca !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(8, 72, 202, 0.12) !important;
}

/* ================================================================
 * 5. FONT SIZE ADJUSTMENT CONTROLLER
 * ================================================================ */
.asw-adjust-font {
    background: #f8fbfe !important;
    border: 1px solid rgba(226, 236, 245, 0.9) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
}

.asw-adjust-font .asw-label {
    display: flex !important;
    align-items: center !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e3a5f !important;
}

.asw-adjust-font .asw-label svg {
    width: 18px !important;
    height: 18px !important;
    fill: #0848ca !important;
    margin-right: 8px !important;
}

.asw-adjust-font > div:last-child {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 10px !important;
    padding: 4px 6px !important;
    background: #ffffff !important;
    border: 1px solid rgba(226, 236, 245, 1) !important;
    border-radius: 10px !important;
}

.asw-minus,
.asw-plus {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: #f0f6fc !important;
    border: 1px solid rgba(226, 236, 245, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.asw-minus svg,
.asw-plus svg {
    width: 14px !important;
    height: 14px !important;
    fill: #0848ca !important;
}

.asw-minus:hover,
.asw-plus:hover {
    background: #0848ca !important;
    border-color: #0848ca !important;
}

.asw-minus:hover svg,
.asw-plus:hover svg {
    fill: #ffffff !important;
}

.asw-amount {
    font-family: 'Space Grotesk', 'Inter', monospace, sans-serif !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #0848ca !important;
    min-width: 55px !important;
    text-align: center !important;
}

/* ================================================================
 * 6. ACCESSIBILITY FEATURE BUTTONS (.asw-btn)
 * ================================================================ */
.asw-items {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
}

.asw-btn {
    aspect-ratio: 1 / 1 !important;
    min-height: 90px !important;
    border-radius: 12px !important;
    padding: 10px 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background: #f8fbfe !important;
    border: 1.5px solid rgba(226, 236, 245, 0.95) !important;
    box-shadow: 0 2px 4px rgba(15, 41, 66, 0.02) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    gap: 6px !important;
}

.asw-btn svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    fill: #1e3a5f !important;
    transition: all 0.25s ease !important;
}

.asw-btn .asw-translate {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #1e3a5f !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    transition: color 0.2s ease !important;
}

/* Feature Button Hover */
.asw-btn:hover {
    background: #ffffff !important;
    border-color: #5ab8ff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(90, 184, 255, 0.2) !important;
}

.asw-btn:hover svg {
    fill: #0848ca !important;
    transform: scale(1.1) !important;
}

.asw-btn:hover .asw-translate {
    color: #0848ca !important;
}

/* Feature Button Active / Selected */
.asw-btn.asw-selected {
    background: linear-gradient(135deg, #0848ca 0%, #010488 100%) !important;
    border-color: #0848ca !important;
    box-shadow: 0 6px 16px rgba(8, 72, 202, 0.32) !important;
    transform: translateY(-1px) !important;
}

.asw-btn.asw-selected svg {
    fill: #ffffff !important;
    transform: scale(1.05) !important;
}

.asw-btn.asw-selected .asw-translate {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Checkmark indicator for selected state */
.asw-btn.asw-selected::after {
    content: "" !important;
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background-color: #5ab8ff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230848ca'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") !important;
    background-size: 11px 11px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    padding: 0 !important;
    border: none !important;
}

/* ================================================================
 * 7. RESET BUTTON IN FOOTER / CARD
 * ================================================================ */
.asw-menu-reset-footer-btn {
    border-radius: 10px !important;
    width: 100% !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
    padding: 11px 16px !important;
    background: #f0f6fc !important;
    color: #0848ca !important;
    border: 1.5px solid rgba(8, 72, 202, 0.2) !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.asw-menu-reset-footer-btn:hover {
    background: #0848ca !important;
    color: #ffffff !important;
    border-color: #0848ca !important;
    box-shadow: 0 4px 14px rgba(8, 72, 202, 0.22) !important;
    transform: translateY(-1px) !important;
    outline: none !important;
}

/* ================================================================
 * 8. PANEL FOOTER BRANDING
 * ================================================================ */
.asw-footer {
    background: #ffffff !important;
    padding: 12px 16px !important;
    text-align: center !important;
    border-top: 1px solid rgba(226, 236, 245, 0.9) !important;
}

.asw-footer a {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #5e7791 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.asw-footer a:hover {
    color: #0848ca !important;
}

.asw-footer a span {
    color: #0848ca !important;
    font-weight: 700 !important;
}

/* ================================================================
 * 9. RESPONSIVE DESIGN (Mobile & Tablet)
 * ================================================================ */
@media (max-width: 768px) {
    .asw-menu-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        left: 15px !important;
        bottom: 20px !important;
    }
    
    .asw-menu-btn svg {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
    }

    .asw-menu {
        width: 100% !important;
        max-width: 100vw !important;
        border-right: none !important;
    }

    .asw-items {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    .asw-btn {
        min-height: 82px !important;
        padding: 8px 4px !important;
    }

    .asw-btn svg {
        width: 20px !important;
        height: 20px !important;
    }

    .asw-btn .asw-translate {
        font-size: 10px !important;
    }
}

@media (max-width: 420px) {
    .asw-items {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
