/* ===== Панель «Версия для слабовидящих» ===== */

#CecutientWrapper {
  display: none;
  position: fixed;
  top: 0;
  width: 100%;
  background: #fff;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  padding: 12px 0;
}

#wrap {
  position: relative;
  top: 0;
}

#CecutientBlock {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#CecutientMain, #CecutientAdditional {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 24px;
  font-size: 16px;
  line-height: 1.4;
  padding: 0 16px;
  width: 100%;
}

#CecutientAdditional {
  border-top: 1px solid #ccc;
  margin-top: 10px;
  padding-top: 15px;
}

/* Группа: лейбл + кнопки */
.cev-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.cev-label {
  font-weight: 600;
  white-space: nowrap;
  margin-right: 2px;
}

/* --- Кнопки Вкл/Выкл --- */
.cev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 36px;
  padding: 0 12px;
  border: 2px solid #333;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  outline: none;
}
.cev-btn:focus-visible {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #f90;
}
.cev-btn:hover {
  background: #333;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

#CecutientOn { display: inline-flex; }
#CecutientOff, #ImageOn { display: none; }
#ImageOff { display: inline-flex; }

/* --- Кнопки размера шрифта --- */
.cev-font {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 44px;
  padding: 4px 8px;
  border: 2px solid #333;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 700;
  color: #333;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
  outline: none;
}
.cev-font:focus-visible {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #f90;
}
.cev-font:hover {
  background: #f0f0f0;
  border-color: #000;
}
.cev-font.active {
  background: #333;
  color: #fff !important;
  border-color: #333;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

#SmallFonts { font-size: 13px; }
#MediumFonts { font-size: 16px; }
#BigFonts { font-size: 19px; }
#SuperBigFonts { font-size: 22px; }
#ExtraLargeFonts { font-size: 25px; }

/* --- Кнопки цветовых схем --- */
.cev-color {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: inherit;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
  border: 3px solid #ccc;
  box-shadow: inset 0 0 0 2px transparent;
  outline: none;
}
.cev-color:focus-visible {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #f90;
}
.cev-color:hover {
  transform: scale(1.1);
}
.cev-color.active {
  border-color: #f90;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f90;
}

#WhiteStyle {
  color: #000 !important;
  background: #fff !important;
  border-color: #eee;
}
#BlackStyle {
  color: #fff !important;
  background: #000 !important;
  border-color: #333;
}
#BlueStyle {
  color: #063462 !important;
  background: #9DD1FF !important;
  border-color: #063462;
}
#GreenStyle {
  color: #A9E44D !important;
  background: #3B2716 !important;
  border-color: #A9E44D;
}

/* --- Мобильная адаптация --- */
@media only screen and (max-width: 767px) {
  #CecutientWrapper {
    max-height: none;
    overflow-y: auto;
  }
  #CecutientBlock {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 16px;
  }
  .cev-group {
    flex-wrap: wrap;
  }
}

/* ===== Вспомогательные (legacy) ===== */
#CecutientTop, .CecutientTopMenu {
  display: none;
}

section {
  position: relative;
}

/* Стиль для WhiteStyle */
.WhiteStyle .header_area {
  top: 40px;
}

/* ===== Классы размера шрифта ===== */
.SmallFonts { font-size: 16px !important; }
.MediumFonts { font-size: 20px !important; }
.BigFonts { font-size: 24px !important; }
.SuperBigFonts { font-size: 28px !important; }
.ExtraLargeFonts { font-size: 32px !important; }

/* ===== Классы шрифтов (С засечками / Без) ===== */
.FamilySans { font-family: Arial, Helvetica, sans-serif !important; }
.FamilySerif { font-family: "Times New Roman", Times, serif !important; }

/* ===== Классы межбуквенного интервала ===== */
.SpacingNormal { letter-spacing: normal !important; }
.SpacingMedium { letter-spacing: 0.1em !important; }
.SpacingLarge { letter-spacing: 0.2em !important; }

