/* ==========================================================================
   Версия для слабовидящих (Accessibility / BVI) - Клиника Маримед
   По мотивам sovamed.ru и ГОСТ Р 52872-2019
   ========================================================================== */

/* Кнопка в шапке / футере */
.bvi-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
}

.bvi-open-btn:hover {
  background-color: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.bvi-open-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ==========================================================================
   Фиксированная панель настроек для слабовидящих
   ========================================================================== */
#bvi-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: #f8fafc;
  color: #0f172a;
  border-bottom: 2px solid #000;
  z-index: 99999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

html.specialversion #bvi-panel {
  display: block;
}

html.specialversion body {
  padding-top: 60px !important;
}

.bvi-panel-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bvi-controls-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.bvi-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bvi-label {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

/* Кнопки переключения внутри панели */
.bvi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #333;
  background: #fff;
  color: #000;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
  transition: all 0.15s ease;
  min-height: 32px;
  box-sizing: border-box;
}

.bvi-btn:hover {
  filter: brightness(0.9);
}

.bvi-btn.active {
  outline: 2px solid #000;
  outline-offset: 1px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #000;
}

/* Размеры шрифта */
.bvi-btn-fs-small { font-size: 13px; font-weight: bold; }
.bvi-btn-fs-normal { font-size: 16px; font-weight: bold; }
.bvi-btn-fs-big { font-size: 20px; font-weight: bold; }

