/* =========================================================
   HPSEBL ACCESSIBILITY WIZARD
   ========================================================= */

#hpsebl-a11y-button,
#hpsebl-a11y-panel,
#hpsebl-a11y-reading-guide {
    box-sizing: border-box;
}


/* =========================================================
   FLOATING ACCESSIBILITY BUTTON
   ========================================================= */

.hpsebl-a11y-button {
    position: fixed;
    right: 18px;
    bottom: 25px;

    width: 58px;
    height: 58px;

    border-radius: 50%;
    border: 3px solid #ffffff;

    background: #006f95;
    color: #ffffff;

    font-size: 30px;
    font-weight: bold;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);

    z-index: 2147483646;

    transition: transform 0.2s ease,
                box-shadow 0.2s ease;
}

.hpsebl-a11y-button:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.30);
}

.hpsebl-a11y-button:focus {
    outline: 3px solid #ffcc00;
    outline-offset: 3px;
}


/* =========================================================
   MAIN PANEL
   ========================================================= */

.hpsebl-a11y-panel {
    position: fixed;

    right: 10px;
    bottom: 10px;

    width: 365px;

    max-width: calc(100vw - 20px);

    height: 800px;
    max-height: calc(100vh - 20px);

    background: #ffffff;

    border: 1px solid #d7dfe5;
    border-radius: 14px;

    overflow: hidden;

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);

    z-index: 2147483647;

    display: none;

    color: #333333;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

.hpsebl-a11y-panel.hpsebl-a11y-open {
    display: flex;
    flex-direction: column;
}


/* =========================================================
   HEADER
   ========================================================= */

.hpsebl-a11y-header {
    flex: 0 0 auto;

    min-height: 74px;

    padding: 15px 15px 14px 18px;

    background: #006f95;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
}

.hpsebl-a11y-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

.hpsebl-a11y-subtitle {
    margin-top: 3px;

    font-size: 12px;

    opacity: 0.92;
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.hpsebl-a11y-close {
    width: 38px;
    height: 38px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.16);

    color: #ffffff;

    font-size: 29px;
    font-weight: 400;

    line-height: 36px;

    text-align: center;

    cursor: pointer;

    flex: 0 0 auto;
}

.hpsebl-a11y-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hpsebl-a11y-close:focus {
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
}


/* =========================================================
   BODY
   ========================================================= */

.hpsebl-a11y-body {
    flex: 1 1 auto;

    overflow-y: auto;

    padding: 15px;

    background: #f7f9fb;
}


/* =========================================================
   SECTION
   ========================================================= */

.hpsebl-a11y-section {
    margin-bottom: 15px;

    padding: 14px;

    background: #ffffff;

    border: 1px solid #dfe5eb;

    border-radius: 8px;
}

.hpsebl-a11y-section-title {
    margin-bottom: 11px;

    color: #333333;

    font-size: 15px;
    font-weight: 700;
}


/* =========================================================
   OPTION BUTTONS
   ========================================================= */

.hpsebl-a11y-options {
    display: grid;
    gap: 8px;
}

.hpsebl-a11y-three {
    grid-template-columns: repeat(3, 1fr);
}

.hpsebl-a11y-two {
    grid-template-columns: repeat(2, 1fr);
}

.hpsebl-a11y-option {
    min-height: 70px;

    padding: 8px;

    border: 1px solid #d5dde4;
    border-radius: 7px;

    background: #ffffff;

    color: #333333;

    cursor: pointer;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    font-size: 12px;

    text-align: center;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.hpsebl-a11y-option:hover {
    border-color: #006f95;
    background: #f0f8fb;
}

.hpsebl-a11y-option.hpsebl-a11y-active {
    border: 2px solid #006f95;
    background: #e8f5f9;
    color: #005b78;
    font-weight: 700;
}

.hpsebl-a11y-option:focus {
    outline: 2px solid #ffcc00;
    outline-offset: 1px;
}

.option-icon {
    font-size: 20px;
    font-weight: 700;
}

.option-large {
    font-size: 25px;
}

.option-extra {
    font-size: 30px;
}


/* =========================================================
   CONTRAST PREVIEW
   ========================================================= */

.contrast-preview {
    width: 42px;
    height: 28px;

    border-radius: 5px;

    border: 1px solid #aeb8c0;

    display: block;
}

.contrast-default-preview {
    background: linear-gradient(
        135deg,
        #ffffff 50%,
        #006f95 50%
    );
}

.contrast-mono-preview {
    background: linear-gradient(
        135deg,
        #ffffff 50%,
        #555555 50%
    );
}

.contrast-dark-preview {
    background: linear-gradient(
        135deg,
        #111111 50%,
        #000000 50%
    );
}

.contrast-light-preview {
    background: linear-gradient(
        135deg,
        #ffffff 50%,
        #eeeeee 50%
    );
}


/* =========================================================
   TOGGLE ROW
   ========================================================= */

.hpsebl-a11y-toggle-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 12px 0;

    border-bottom: 1px solid #edf0f2;

    cursor: pointer;
}

.hpsebl-a11y-toggle-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.hpsebl-a11y-toggle-row:first-of-type {
    padding-top: 3px;
}

.hpsebl-a11y-toggle-row strong {
    display: block;

    font-size: 13px;

    color: #333333;
}

.hpsebl-a11y-toggle-row small {
    display: block;

    margin-top: 3px;

    color: #777777;

    font-size: 11px;

    line-height: 1.35;
}


/* =========================================================
   SWITCH
   ========================================================= */