/* ===== Классы межстрочного интервала ===== */
.LineNormal { line-height: 1.2 !important; }
.LineMedium { line-height: 1.5 !important; }
.LineLarge { line-height: 2 !important; }

/* ===== Отключение анимаций ===== */
.DisableAnimations, .DisableAnimations * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* ===== Упрощенный интерфейс ===== */
.ViewSimple .carousel,
.ViewSimple .slider,
.ViewSimple .owl-carousel,
.ViewSimple .banner,
.ViewSimple [style*="background-image"] {
  background-image: none !important; 
}
.ViewSimple * {
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* ===== Цветовые схемы (Сверхвысокая специфичность ТОЛЬКО ДЛЯ #wrap) ===== */
.WhiteStyle, .WhiteStyle body, .WhiteStyle #wrap, .WhiteStyle #wrap *, .WhiteStyle #wrap *::before, .WhiteStyle #wrap *::after { background-color: #fff !important; background-image: none !important; color: #000 !important; border-color: #000 !important; box-shadow: none !important; text-shadow: none !important; }
.WhiteStyle #wrap a, .WhiteStyle #wrap button, .WhiteStyle #wrap span, .WhiteStyle #wrap .nav-link, .WhiteStyle #wrap .accordion-button { color: #000 !important; }
.WhiteStyle #wrap svg, .WhiteStyle #wrap svg *, .WhiteStyle #wrap path { fill: #000 !important; stroke: #000 !important; }

.BlackStyle, .BlackStyle body, .BlackStyle #wrap, .BlackStyle #wrap *, .BlackStyle #wrap *::before, .BlackStyle #wrap *::after { background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important; box-shadow: none !important; text-shadow: none !important; }
.BlackStyle #wrap a, .BlackStyle #wrap button, .BlackStyle #wrap span, .BlackStyle #wrap .nav-link, .BlackStyle #wrap .accordion-button { color: #fff !important; }
.BlackStyle #wrap svg, .BlackStyle #wrap svg *, .BlackStyle #wrap path { fill: #fff !important; stroke: #fff !important; }

.BlueStyle, .BlueStyle body, .BlueStyle #wrap, .BlueStyle #wrap *, .BlueStyle #wrap *::before, .BlueStyle #wrap *::after { background-color: #9DD1FF !important; background-image: none !important; color: #063462 !important; border-color: #063462 !important; box-shadow: none !important; text-shadow: none !important; }
.BlueStyle #wrap a, .BlueStyle #wrap button, .BlueStyle #wrap span, .BlueStyle #wrap .nav-link, .BlueStyle #wrap .accordion-button { color: #063462 !important; }
.BlueStyle #wrap svg, .BlueStyle #wrap svg *, .BlueStyle #wrap path { fill: #063462 !important; stroke: #063462 !important; }

.GreenStyle, .GreenStyle body, .GreenStyle #wrap, .GreenStyle #wrap *, .GreenStyle #wrap *::before, .GreenStyle #wrap *::after { background-color: #3B2716 !important; background-image: none !important; color: #A9E44D !important; border-color: #A9E44D !important; box-shadow: none !important; text-shadow: none !important; }
.GreenStyle #wrap a, .GreenStyle #wrap button, .GreenStyle #wrap span, .GreenStyle #wrap .nav-link, .GreenStyle #wrap .accordion-button { color: #A9E44D !important; }
.GreenStyle #wrap svg, .GreenStyle #wrap svg *, .GreenStyle #wrap path { fill: #A9E44D !important; stroke: #A9E44D !important; }

/* Исключения для меню и специфических элементов */
.WhiteStyle .nicdark_menu > li > a:after { color: #000 !important; }
.BlackStyle .nicdark_menu > li > a:after { color: #fff !important; }
.BlueStyle .nicdark_menu > li > a:after { color: #063462 !important; }
.GreenStyle .nicdark_menu > li > a:after { color: #A9E44D !important; }

/* Исправление placeholder-ов */
.WhiteStyle ::placeholder { color: #555 !important; opacity: 1 !important; }
.BlackStyle ::placeholder { color: #aaa !important; opacity: 1 !important; }
.BlueStyle ::placeholder { color: #063462 !important; opacity: 0.8 !important; }
.GreenStyle ::placeholder { color: #A9E44D !important; opacity: 0.8 !important; }

/* ===== Панель виджета (ЗАЩИЩЕНА ОТ ТЕМ) ===== */
#CecutientWrapper {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #f8f9fa !important;
  border-bottom: 2px solid #ddd !important;
  z-index: 999999 !important;
  padding: 15px 0 !important;
  font-family: Arial, sans-serif !important;
  color: #333 !important;
}

#CecutientBlock {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 15px 30px !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.cev-group {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.cev-label {
  font-size: 14px !important;
  font-weight: bold !important;
  color: #555 !important;
  text-transform: uppercase !important;
}

/* Кнопки в панели */
#CecutientWrapper button {
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

#CecutientWrapper button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Переопределение active для панели */
#CecutientWrapper button.active, #CecutientWrapper button[aria-pressed="true"] {
  background: #007bff !important;
  color: #fff !important;
  border-color: #0056b3 !important;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.25) !important;
}

/* Схемы в панели (кружки) */
#CecutientWrapper .cev-color {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  border: 2px solid #ccc !important;
  font-size: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 900 !important;
}

#CecutientWrapper #WhiteStyle { background: #fff !important; color: #000 !important; }
#CecutientWrapper #BlackStyle { background: #000 !important; color: #fff !important; }
#CecutientWrapper #BlueStyle { background: #9DD1FF !important; color: #063462 !important; }
#CecutientWrapper #GreenStyle { background: #3B2716 !important; color: #A9E44D !important; }

/* Шрифты в панели */
#CecutientWrapper .cev-font {
  min-width: 60px !important;
  height: 40px !important;
  background: #fff !important;
  color: #333 !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

#CecutientWrapper .cev-btn {
  background: #fff !important;
  color: #333 !important;
  border: 1px solid #ccc !important;
  padding: 5px 15px !important;
  border-radius: 4px !important;
  font-weight: bold !important;
  text-decoration: none !important;
}

/* Мобильная адаптация панели (перебивает !important выше) */
@media only screen and (max-width: 767px) {
  #CecutientBlock {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 4px 16px !important;
  }
  .cev-group {
    flex-wrap: wrap !important;
  }
}

/* ===== Синтез речи (кнопки и селект) ===== */

/* Кнопки озвучки в панели */
#CecutientWrapper .cev-speech-btn {
  min-width: 90px !important;
  font-size: 13px !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
}

/* Активное состояние — идёт чтение */
#CecutientWrapper .cev-speech-btn.cev-speech-active {
  background: #28a745 !important;
  color: #fff !important;
  border-color: #1e7e34 !important;
  box-shadow: 0 0 0 3px rgba(40,167,69,0.3) !important;
}

/* Состояние паузы */
#CecutientWrapper .cev-speech-btn.cev-speech-paused {
  background: #ffc107 !important;
  color: #333 !important;
  border-color: #d39e00 !important;
  box-shadow: 0 0 0 3px rgba(255,193,7,0.3) !important;
}

/* Селектор скорости речи */
#CecutientWrapper .cev-select {
  height: 36px !important;
  min-width: 65px !important;
  padding: 4px 8px !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #333 !important;
  font-size: 14px !important;
  font-weight: bold !important;
  font-family: Arial, sans-serif !important;
  cursor: pointer !important;
  outline: none !important;
  transition: border-color 0.2s ease !important;
  -webkit-appearance: auto !important;
  -moz-appearance: auto !important;
  appearance: auto !important;
}

#CecutientWrapper .cev-select:hover,
#CecutientWrapper .cev-select:focus {
  border-color: #007bff !important;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.15) !important;
}
