/* BVI (Button for Visually Impaired) Styles - GOST R 52872-2019 / MosSport Standard */

/* Fixed top control panel with static sizing */
.bvi-panel {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  z-index: 1000 !important;
  background: #ffffff !important;
  border-bottom: 2px solid #000000 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
  padding: 8px 16px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px 12px !important;
  font-family: Inter, system-ui, -apple-system, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  box-sizing: border-box !important;
}

.bvi-panel.bvi-hide {
  display: none !important;
}

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

.bvi-panel .bvi-label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1 !important;
}

.bvi-panel .bvi-btn {
  padding: 5px 10px !important;
  border-radius: 6px !important;
  border: 1px solid #000000 !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
  line-height: 1.3 !important;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-sizing: border-box !important;
}

.bvi-panel .bvi-btn:hover {
  background: #000000 !important;
  color: #ffffff !important;
}

.bvi-panel .bvi-btn.active {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #000000 !important;
}

/* Offset fixed header and main content when BVI panel is active */
body.bvi-active header {
  top: 50px !important;
}

body.bvi-active main {
  padding-top: 8.5rem !important;
}

/* Font sizes: scaled proportionally via html/body root rem */
html.bvi-font-18 {
  font-size: 18px !important;
}
body.bvi-font-18 {
  font-size: 18px !important;
}

html.bvi-font-22 {
  font-size: 22px !important;
}
body.bvi-font-22 {
  font-size: 22px !important;
}

/* ========================================================= */
/* MOSPORT HIGH-CONTRAST FLAT STYLES (RESET OF SHADOWS/GRADS) */
/* ========================================================= */

body.bvi-active,
html.bvi-active {
  background-color: #ffffff !important;
  color: #000000 !important;
}

body.bvi-active * {
  box-shadow: none !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Reset all colored backgrounds, blurs, and complex gradients */
body.bvi-active div:not(.bvi-panel):not(.bvi-panel *),
body.bvi-active section:not(.bvi-panel *),
body.bvi-active header:not(.bvi-panel *),
body.bvi-active footer:not(.bvi-panel *),
body.bvi-active main:not(.bvi-panel *),
body.bvi-active article:not(.bvi-panel *),
body.bvi-active aside:not(.bvi-panel *),
body.bvi-active nav:not(.bvi-panel *) {
  background-image: none !important;
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

/* High contrast bold links */
body.bvi-active a:not(.bvi-panel a) {
  color: #000000 !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
}

body.bvi-active a:hover:not(.bvi-panel a) {
  background-color: #000000 !important;
  color: #ffffff !important;
}

/* High contrast flat buttons */
body.bvi-active button:not(.bvi-panel button) {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
}

body.bvi-active button:hover:not(.bvi-panel button) {
  background-color: #000000 !important;
  color: #ffffff !important;
}

/* Inputs, textareas, selects */
body.bvi-active input,
body.bvi-active textarea,
body.bvi-active select {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
}

/* ========================================================= */
/* THEME 2: INVERTED BLACK THEME                             */
/* ========================================================= */
body.bvi-active.bvi-theme-black,
html.bvi-active.bvi-theme-black {
  background-color: #000000 !important;
  color: #ffffff !important;
}

body.bvi-active.bvi-theme-black div:not(.bvi-panel):not(.bvi-panel *),
body.bvi-active.bvi-theme-black section:not(.bvi-panel *),
body.bvi-active.bvi-theme-black header:not(.bvi-panel *),
body.bvi-active.bvi-theme-black footer:not(.bvi-panel *),
body.bvi-active.bvi-theme-black main:not(.bvi-panel *),
body.bvi-active.bvi-theme-black article:not(.bvi-panel *),
body.bvi-active.bvi-theme-black aside:not(.bvi-panel *),
body.bvi-active.bvi-theme-black nav:not(.bvi-panel *) {
  background-image: none !important;
  background-color: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

body.bvi-active.bvi-theme-black a:not(.bvi-panel a) {
  color: #ffff00 !important;
  text-decoration: underline !important;
}

body.bvi-active.bvi-theme-black a:hover:not(.bvi-panel a) {
  background-color: #ffffff !important;
  color: #000000 !important;
}

body.bvi-active.bvi-theme-black button:not(.bvi-panel button) {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

body.bvi-active.bvi-theme-black button:hover:not(.bvi-panel button) {
  background-color: #ffffff !important;
  color: #000000 !important;
}

body.bvi-active.bvi-theme-black input,
body.bvi-active.bvi-theme-black textarea,
body.bvi-active.bvi-theme-black select {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

/* ========================================================= */
/* THEME 3: DEEP BLUE THEME                                  */
/* ========================================================= */
body.bvi-active.bvi-theme-blue,
html.bvi-active.bvi-theme-blue {
  background-color: #002B49 !important;
  color: #A3E5FF !important;
}

body.bvi-active.bvi-theme-blue div:not(.bvi-panel):not(.bvi-panel *),
body.bvi-active.bvi-theme-blue section:not(.bvi-panel *),
body.bvi-active.bvi-theme-blue header:not(.bvi-panel *),
body.bvi-active.bvi-theme-blue footer:not(.bvi-panel *),
body.bvi-active.bvi-theme-blue main:not(.bvi-panel *),
body.bvi-active.bvi-theme-blue article:not(.bvi-panel *),
body.bvi-active.bvi-theme-blue aside:not(.bvi-panel *),
body.bvi-active.bvi-theme-blue nav:not(.bvi-panel *) {
  background-image: none !important;
  background-color: #002B49 !important;
  color: #A3E5FF !important;
  border-color: #005F9E !important;
}

body.bvi-active.bvi-theme-blue a:not(.bvi-panel a) {
  color: #ffffff !important;
  text-decoration: underline !important;
}

body.bvi-active.bvi-theme-blue button:not(.bvi-panel button) {
  background-color: #002B49 !important;
  color: #A3E5FF !important;
  border: 2px solid #A3E5FF !important;
}

body.bvi-active.bvi-theme-blue input,
body.bvi-active.bvi-theme-blue textarea,
body.bvi-active.bvi-theme-blue select {
  background-color: #002B49 !important;
  color: #A3E5FF !important;
  border: 2px solid #A3E5FF !important;
}

/* Image replacement placeholder [Фото: ...] */
.bvi-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  background-color: #f1f5f9;
  color: #000000;
  border: 2px dashed #000000;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  word-break: break-word;
  margin: 6px 0;
  box-sizing: border-box;
}

body.bvi-active.bvi-theme-black .bvi-img-placeholder {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 2px dashed #ffffff !important;
}

body.bvi-active.bvi-theme-blue .bvi-img-placeholder {
  background-color: #002B49 !important;
  color: #A3E5FF !important;
  border: 2px dashed #A3E5FF !important;
}