.hpsebl-a11y-switch {
    position: relative;

    width: 46px;
    height: 25px;

    flex: 0 0 auto;
}

.hpsebl-a11y-switch input {
    opacity: 0;

    width: 0;
    height: 0;

    position: absolute;
}

.hpsebl-a11y-slider {
    position: absolute;

    inset: 0;

    border-radius: 30px;

    background: #c9d1d7;

    cursor: pointer;

    transition: 0.2s;
}

.hpsebl-a11y-slider:before {
    content: "";

    position: absolute;

    width: 19px;
    height: 19px;

    left: 3px;
    top: 3px;

    background: #ffffff;

    border-radius: 50%;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);

    transition: 0.2s;
}

.hpsebl-a11y-switch input:checked + .hpsebl-a11y-slider {
    background: #006f95;
}

.hpsebl-a11y-switch input:checked + .hpsebl-a11y-slider:before {
    transform: translateX(21px);
}


/* =========================================================
   RESET
   ========================================================= */

.hpsebl-a11y-reset-area {
    padding-bottom: 5px;
}

.hpsebl-a11y-reset {
    width: 100%;

    padding: 11px 14px;

    border: 1px solid #006f95;
    border-radius: 7px;

    background: #ffffff;

    color: #006f95;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.hpsebl-a11y-reset:hover {
    background: #006f95;
    color: #ffffff;
}

.hpsebl-a11y-reset:focus {
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
}


/* =========================================================
   READING GUIDE
   ========================================================= */

.hpsebl-a11y-reading-guide {
    position: fixed;

    left: 0;
    right: 0;

    top: 45vh;

    height: 42px;

    border-top: 3px solid rgba(255, 180, 0, 0.95);
    border-bottom: 3px solid rgba(255, 180, 0, 0.95);

    background: rgba(255, 230, 130, 0.18);

    pointer-events: none;

    display: none;

    z-index: 2147483645;
}

body.hpsebl-a11y-reading-active
.hpsebl-a11y-reading-guide {
    display: block;
}


/* =========================================================
   TEXT SIZE
   ========================================================= */

body.hpsebl-a11y-text-large {
    font-size: 115% !important;
}

body.hpsebl-a11y-text-extra {
    font-size: 130% !important;
}


/* =========================================================
   MONO / COLORBLIND
   ========================================================= */

body.hpsebl-a11y-mono {
    filter: grayscale(100%);
}

body.hpsebl-a11y-mono
#hpsebl-a11y-panel,
body.hpsebl-a11y-mono
#hpsebl-a11y-panel * {
    filter: none !important;
}


/* =========================================================
   DARK CONTRAST
   ========================================================= */

body.hpsebl-a11y-dark {
    background: #111111 !important;
    color: #ffffff !important;
}

body.hpsebl-a11y-dark * {
    border-color: #555555 !important;
}

body.hpsebl-a11y-dark a {
    color: #66d9ff !important;
}

body.hpsebl-a11y-dark input,
body.hpsebl-a11y-dark textarea,
body.hpsebl-a11y-dark select {
    background: #222222 !important;
    color: #ffffff !important;
}


/* =========================================================
   LIGHT CONTRAST
   ========================================================= */

body.hpsebl-a11y-light {
    background: #ffffff !important;
    color: #000000 !important;
}

body.hpsebl-a11y-light a {
    color: #0033cc !important;
}


/* =========================================================
   DYSLEXIA FRIENDLY
   ========================================================= */

body.hpsebl-a11y-dyslexia,
body.hpsebl-a11y-dyslexia * {
    font-family:
        "Trebuchet MS",
        Arial,
        Helvetica,
        sans-serif !important;
}


/* =========================================================
   HIGHLIGHT CLICKABLE ELEMENTS
   ========================================================= */

body.hpsebl-a11y-highlight a,
body.hpsebl-a11y-highlight button,
body.hpsebl-a11y-highlight input[type="button"],
body.hpsebl-a11y-highlight input[type="submit"],
body.hpsebl-a11y-highlight select {
    outline: 3px solid #ff9800 !important;
    outline-offset: 2px !important;
}


/* =========================================================
   LARGE CURSOR
   ========================================================= */

body.hpsebl-a11y-large-cursor,
body.hpsebl-a11y-large-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M5 2v34l9-8 7 16 7-3-7-16h13z' fill='white' stroke='black' stroke-width='3'/%3E%3C/svg%3E") 5 2, auto !important;
}


/* =========================================================
   REDUCE MOTION
   ========================================================= */

body.hpsebl-a11y-reduce-motion *,
body.hpsebl-a11y-reduce-motion *::before,
body.hpsebl-a11y-reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}


/* =========================================================
   NEVER APPLY ACCESSIBILITY FILTERS TO WIZARD
   ========================================================= */

#hpsebl-a11y-panel,
#hpsebl-a11y-panel * {
    filter: none !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 500px) {

    .hpsebl-a11y-panel {
        right: 5px;
        bottom: 5px;

        width: calc(100vw - 10px);

        max-width: none;

        height: calc(100vh - 10px);
        max-height: calc(100vh - 10px);

        border-radius: 12px;
    }

    .hpsebl-a11y-button {
        right: 12px;
        bottom: 15px;

        width: 54px;
        height: 54px;

        font-size: 27px;
    }

    .hpsebl-a11y-three {
        grid-template-columns: repeat(3, 1fr);
    }

    .hpsebl-a11y-option {
        min-height: 65px;
        font-size: 11px;
    }
}