/* ==========================================================
   Accessibility Floating Button & Menu Styles
   Pemerintah Kabupaten Pasuruan
   ========================================================== */

/* Floating Action Button (FAB) */
#acc-fab {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background-color: rgb(232, 119, 34);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 4px 12px rgba(232, 119, 34, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    touch-action: none;
}

#acc-fab:hover {
    background-color: rgb(193, 99, 28);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(232, 119, 34, 0.45);
}

#acc-fab:active {
    transform: translateY(0);
}

#acc-fab svg,
#acc-fab i {
    pointer-events: none;
}

#acc-fab svg {
    width: 24px;
    height: 24px;
    display: block;
}

#acc-fab i {
    font-size: 22px;
    line-height: 1;
    color: #ffffff;
}

/* Mobile adjustments matching button-to-top */
@media (max-width: 767.98px) {
    #acc-fab {
        width: 45px;
        height: 45px;
        bottom: calc(var(--mobile-nav-height, 84px) + 20px);
    }

    #acc-fab svg {
        width: 22px;
        height: 22px;
    }

    #acc-fab i {
        font-size: 20px;
    }
}

/* Accessibility Menu Modal */
#acc-menu {
    position: fixed;
    width: 320px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 100000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    animation: accFadeSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

#acc-menu.show {
    display: flex;
}

@keyframes accFadeSlide {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: #ffffff;
    background-color: orange;
}

.acc-header h3 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: #ffffff;
}

.acc-close {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.acc-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.acc-body {
    padding: 14px;
    max-height: calc(85vh - 70px);
    overflow-y: auto;
}

.acc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.acc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    user-select: none;
    min-height: 82px;
}

.acc-btn:hover {
    background: #f0f9ff;
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.acc-btn.active {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0284c7;
}

.acc-btn svg {
    width: 24px;
    height: 24px;
    margin-bottom: 6px;
    stroke-width: 2;
}

.acc-btn-label {
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.25;
    color: #334155;
}

.acc-btn.active .acc-btn-label {
    color: #0284c7;
    font-weight: 600;
}

.acc-reset-btn {
    width: 100%;
    padding: 10px;
    background: rgb(232, 119, 34);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(232, 119, 34, 0.25);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.acc-reset-btn:hover {
    background: rgb(193, 99, 28);
    box-shadow: 0 4px 12px rgba(232, 119, 34, 0.35);
}

.acc-reset-btn:active {
    transform: translateY(0);
}

/* Accessibility Filter Classes on HTML */
html.acc-grayscale {
    filter: grayscale(100%) !important;
}

html.acc-high-contrast {
    filter: contrast(150%) brightness(110%) !important;
}

html.acc-hide-images img:not(#acc-fab img),
html.acc-hide-images svg:not(.acc-header svg):not(.acc-btn svg):not(#acc-close-btn svg):not(#acc-fab svg),
html.acc-hide-images video,
html.acc-hide-images [style*="background-image"]:not(#acc-fab) {
    visibility: hidden !important;
    opacity: 0 !important;
}

html.acc-readable-font * {
    font-family: Arial, Helvetica, sans-serif !important;
}

html.acc-pause-animations * {
    animation-play-state: paused !important;
    transition: none !important;
}

html.acc-cursor-big,
html.acc-cursor-big * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='black' stroke='white' stroke-width='1.5'%3E%3Cpath d='M3 3l7 18 3-7 7-3L3 3z'/%3E%3C/svg%3E"), auto !important;
}

html.acc-highlight-links a {
    text-decoration: underline !important;
    text-decoration-color: #f59e0b !important;
    text-decoration-thickness: 2.5px !important;
    background-color: rgba(254, 240, 138, 0.4) !important;
    color: #1e3a8a !important;
}

html.acc-align-left, html.acc-align-left p, html.acc-align-left h1, html.acc-align-left h2, html.acc-align-left h3, html.acc-align-left h4, html.acc-align-left h5, html.acc-align-left h6, html.acc-align-left span {
    text-align: left !important;
}

html.acc-align-center, html.acc-align-center p, html.acc-align-center h1, html.acc-align-center h2, html.acc-align-center h3, html.acc-align-center h4, html.acc-align-center h5, html.acc-align-center h6, html.acc-align-center span {
    text-align: center !important;
}

html.acc-align-right, html.acc-align-right p, html.acc-align-right h1, html.acc-align-right h2, html.acc-align-right h3, html.acc-align-right h4, html.acc-align-right h5, html.acc-align-right h6, html.acc-align-right span {
    text-align: right !important;
}

html.acc-align-justify, html.acc-align-justify p, html.acc-align-justify h1, html.acc-align-justify h2, html.acc-align-justify h3, html.acc-align-justify h4, html.acc-align-justify h5, html.acc-align-justify h6, html.acc-align-justify span {
    text-align: justify !important;
}

html.acc-line-height-1 * {
    line-height: 1.8 !important;
}

html.acc-line-height-2 * {
    line-height: 2.2 !important;
}

html.acc-spacing-1 * {
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

html.acc-spacing-2 * {
    letter-spacing: 0.22em !important;
    word-spacing: 0.28em !important;
}
