/**
 * Стили режима для слабовидящих по Стандарту
 */

/* ==========================================================================
  ПАНЕЛЬ УПРАВЛЕНИЯ (BVI TOOLBAR) */
#vstts-bvi-panel {
    display: none;
    position: sticky;
    top: 0;
    z-index: 99999;
    background-color: #f1f5f9;
    border-bottom: 2px solid #0f172a;
    padding: 10px 0;
    font-family: Arial, sans-serif !important;
    font-size: 14px;
}

body.bvi-active #vstts-bvi-panel {
    display: block;
}

.bvi-group-title {
    font-weight: bold;
    font-size: 13px;
    margin-right: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bvi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    margin: 2px;
    border: 2px solid #0f172a;
    background: #ffffff;
    color: #0f172a;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.bvi-btn:hover {
    background: #e2e8f0;
}

.bvi-btn.is-active {
    background: #0f172a !important;
    color: #ffffff !important;
    outline: 2px solid #ffcc00;
}

/* ==========================================================================
  КЛАВИАТУРНЫЙ ФОКУС (:focus-visible)*/
body.bvi-active a:focus-visible,
body.bvi-active button:focus-visible,
body.bvi-active input:focus-visible,
body.bvi-active select:focus-visible,
body.bvi-active textarea:focus-visible {
    outline: 4px solid #ffcc00 !important;
    outline-offset: 3px !important;
}

/* Скрытие кнопки в режиме слабовидящих */
body.bvi-active #vstts-bvi-toggle {
    display: none !important;
}


/* ==========================================================================
   3. ДИНАМИЧЕСКИЙ МАСШТАБ ШРИФТА В BVI
   ========================================================================== */
body.bvi-active.bvi-font-normal {
    --vstts-font-scale: 1.1;
}

body.bvi-active.bvi-font-large {
    --vstts-font-scale: 1.35;
}

body.bvi-active.bvi-font-xlarge {
    --vstts-font-scale: 1.65;
}

/* Принудительное масштабирование ВСЕХ элементов контента в BVI */
body.bvi-active h1, body.bvi-active .h1 { font-size: var(--font-h1) !important; line-height: 1.25 !important; }
body.bvi-active h2, body.bvi-active .h2 { font-size: var(--font-h2) !important; line-height: 1.25 !important; }
body.bvi-active h3, body.bvi-active .h3 { font-size: var(--font-h3) !important; line-height: 1.25 !important; }
body.bvi-active h4, body.bvi-active .h4 { font-size: var(--font-h4) !important; line-height: 1.25 !important; }
body.bvi-active h5, body.bvi-active .h5 { font-size: var(--font-h5) !important; line-height: 1.25 !important; }

/* Таблицы, ячейки, карточки и списки */
body.bvi-active p,
body.bvi-active li,
body.bvi-active td,
body.bvi-active th,
body.bvi-active label,
body.bvi-active .sveden-table,
body.bvi-active .sveden-table th,
body.bvi-active .sveden-table td,
body.bvi-active .abitur-table,
body.bvi-active .abitur-table th,
body.bvi-active .abitur-table td,
body.bvi-active .sveden-doc-title,
body.bvi-active .sveden-doc-btn,
body.bvi-active .doc-absent,
body.bvi-active .itemprop-empty {
    font-size: var(--font-body-l) !important; /* Увеличивается пропорционально! */
    line-height: 1.5 !important;
}

body.bvi-active small,
body.bvi-active .small,
body.bvi-active .sveden-doc-date {
    font-size: var(--font-body-m) !important;
}

/* ==========================================================================
  ЦВЕТОВЫЕ СХЕМЫ*/

