﻿/* ==========================================================
   accessibility.css  -  Accessibility Tools panel (card style)
   Load AFTER layout.css so these rules override the old ones.
   ========================================================== */

:root {
    --acc-primary: #2b1a6e; /* icon + text accent (deep purple) */
    --acc-border: #c9c9d1;
    --acc-hover-bg: #f3f0fb;
    --acc-active-check: #0a8a1f; /* green tick */
    --acc-radius: 8px;
}

.b-acc-wrap {
    position: relative;
}

    /* ---- Toggle button (person icon) ---- */
    .b-acc-wrap .b-acc-toggle:hover,
    .b-acc-wrap .b-acc-toggle:focus-visible,
    .b-acc-wrap .b-acc-toggle[aria-expanded="true"] {
        background: #e6e2f5;
        color: var(--acc-primary);
    }

    /* ---- Panel ---- */
    .b-acc-wrap .b-acc-dropdown {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        left: auto;
        width: 440px;
        max-width: 92vw;
        max-height: 80vh;
        overflow-y: auto;
        padding: 14px 16px 18px;
        background: #fff;
        color: #222;
        border: 1px solid #e3e3e8;
        border-radius: 10px;
        box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
        z-index: 2000;
        text-align: left;
        font-family: "Inter", Arial, sans-serif;
    }

        .b-acc-wrap .b-acc-dropdown.b-panel-hidden {
            display: none;
        }

/* ---- Header ---- */
.b-acc-panel-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #222;
}

.b-acc-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: #555;
    cursor: pointer;
}

    .b-acc-close:hover,
    .b-acc-close:focus-visible {
        background: #eee;
    }

/* ---- Section headings ---- */
.b-acc-heading {
    margin: 14px 0 6px 2px;
    font-size: 13px;
    font-weight: 400;
    color: #333;
}

/* ---- 3-column grid ---- */
.b-acc-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* ---- Option button (card) ---- */
.b-acc-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 82px;
    padding: 10px 6px;
    background: #fff;
    color: #222;
    border: 1px solid var(--acc-border);
    border-radius: var(--acc-radius);
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}

    .b-acc-btn:hover {
        background: var(--acc-hover-bg);
        border-color: var(--acc-primary);
    }

    .b-acc-btn:focus-visible {
        outline: 2px solid var(--acc-primary);
        outline-offset: 2px;
    }

/* icon area */
.b-acc-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    font-size: 22px;
    color: var(--acc-primary);
    line-height: 1;
}

    .b-acc-ico.b-acc-txt { /* A+  A-  A */
        font-size: 24px;
        font-weight: 400;
        letter-spacing: -1px;
    }

.b-acc-lbl {
    display: block;
}

/* ---- Active state: green tick badge (top-right) ---- */
.b-acc-btn.active {
    border-color: var(--acc-border);
    box-shadow: none;
}

    .b-acc-btn.active::after {
        content: "\2713";
        position: absolute;
        top: -6px;
        right: -6px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: var(--acc-active-check);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        line-height: 18px;
        text-align: center;
        box-shadow: 0 0 0 2px #fff;
    }
/* keep badge from being clipped */
.b-acc-row {
    overflow: visible;
}

/* ---- Reset button: full width under "Others" ---- */
.b-acc-btn.b-acc-reset {
    grid-column: 1 / -1;
    flex-direction: row;
    min-height: 40px;
    gap: 8px;
    color: var(--acc-primary);
    font-weight: 500;
}

    .b-acc-btn.b-acc-reset .b-acc-ico {
        height: auto;
        font-size: 15px;
    }

    .b-acc-btn.b-acc-reset.active::after {
        display: none;
    }

/* ---- Mobile ---- */
@media (max-width: 575.98px) {
    .b-acc-wrap {
        position: static;
    }

        .b-acc-wrap .b-acc-dropdown {
            position: fixed;
            top: 60px;
            left: 4vw;
            right: 4vw;
            width: auto;
            max-width: none;
        }

    .b-acc-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
