/* --- Оверлей и модальное окно --- */
#a11y-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Полупрозрачный фон */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#a11y-overlay.a11y-hidden {
    display: none;
}

#a11y-popup {
    background: #ffffff;
    width: 100%;
    max-width: 360px;
    padding: 24px;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    font-family: sans-serif;
    color: #1a202c;
}

/* --- Хедер --- */
.a11y-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.a11y-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

#a11y-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
}

/* --- Секции и контролы --- */
.a11y-section {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Базовый CSS для кнопок групп */
.a11y-btn-group {
    display: flex;
    gap: 8px;
}

.a11y-btn-group button {
    flex: 1;
    padding: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.a11y-btn-group button.active {
    background: #3e2d5d;
    color: #fff;
    border-color: #3e2d5d;
}

/* Чекбоксы */
.a11y-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.a11y-checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
	accent-color: #6c4ca7
}

/* Кнопка сброса */
.a11y-btn-secondary {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: #3e2d5d;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: background .3s ease-out;
    will-change: background;
}

.a11y-btn-secondary:hover {
    background: #835ec9;
    color: #fff;
}

/* Стили модификаторов (те же, что в первом ответе) */
html.a11y-text-M { font-size: 20px; }
html.a11y-text-L { font-size: 24px; }
html.a11y-text-XL { font-size: 28px; }
html.a11y-bw { filter: grayscale(100%); }
html.a11y-large-cursor, html.a11y-large-cursor * {
    cursor: url(/img/svg/cursor.svg) 0 0, auto !important;
}

#a11y-reading-line {
    display: none;
    position: fixed;
    left: 0; top: 0; width: 100%; height: 2px;
    background-color: #000;
    z-index: 9999;
    pointer-events: none;
    will-change: transform;
}
#a11y-reading-line.active { display: block; }

.a11y-btn-container {
	display: flex;
	width: 100%;
	justify-content: center;
	align-items: center;
	margin-top: 2rem
}
.a11y-btn-container .a11y-btn-cta {
	padding: .5rem 1rem;
    color: #3e2d5d;
    background: #fff;
    border-radius: 2rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
	cursor:pointer;
    transition: transform .3s ease-out;
    will-change: transform;
}
.a11y-btn-container .a11y-btn-cta:hover,
.a11y-btn-container .a11y-btn-cta:active {
	transform: translateY(-5px);
}