/* Accessibility Tools CSS */
.accessibility-tools {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    font-family: sans-serif;
}

#accessibility-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background-color: #006837;
    /* Default Green */
    color: white;
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#accessibility-toggle:hover {
    transform: scale(1.1);
}

#accessibility-menu {
    position: absolute;
    bottom: 0;
    left: 60px;
    /* Appear to the right of the button */
    width: 250px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    padding: 15px;
    z-index: 10000;
}

#accessibility-menu.show {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#accessibility-menu h6 {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.access-btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-access {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-access:hover {
    background: #e9ecef;
}

.btn-access.active {
    background: #006837;
    color: white;
    border-color: #006837;
}

/* HIGH CONTRAST MODE */
body.high-contrast {
    background-color: #000 !important;
    color: #ffff00 !important;
}

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

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

body.high-contrast img {
    filter: grayscale(100%) contrast(120%);
}

body.high-contrast .btn-access.active {
    background: #ffff00 !important;
    color: #000 !important;
}

/* GRAYSCALE MODE */
/* Using ::after overlay with backdrop-filter to avoid modifying body::before's green background */
body.grayscale::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    /* Ensure no color is added */
    backdrop-filter: grayscale(100%);
    -webkit-backdrop-filter: grayscale(100%);
    pointer-events: none;
    z-index: 9998;
    /* Just below tools (9999) but above content */
}

/* FONT SIZES */
/* Levels: 0=100%, +1=110%, +2=125%, +3=150% */
/* Levels: -1=90%, -2=80%, -3=75% */

html.font-lvl-1 {
    font-size: 110% !important;
}

html.font-lvl-2 {
    font-size: 125% !important;
}

html.font-lvl-3 {
    font-size: 150% !important;
}

html.font-lvl-minus-1 {
    font-size: 90% !important;
}

html.font-lvl-minus-2 {
    font-size: 85% !important;
}

html.font-lvl-minus-3 {
    font-size: 75% !important;
}