/**
 * Portable accessibility panel styles.
 * Requires matching IDs/classes from accessibility.js header HTML snippet.
 * Accent: --a11y-accent (default #f6ae20). Override per project if needed.
 */
:root {
    --a11y-accent: #1d4381;
}

.accessibility-icon {
    border-radius: 50%;
    margin-left: 10px;
    z-index: 999;
    position: relative;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
}

/* Tab focus: visible ring that contrasts with the blue icon */
button.accessibility-icon:focus,
button.accessibility-icon:focus-visible,
#accessibilityToggle:focus,
#accessibilityToggle:focus-visible {
    outline: none !important;
    border-radius: 50%;
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 5px #000000 !important;
}

body.high-contrast button.accessibility-icon:focus,
body.high-contrast button.accessibility-icon:focus-visible,
body.high-contrast #accessibilityToggle:focus,
body.high-contrast #accessibilityToggle:focus-visible {
    box-shadow:
        0 0 0 2px #000000,
        0 0 0 5px #ffffff !important;
}
.content_center {
    justify-content: space-between;
}

.accessibility-icon img {
    position: relative;
    cursor: pointer;
    display: block;
}

.accessibility-panel {
    position: absolute;
    right: -6px;
    top: 50px;
    width: 300px;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    display: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

.access-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

.access-row span {
    font-size: 0.875em;
    color: #000 !important;
}

.text-size-controls button {
    margin: 0 5px;
    padding: 3px 8px;
    border: none;
    background: #eee;
    cursor: pointer;
    border-radius: 5px;
    width: 32px;
    height: 32px;
    min-height: 32px;
    font-size: 0.875em;
}

.text-size-controls button.active {
    background: var(--a11y-accent);
    color: #fff;
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch input:checked + .slider {
    background-color: var(--a11y-accent);
}

.switch input:checked + .slider:before {
    transform: translateX(17px);
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 20px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

/* Visible switch label gets focus ring; hidden checkbox does not */
.accessibility-panel label.switch:focus,
.accessibility-panel label.switch:focus-visible,
.switch:focus,
.switch:focus-visible {
    outline: 3px solid #000000 !important;
    outline-offset: 2px;
    border-radius: 1.25rem;
    box-shadow: none !important;
}

body.high-contrast .accessibility-panel label.switch:focus,
body.high-contrast .accessibility-panel label.switch:focus-visible {
    outline: 3px solid #000000 !important;
    outline-offset: 2px;
    box-shadow: none !important;
}

.accessibility-panel .switch input:focus,
.accessibility-panel .switch input:focus-visible,
.switch input:focus,
.switch input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

@media (max-width: 575px) {
    .accessibility-icon img {
        width: 30px;
    }

    .accessibility-panel {
        top: 36px;
    }
}

/* ---------- Generic high contrast (tune per project if needed) ---------- */
body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}
    body.high-contrast .modal {
        background: transparent !important;
        color: #000 !important;
    }
    body.high-contrast a {
        color: #1d4381 !important;
    }
    body.high-contrast footer p, body.high-contrast .registration-form p {
        color: #fff;
    }
body.high-contrast .registration-form {
    background: #000;
    border: 1px solid #fff;
    border-radius: 12px;
}
/*body.high-contrast .accessibility-panel {
    background: #111 !important;
    border: 1px solid #fff;
    box-shadow: none;
}*/

/*body.high-contrast .access-row span {
    color: #fff !important;
}*/


    body.high-contrast .right-section-bg {
        background-color: #000;      
    }
/*body.high-contrast .text-size-controls button {
    background: #333;
    color: #fff;
}

body.high-contrast .text-size-controls button.active {
    background: var(--a11y-accent);
    color: #000;
}*/

body.high-contrast .switch .slider {
    background-color: #555;
}

body.high-contrast .switch input:checked + .slider {
    background-color: var(--a11y-accent);
}

/*body.high-contrast input,
body.high-contrast select,
body.high-contrast textarea
{
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}*/

    body.high-contrast .bg-blue, body.high-contrast footer .footer-sec-3 {
        background: #000;
        border-top: 1px solid #fff;
    }
