/* Accessibility Styles */

/* High Contrast Mode */
.high-contrast {
    background-color: #000 !important;
    color: #ffff00 !important;
}

.high-contrast header,
.high-contrast footer,
.high-contrast section,
.high-contrast div,
.high-contrast nav,
.high-contrast aside {
    background-color: #000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

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

.high-contrast button {
    background-color: #ffff00 !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}

.high-contrast img {
    filter: contrast(150%) brightness(100%);
}

/* Monochrome Mode */
.monochrome {
    filter: grayscale(100%);
}

/* Dyslexic Font */
@font-face {
    font-family: 'OpenDyslexic';
    src: url('https://cdn.jsdelivr.net/npm/opendyslexic@1.0.3/font/OpenDyslexic-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

.dyslexic-font {
    font-family: 'OpenDyslexic', sans-serif !important;
}

/* Highlight Links - Improved UI/UX */
.highlight-links a {
    text-decoration: underline 3px solid #f97316 !important;
    text-underline-offset: 4px;
    background-color: rgba(249, 115, 22, 0.1) !important;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.highlight-links a:hover {
    background-color: rgba(249, 115, 22, 0.2) !important;
    text-decoration-color: #ea580c !important;
}

/* Accessibility Widget */
#accessibility-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

#accessibility-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #064e3b;
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

#accessibility-btn:hover {
    transform: scale(1.1);
    background-color: #047857;
}

@keyframes pulse-subtle {
    0% {
        box-shadow: 0 0 0 0 rgba(6, 78, 59, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(6, 78, 59, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(6, 78, 59, 0);
    }
}

.pulse-animation {
    animation: pulse-subtle 2s infinite;
}

#accessibility-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 15px;
}

#accessibility-menu.active {
    display: flex;
}

.a11y-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    background-color: #f9fafb;
}

.a11y-option span {
    font-weight: 600;
    color: #374151;
}

.a11y-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.a11y-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.a11y-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.a11y-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.a11y-slider {
    background-color: #064e3b;
}

input:checked+.a11y-slider:before {
    transform: translateX(26px);
}

.a11y-btn-group {
    display: flex;
    gap: 5px;
}

.a11y-action-btn {
    padding: 5px 12px;
    background-color: #e5e7eb;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.a11y-action-btn:hover {
    background-color: #d1d5db;
}

/* Skip Link */
#skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #064e3b;
    color: white;
    padding: 8px 16px;
    z-index: 10000;
}

#skip-link:focus {
    top: 0;
}

/* Global Keyboard Focus States */
:not(.user-is-mouse) *:focus-visible {
    outline: 4px solid #f97316 !important;
    /* Safety orange for high visibility */
    outline-offset: 2px !important;
    box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.3) !important;
}