/**
 * Artcore CMS
 *
 * @copyright (c) 2026 АРТЕФАКТ. Все права защищены.
 * @license   Проприетарная лицензия, см. LICENSE.txt
 */

/*
 * Версия для слабовидящих. Подключается только при включённом режиме;
 * классы у <html> ставит сервер (cookie ac_a11y), поэтому страница не мигает.
 * Работает поверх любого шаблона.
 */

/* Панель настроек */
#a11y-panel {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 10px 16px;
    background: #ffffff; color: #000000; border-bottom: 3px solid #000000;
    font: 18px/1.4 Arial, "Helvetica Neue", sans-serif !important; letter-spacing: 0 !important; word-spacing: 0 !important; zoom: 1;
}
#a11y-panel .a11y-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#a11y-panel .a11y-label { font-weight: 700; margin-right: 4px; }
#a11y-panel a {
    display: inline-block; min-width: 44px; min-height: 44px; padding: 10px 12px; text-align: center; line-height: 1.2;
    color: #000000 !important; background: #ffffff !important; border: 2px solid #000000 !important; border-radius: 0; text-decoration: none !important;
}
#a11y-panel a[aria-current] { background: #000000 !important; color: #ffffff !important; }
#a11y-panel a:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }
#a11y-panel .a11y-size-btn-2 { font-size: 22px; }
#a11y-panel .a11y-size-btn-3 { font-size: 26px; }
#a11y-panel .a11y-scheme-btn-wb { background: #000000 !important; color: #ffffff !important; }
#a11y-panel .a11y-scheme-btn-blue { background: #9dd1ff !important; color: #063462 !important; border-color: #063462 !important; }
#a11y-panel .a11y-off { margin-left: auto; }

/* Крупный текст: масштаб всей страницы, вёрстка перестраивается под меньшую ширину */
html.a11y-size-1 body { zoom: 1.12; }
html.a11y-size-2 body { zoom: 1.35; }
html.a11y-size-3 body { zoom: 1.6; }
html.a11y #a11y-panel, html.a11y #artcore-bar { zoom: calc(1 / 1.12); }
html.a11y-size-2 #a11y-panel, html.a11y-size-2 #artcore-bar { zoom: calc(1 / 1.35); }
html.a11y-size-3 #a11y-panel, html.a11y-size-3 #artcore-bar { zoom: calc(1 / 1.6); }

/* Общие правила: ссылки подчёркнуты, заметный фокус, без анимации */
html.a11y body a { text-decoration: underline !important; }
html.a11y :focus-visible { outline: 3px solid currentColor !important; outline-offset: 3px !important; }
html.a11y *, html.a11y *::before, html.a11y *::after { animation: none !important; transition: none !important; }

/* Цветовые схемы */
html.a11y-scheme-bw body, html.a11y-scheme-bw body *:not(#a11y-panel):not(#a11y-panel *):not(#artcore-bar):not(#artcore-bar *) {
    background-color: #ffffff !important; color: #000000 !important; border-color: #000000 !important; box-shadow: none !important; text-shadow: none !important;
}
html.a11y-scheme-wb body, html.a11y-scheme-wb body *:not(#a11y-panel):not(#a11y-panel *):not(#artcore-bar):not(#artcore-bar *) {
    background-color: #000000 !important; color: #ffffff !important; border-color: #ffffff !important; box-shadow: none !important; text-shadow: none !important;
}
html.a11y-scheme-blue body, html.a11y-scheme-blue body *:not(#a11y-panel):not(#a11y-panel *):not(#artcore-bar):not(#artcore-bar *) {
    background-color: #9dd1ff !important; color: #063462 !important; border-color: #063462 !important; box-shadow: none !important; text-shadow: none !important;
}
html.a11y-scheme-bw, html.a11y-scheme-wb, html.a11y-scheme-blue { background-image: none !important; }
html[class*="a11y-scheme-"] body .ac-section { background-image: none !important; }
html[class*="a11y-scheme-"] body .ac-slide-text { background: none !important; }

/* Без изображений: картинки, видео и встраиваемые блоки скрыты, фоны убраны */
html.a11y-noimg body img, html.a11y-noimg body picture, html.a11y-noimg body video, html.a11y-noimg body iframe,
html.a11y-noimg body .ac-card-media, html.a11y-noimg body .ac-slide-media, html.a11y-noimg body .ac-gallery {
    display: none !important;
}
html.a11y-noimg body *:not(#a11y-panel) { background-image: none !important; }

/* Увеличенные интервалы */
html.a11y-wide body *:not(#a11y-panel):not(#a11y-panel *) { letter-spacing: .12em !important; word-spacing: .2em !important; line-height: 1.8 !important; }

/* При крупном шрифте длинные слова и строки элементов переносятся, а не выходят за край */
html.a11y body { overflow-wrap: anywhere; }
html.a11y .ac-slider-controls, html.a11y .ac-tabs-list, html.a11y .ac-search { flex-wrap: wrap; }
/* 12 колонок с промежутками не помещаются в узкий увеличенный экран; на телефоне колонки и так идут одна под другой */
@media (max-width: 640px) {
    html.a11y .ac-row { column-gap: 0; }
}
