/* =========================================================
   Accessibility Widget (WCAG 2.1 AA)
   ========================================================= */
#xc-a11y-toggle {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--xoomcare-base, #681D49);
    color: #fff;
    border: none;
    box-shadow: 0 8px 20px rgba(104, 29, 73, 0.35);
    cursor: pointer;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: transform .2s;
}
#xc-a11y-toggle:hover { transform: scale(1.08); }
#xc-a11y-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

#xc-a11y-panel {
    position: fixed;
    left: 20px;
    bottom: 84px;
    width: 300px;
    max-width: calc(100vw - 40px);
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 44px rgba(0,0,0,0.22);
    padding: 20px;
    z-index: 99998;
    font-family: "Inter", sans-serif;
    display: none;
}
#xc-a11y-panel.show { display: block; }
#xc-a11y-panel h4 {
    font-family: "Lora", serif;
    font-size: 15.5px;
    color: var(--xoomcare-base, #681D49);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#xc-a11y-panel h4 button {
    background: none; border: none; font-size: 16px; cursor: pointer; color: #999;
}

.xc-a11y-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0eef2;
    font-size: 13.3px;
    color: #333;
}
.xc-a11y-option:last-of-type { border-bottom: none; }

.xc-a11y-btns { display: flex; gap: 6px; }
.xc-a11y-btns button {
    width: 30px; height: 30px;
    border-radius: 6px;
    border: 1.5px solid #e5e0e5;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--xoomcare-base, #681D49);
    font-weight: 700;
}
.xc-a11y-btns button:hover { border-color: var(--xoomcare-base, #681D49); }

.xc-a11y-switch {
    position: relative;
    width: 40px; height: 22px;
    border-radius: 20px;
    background: #ddd;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}
.xc-a11y-switch.on { background: var(--xoomcare-secondary, #DE347F); }
.xc-a11y-switch::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: left .2s;
}
.xc-a11y-switch.on::after { left: 21px; }

#xc-a11y-reset {
    width: 100%;
    margin-top: 14px;
    padding: 9px;
    border-radius: 8px;
    border: none;
    background: #f1eef2;
    color: #555;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

/* ---- Applied accessibility states ---- */
html.xc-a11y-large-text { font-size: 112.5%; }
html.xc-a11y-larger-text { font-size: 125%; }

html.xc-a11y-readable-font body,
html.xc-a11y-readable-font * {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.01em;
}

html.xc-a11y-high-contrast body {
    background: #000 !important;
    color: #fff !important;
    filter: contrast(1.15);
}
html.xc-a11y-high-contrast a,
html.xc-a11y-high-contrast h1, html.xc-a11y-high-contrast h2, html.xc-a11y-high-contrast h3,
html.xc-a11y-high-contrast h4, html.xc-a11y-high-contrast h5, html.xc-a11y-high-contrast p,
html.xc-a11y-high-contrast span, html.xc-a11y-high-contrast li {
    color: #fff !important;
    background-color: transparent !important;
}
html.xc-a11y-high-contrast img { filter: grayscale(30%) contrast(1.1); }

html.xc-a11y-highlight-links a {
    outline: 2px solid #ffeb3b !important;
    background: rgba(255, 235, 59, 0.25) !important;
    text-decoration: underline !important;
}

html.xc-a11y-keyboard-friendly *:focus {
    outline: 3px solid var(--xoomcare-secondary, #DE347F) !important;
    outline-offset: 2px !important;
}

html.xc-a11y-pause-animations *,
html.xc-a11y-pause-animations *::before,
html.xc-a11y-pause-animations *::after {
    animation-play-state: paused !important;
    transition: none !important;
}

@media (max-width: 560px) {
    #xc-a11y-toggle { width: 46px; height: 46px; font-size: 19px; left: 14px; bottom: 14px; }
    #xc-a11y-panel { left: 14px; bottom: 70px; }
}
