.a11y-btn img {
    width: 32px;
    height: 60px;
    object-fit: contain;
}

/* ===== Variables (effects) ===== */
html {
    --a11y-zoom: 1;
    --a11y-wordspace: 0px;
    --a11y-lineheight: 1.6;
}

html {
    font-size: calc(16px * var(--a11y-zoom));
}

body {
    word-spacing: var(--a11y-wordspace);
    line-height: var(--a11y-lineheight);
}

/* ===== Widget ===== */
.a11y-widget {
    position: fixed;
    bottom: 85px;
    right: 27px;
    z-index: 1050;
    font-family: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.a11y-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #346bae;
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    cursor: pointer;
    font-size: 22px;
}

.a11y-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 360px;
    max-height: 80vh;
    background: #f4f6fb;
    color: #000;
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.a11y-header {
    background: #346bae;
    color: #fff;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.a11y-close {
    background: none;
    border: 0;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.a11y-body {
    padding: 12px 14px 16px;
}

.a11y-reset {
    width: 100%;
    background: #11a0db;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
}

.a11y-section {
    font-size: 16px;
    font-weight: 700;
    color: #346bae;
    margin: 12px 0 8px;
}

.a11y-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.a11y-card {
    background: #e8edf7;
    border: none;
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    color: #346bae;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.a11y-card:hover {
    background: #dbe5f8;
    transform: translateY(-1px);
    transition: .15s;
}

.a11y-card i,
.a11y-card .icon {
    font-size: 22px;
}

.a11y-card--row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.a11y-card-ico {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: #dbe5f8;
    border-radius: 10px;
    color: #346bae;
}

.a11y-card-actions {
    flex: 1;
}

.a11y-card-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.a11y-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.a11y-pill {
    border: 1px solid #cbd6f1;
    background: #fff;
    color: #346bae;
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
}

.a11y-toggle.active {
    outline: 2px solid #11a0db;
    background: #fff;
}

/* Scrollbar */
.a11y-panel::-webkit-scrollbar {
    width: 6px;
}

.a11y-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .2);
    border-radius: 6px;
}

/* ===== Effects (classes) ===== */
/* Dyslexia-friendly */
@font-face {
    font-family: "OpenDyslexic";
    src: local("OpenDyslexic"), local("OpenDyslexic-Regular");
    /* سيستعملها إن كانت مثبتة */
    font-display: swap;
}

body.a11y-dyslexia {
    font-family: "OpenDyslexic", "Cairo", Arial, sans-serif;
    letter-spacing: .3px;
}

/* High contrast */
body.a11y-contrast {
    background: #0a0a0a !important;
    color: #fff !important;
}

body.a11y-contrast :where(p, li, span, a, small, strong, em, div, h1, h2, h3, h4, h5, h6, label, button, input, th, td) {
    color: #fff !important;
    border-color: #fff !important;
}

body.a11y-contrast a {
    text-decoration: underline !important;
}

/* Link highlight */
body.a11y-underline a {
    text-decoration: underline !important;
    outline: 2px dashed #ff0;
    background: rgba(255, 255, 0, .15);
}

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

/* Saturation */
html.a11y-saturate {
    filter: saturate(1.6) contrast(1.05);
}

/* Hide images (also background images) */
body.a11y-hide-img img,
body.a11y-hide-img picture,
body.a11y-hide-img video {
    visibility: hidden !important;
}

body.a11y-hide-img [style*="background-image"] {
    background-image: none !important;
}

/* Cursor ring (visible when .a11y-cursor on body) */
#a11yCursorRing {
    position: fixed;
    width: 34px;
    height: 34px;
    border: 3px solid rgba(10, 61, 145, .9);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-9999px, -9999px);
    z-index: 1060;
    transition: transform .04s linear, opacity .2s;
    opacity: 0;
}

body.a11y-cursor #a11yCursorRing {
    opacity: 1;
}

body.a11y-cursor * {
    cursor: none !important;
}