/* Отключение банеров */
body.bvi-active,
body.bvi-active * {
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Рамки для карточек и блоков */
body.bvi-active .card,
body.bvi-active .hero-p1-card,
body.bvi-active .p2-slot-card,
body.bvi-active .useful-link-card,
body.bvi-active .sveden-section {
    border: 2px solid currentColor !important;
}

/* Черным по белому (C1) */
body.bvi-active.bvi-theme-white,
body.bvi-active.bvi-theme-white * {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}
body.bvi-active.bvi-theme-white a {
    color: #0000ee !important;
    text-decoration: underline !important;
}

/* Белым по черному (C2 - инверсия) */
body.bvi-active.bvi-theme-black,
body.bvi-active.bvi-theme-black * {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}
body.bvi-active.bvi-theme-black a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

/* Темно-синим по голубому (C3) */
body.bvi-active.bvi-theme-blue,
body.bvi-active.bvi-theme-blue * {
    background-color: #c7e4f5 !important;
    color: #063462 !important;
    border-color: #063462 !important;
}
body.bvi-active.bvi-theme-blue a {
    color: #000080 !important;
    text-decoration: underline !important;
}

/* Коричневым по бежевому (C4) */
body.bvi-active.bvi-theme-brown,
body.bvi-active.bvi-theme-brown * {
    background-color: #f7f3e8 !important;
    color: #4d3b2b !important;
    border-color: #4d3b2b !important;
}
body.bvi-active.bvi-theme-brown a {
    color: #804000 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
  МЕЖБУКВЕННЫЙ ИНТЕРВАЛ*/
body.bvi-active.bvi-spacing-normal * {
    line-height: 1.5 !important;
    letter-spacing: normal !important;
}

body.bvi-active.bvi-spacing-medium * {
    line-height: 1.8 !important;
    letter-spacing: 1px !important;
}

body.bvi-active.bvi-spacing-large * {
    line-height: 2.2 !important;
    letter-spacing: 2px !important;
}

/* ==========================================================================
   РЕЖИМ МЕДИА / ИЗОБРАЖЕНИЙ */

/* Отключение картинок */
body.bvi-active.bvi-images-off img,
body.bvi-active.bvi-images-off svg:not(.bi-eye-fill),
body.bvi-active.bvi-images-off picture,
body.bvi-active.bvi-images-off video {
    display: none !important;
}

/* Монохромный (ч/б) режим картинок */
body.bvi-active.bvi-images-grayscale img,
body.bvi-active.bvi-images-grayscale picture,
body.bvi-active.bvi-images-grayscale video {
    filter: grayscale(100%) contrast(120%) !important;
}

/* Текстовая плашка вместо отключенного изображения*/
.bvi-img-placeholder {
    display: inline-block !important;
    padding: 6px 12px;
    margin: 6px 0;
    border: 2px dashed currentColor !important;
    font-size: 0.9em !important;
    font-weight: bold !important;
    border-radius: 4px;
    background: transparent !important;
    color: inherit !important;
    line-height: 1.4 !important;
}

/* ==========================================================================
   ИЗМЕНЕНИЕ ЛОГОТИПА
   /* Запрещаем заливать фон и ставить рамку*/
body.bvi-active .header-brand-logo,
body.bvi-active .footer-brand-logo {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Логотип чисто черным силуэтом */
body.bvi-active.bvi-theme-white .header-brand-logo,
body.bvi-active.bvi-theme-white .footer-brand-logo,
body.bvi-active.bvi-theme-blue .header-brand-logo,
body.bvi-active.bvi-theme-blue .footer-brand-logo,
body.bvi-active.bvi-theme-brown .header-brand-logo,
body.bvi-active.bvi-theme-brown .footer-brand-logo {
    filter: brightness(0) !important;
}

/* Исходный белый логотип */
body.bvi-active.bvi-theme-black .header-brand-logo,
body.bvi-active.bvi-theme-black .footer-brand-logo {
    filter: none !important;
}

/* Принудительное масштабирование главного меню в BVI */
body.bvi-active .desktop-nav-link,
body.bvi-active .drawer-nav-link {
    font-size: var(--font-body-l) !important;
}

body.bvi-active .desktop-dropdown-item,
body.bvi-active .drawer-sub-link {
    font-size: var(--font-body-m) !important;
}

/* ==========================================================================
   ИКОНКИ В РЕЖИМЕ СЛАБОВИДЯЩИХ
   ========================================================================== */

/* Убираем принудительную заливку фона у SVG-иконок */
body.bvi-active.bvi-theme-white svg,
body.bvi-active.bvi-theme-black svg {
    background: transparent !important;
    background-color: transparent !important;
}

/* Чёрным по белому (ЧБ) */
body.bvi-active.bvi-theme-white svg,
body.bvi-active.bvi-theme-white svg *,
body.bvi-active.bvi-theme-white .bi,
body.bvi-active.bvi-theme-white .fa,
body.bvi-active.bvi-theme-white .icon {
    color: #000000 !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* Белым по чёрному (БЧ) */
body.bvi-active.bvi-theme-black svg,
body.bvi-active.bvi-theme-black svg *,
body.bvi-active.bvi-theme-black .bi,
body.bvi-active.bvi-theme-black .fa,
body.bvi-active.bvi-theme-black .icon {
    color: #ffffff !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* Не перекрашиваем изображения и логотипы этим правилом */
body.bvi-active.bvi-theme-white img,
body.bvi-active.bvi-theme-black img {
    background: transparent !important;
}

/* (ЧБ) — баннеры монохромны */
body.bvi-active.bvi-theme-white .useful-link-img {
    filter: grayscale(100%) contrast(120%) !important;
}

/* (БЧ) — инверт негатив */
body.bvi-active.bvi-theme-black .useful-link-img {
    filter: grayscale(100%) invert(100%) contrast(120%) !important;
}

/* общий режим Ч/Б */
body.bvi-active.bvi-images-grayscale .useful-link-img {
    filter: grayscale(100%) contrast(120%) !important;
}

body.bvi-active.bvi-images-off .useful-link-card .bvi-img-placeholder {
    width: 100% !important;
    text-align: center !important;
    margin: 0 !important;
}