/* Цветовые палитры */
.bvi-color-scheme-1 { background: #ffffff !important; color: #000000 !important; border-color: #000000 !important; }
.bvi-color-scheme-2 { background: #000000 !important; color: #ffffff !important; border-color: #ffffff !important; }
.bvi-color-scheme-3 { background: #9dd1ff !important; color: #063462 !important; border-color: #063462 !important; }
.bvi-color-scheme-4 { background: #f7f3d6 !important; color: #4d4b43 !important; border-color: #4d4b43 !important; }
.bvi-color-scheme-5 { background: #3b2716 !important; color: #a9e44d !important; border-color: #a9e44d !important; }

/* Дополнительная шторка настроек (popped) */
#bvi-dropdown {
  display: none;
  border-top: 1px solid #cbd5e1;
  background: inherit;
  padding: 14px 16px;
  border-bottom: 1px solid #000;
}

.bvi-dropdown-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.bvi-dropdown-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Кнопка закрытия / обычной версии */
.bvi-btn-close {
  background: #dc2626 !important;
  color: #fff !important;
  border-color: #b91c1c !important;
}

.bvi-btn-close:hover {
  background: #b91c1c !important;
}

/* ==========================================================================
   Стилизация контента в режиме specialversion
   ========================================================================== */

html.specialversion {
  transition: none !important;
}

/* Размеры шрифтов сайта */
html.specialversion.fs-small {
  font-size: 15px;
}
html.specialversion.fs-normal {
  font-size: 18px;
}
html.specialversion.fs-big {
  font-size: 22px;
}

/* Семейство шрифта */
html.specialversion.font-serif,
html.specialversion.font-serif * {
  font-family: "Times New Roman", Times, Georgia, serif !important;
}

html.specialversion.font-sans,
html.specialversion.font-sans * {
  font-family: Arial, Helvetica, Tahoma, sans-serif !important;
}

/* Межбуквенный интервал (Кернинг) */
html.specialversion.spacing-normal body {
  letter-spacing: normal !important;
}
html.specialversion.spacing-medium body {
  letter-spacing: 2px !important;
}
html.specialversion.spacing-big body {
  letter-spacing: 4px !important;
}

/* Управление изображениями */
html.specialversion.imagesoff img:not(.bvi-keep-img),
html.specialversion.imagesoff .carousel,
html.specialversion.imagesoff [style*="background-image"] {
  display: none !important;
}

html.specialversion.imagesoff .bvi-img-placeholder {
  display: inline-block;
  padding: 8px 12px;
  border: 1px dashed currentColor;
  margin: 4px 0;
  font-style: italic;
  font-size: 0.9em;
}

/* Модификация общих компонентов в режиме спецверсии */
html.specialversion * {
  box-shadow: none !important;
  text-shadow: none !important;
}

html.specialversion a {
  text-decoration: underline !important;
}

html.specialversion button,
html.specialversion .btn,
html.specialversion .card,
html.specialversion .table,
html.specialversion input,
html.specialversion select,
html.specialversion textarea {
  border-width: 2px !important;
}

/* --------------------------------------------------------------------------
   Цветовые схемы (5 штук по ГОСТ / sovamed.ru)
   -------------------------------------------------------------------------- */

/* 1. Черным по белому (color1) */
html.specialversion.color1,
html.specialversion.color1 body,
html.specialversion.color1 header,
html.specialversion.color1 nav,
html.specialversion.color1 footer,
html.specialversion.color1 .bg-light,
html.specialversion.color1 .bg-white,
html.specialversion.color1 .bg-dark,
html.specialversion.color1 .card,
html.specialversion.color1 .table,
html.specialversion.color1 #bvi-panel {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

html.specialversion.color1 a,
html.specialversion.color1 .nav-link,
html.specialversion.color1 h1,
html.specialversion.color1 h2,
html.specialversion.color1 h3,
html.specialversion.color1 h4,
html.specialversion.color1 h5,
html.specialversion.color1 p,
html.specialversion.color1 span,
html.specialversion.color1 strong {
  color: #000000 !important;
}

html.specialversion.color1 .btn,
html.specialversion.color1 button {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
}

html.specialversion.color1 .btn:hover,
html.specialversion.color1 button:hover {
  background-color: #000000 !important;
  color: #ffffff !important;
}

/* 2. Белым по черному (color2) */
html.specialversion.color2,
html.specialversion.color2 body,
html.specialversion.color2 header,
html.specialversion.color2 nav,
html.specialversion.color2 footer,
html.specialversion.color2 .bg-light,
html.specialversion.color2 .bg-white,
html.specialversion.color2 .bg-dark,
html.specialversion.color2 .card,
html.specialversion.color2 .table,
html.specialversion.color2 #bvi-panel {
  background-color: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

html.specialversion.color2 a,
html.specialversion.color2 .nav-link,
html.specialversion.color2 h1,
html.specialversion.color2 h2,
html.specialversion.color2 h3,
html.specialversion.color2 h4,
html.specialversion.color2 h5,
html.specialversion.color2 p,
html.specialversion.color2 span,
html.specialversion.color2 strong {
  color: #ffffff !important;
}

html.specialversion.color2 .btn,
html.specialversion.color2 button {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

html.specialversion.color2 .btn:hover,
html.specialversion.color2 button:hover {
  background-color: #ffffff !important;
  color: #000000 !important;
}

/* 3. Темно-синим по голубому (color3) */
html.specialversion.color3,
html.specialversion.color3 body,
html.specialversion.color3 header,
html.specialversion.color3 nav,
html.specialversion.color3 footer,
html.specialversion.color3 .bg-light,
html.specialversion.color3 .bg-white,
html.specialversion.color3 .bg-dark,
html.specialversion.color3 .card,
html.specialversion.color3 .table,
html.specialversion.color3 #bvi-panel {
  background-color: #9dd1ff !important;
  color: #063462 !important;
  border-color: #063462 !important;
}

html.specialversion.color3 a,
html.specialversion.color3 .nav-link,
html.specialversion.color3 h1,
html.specialversion.color3 h2,
html.specialversion.color3 h3,
html.specialversion.color3 h4,
html.specialversion.color3 h5,
html.specialversion.color3 p,
html.specialversion.color3 span,
html.specialversion.color3 strong {
  color: #063462 !important;
}

html.specialversion.color3 .btn,
html.specialversion.color3 button {
  background-color: #9dd1ff !important;
  color: #063462 !important;
  border: 2px solid #063462 !important;
}

html.specialversion.color3 .btn:hover,
html.specialversion.color3 button:hover {
  background-color: #063462 !important;
  color: #9dd1ff !important;
}

/* 4. Коричневым по бежевому (color4) */
html.specialversion.color4,
html.specialversion.color4 body,
html.specialversion.color4 header,
html.specialversion.color4 nav,
html.specialversion.color4 footer,
html.specialversion.color4 .bg-light,
html.specialversion.color4 .bg-white,
html.specialversion.color4 .bg-dark,
html.specialversion.color4 .card,
html.specialversion.color4 .table,
html.specialversion.color4 #bvi-panel {
  background-color: #f7f3d6 !important;
  color: #4d4b43 !important;
  border-color: #4d4b43 !important;
}

html.specialversion.color4 a,
html.specialversion.color4 .nav-link,
html.specialversion.color4 h1,
html.specialversion.color4 h2,
html.specialversion.color4 h3,
html.specialversion.color4 h4,
html.specialversion.color4 h5,
html.specialversion.color4 p,
html.specialversion.color4 span,
html.specialversion.color4 strong {
  color: #4d4b43 !important;
}

html.specialversion.color4 .btn,
html.specialversion.color4 button {
  background-color: #f7f3d6 !important;
  color: #4d4b43 !important;
  border: 2px solid #4d4b43 !important;
}

html.specialversion.color4 .btn:hover,
html.specialversion.color4 button:hover {
  background-color: #4d4b43 !important;
  color: #f7f3d6 !important;
}

/* 5. Зеленым по темно-коричневому (color5) */
html.specialversion.color5,
html.specialversion.color5 body,
html.specialversion.color5 header,
html.specialversion.color5 nav,
html.specialversion.color5 footer,
html.specialversion.color5 .bg-light,
html.specialversion.color5 .bg-white,
html.specialversion.color5 .bg-dark,
html.specialversion.color5 .card,
html.specialversion.color5 .table,
html.specialversion.color5 #bvi-panel {
  background-color: #3b2716 !important;
  color: #a9e44d !important;
  border-color: #a9e44d !important;
}

html.specialversion.color5 a,
html.specialversion.color5 .nav-link,
html.specialversion.color5 h1,
html.specialversion.color5 h2,
html.specialversion.color5 h3,
html.specialversion.color5 h4,
html.specialversion.color5 h5,
html.specialversion.color5 p,
html.specialversion.color5 span,
html.specialversion.color5 strong {
  color: #a9e44d !important;
}

html.specialversion.color5 .btn,
html.specialversion.color5 button {
  background-color: #3b2716 !important;
  color: #a9e44d !important;
  border: 2px solid #a9e44d !important;
}

html.specialversion.color5 .btn:hover,
html.specialversion.color5 button:hover {
  background-color: #a9e44d !important;
  color: #3b2716 !important;
}
