/* =========================================================
   ACCESSIBILITY
   ========================================================= */

/* Accessibility button */
.accessibility-toggle {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99990;

    display: flex;
    align-items: center;
    gap: 8px;

    min-width: 54px;
    height: 54px;
    padding: 8px 12px;

    border: 0;
    border-radius: 8px;

    background: #005a9c;
    color: #ffffff;

    cursor: pointer;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.accessibility-toggle:hover {
    background: #003f70;
}

.accessibility-toggle:focus {
    outline: 3px solid #ffcc00;
    outline-offset: 3px;
}

.accessibility-symbol {
    font-size: 25px;
    line-height: 1;
}

.accessibility-toggle-text {
    white-space: nowrap;
}


/* Accessibility panel */
.accessibility-panel {
    position: fixed;
    top: 50%;
    right: 0;

    width: 310px;
    max-width: calc(100vw - 20px);

    transform: translate(110%, -50%);

    background: #ffffff;
    color: #222222;

    border: 2px solid #005a9c;
    border-right: 0;

    border-radius: 10px 0 0 10px;

    z-index: 99999;

    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.30);

    font-family: Arial, sans-serif;

    transition: transform 0.25s ease;

    direction: rtl;
}

.accessibility-panel.open {
    transform: translate(0, -50%);
}


/* Header */
.accessibility-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 18px;

    background: #005a9c;
    color: #ffffff;

    font-size: 18px;
}

.accessibility-close {
    width: 34px;
    height: 34px;

    padding: 0;

    border: 0;
    border-radius: 4px;

    background: transparent;
    color: #ffffff;

    font-size: 27px;
    line-height: 30px;

    cursor: pointer;
}

.accessibility-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.accessibility-close:focus {
    outline: 2px solid #ffcc00;
}


/* Content */
.accessibility-panel-content {
    padding: 15px;
}

.accessibility-option {
    width: 100%;

    display: flex;
    align-items: center;

    min-height: 45px;

    margin-bottom: 8px;
    padding: 8px 12px;

    border: 1px solid #cccccc;
    border-radius: 5px;

    background: #f7f7f7;
    color: #222222;

    cursor: pointer;

    text-align: right;

    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: normal;
}

.accessibility-option span {
    width: 35px;

    margin-left: 8px;

    font-size: 18px;
    font-weight: bold;

    text-align: center;
}

.accessibility-option:hover {
    background: #e8f2f8;
    border-color: #005a9c;
}

.accessibility-option:focus {
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

.accessibility-reset {
    margin-top: 10px;

    background: #eeeeee;
    border-color: #888888;
}


/* Footer */
.accessibility-panel-footer {
    padding: 12px 15px;

    border-top: 1px solid #dddddd;

    text-align: center;
}

.accessibility-panel-footer a {
    color: #005a9c;
    text-decoration: underline;

    font-size: 14px;
}

.accessibility-panel-footer a:focus {
    outline: 3px solid #ffcc00;
}


/* =========================================================
   ACCESSIBILITY MODES
   ========================================================= */

/* Larger text */
body.accessibility-text-large {
    font-size: 115% !important;
}

body.accessibility-text-large p,
body.accessibility-text-large li,
body.accessibility-text-large a,
body.accessibility-text-large label,
body.accessibility-text-large input,
body.accessibility-text-large textarea,
body.accessibility-text-large button {
    font-size: 115%;
}


/* Smaller text */
body.accessibility-text-small {
    font-size: 90% !important;
}


/* High contrast */
body.accessibility-high-contrast {
    background: #000000 !important;
    color: #ffffff !important;
}

body.accessibility-high-contrast * {
    border-color: #ffffff !important;
}

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

body.accessibility-high-contrast p,
body.accessibility-high-contrast h1,
body.accessibility-high-contrast h2,
body.accessibility-high-contrast h3,
body.accessibility-high-contrast h4,
body.accessibility-high-contrast h5,
body.accessibility-high-contrast h6 {
    color: #ffffff !important;
}


/* Grayscale */
body.accessibility-grayscale {
    filter: grayscale(100%);
}


/* Highlight links */
body.accessibility-highlight-links a {
    outline: 2px solid #ff0000 !important;
    background: #ffff00 !important;
    color: #000000 !important;
    text-decoration: underline !important;
}


/* Stop animations */
body.accessibility-no-animation *,
body.accessibility-no-animation *::before,
body.accessibility-no-animation *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}


/* Large cursor */
body.accessibility-large-cursor,
body.accessibility-large-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M3 2l8 25 5-9 9 5L3 2z' fill='black' stroke='white' stroke-width='2'/%3E%3C/svg%3E"), auto !important;
}


/* Mobile */
@media (max-width: 600px) {

    .accessibility-toggle {
        right: 10px;
        top: auto;
        bottom: 20px;
        transform: none;

        min-width: 52px;
        height: 52px;

        padding: 8px;
    }

    .accessibility-toggle-text {
        display: none;
    }

    .accessibility-panel {
        width: 290px;
        max-width: calc(100vw - 10px);
    }
}
