/*!
 * finevision-a11y-v5.2.css
 * Глобальные стили для режима слабовидящих
 */

/* === Кнопка === */
.fv-a11y-btn {
  position: fixed;
  z-index: 9999999 !important;
  width: 200px;
  height: 50px;
  border-radius: 3%;
  border: none;
  cursor: pointer;
  background: #F5A300;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  font-family: Arial, sans-serif;
}
.fv-a11y-btn:hover { background: #009739; transform: scale(1.1); }
.fv-a11y-btn.fv-active { background: #F5A300; color: #fff; }

/* Позиции кнопки */
.fv-pos-top-right { top: 50px; right: 2px; }
.fv-pos-top-left { top: 10px; left: 20px; }
.fv-pos-bottom-right { bottom: 15px; right: 15px; }
.fv-pos-bottom-left { bottom: 15px; left: 15px; }

/* === Панель === */
.fv-a11y-panel {
  position: fixed;
  width: 280px;
  z-index: 9999998;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: 10px 15px;
  font-family: Arial, sans-serif;
  transition: all 0.25s ease;
}
.fv-hidden { display: none !important; }

.fv-a11y-panel.fv-pos-top-left { top: 95px; left: 15px; }
.fv-a11y-panel.fv-pos-top-right { top: 95px; right: 15px; }
.fv-a11y-panel.fv-pos-bottom-right { bottom: 70px; right: 15px; }
.fv-a11y-panel.fv-pos-bottom-left { bottom: 70px; left: 15px; }

.fv-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
  margin-bottom: 10px;
}
.fv-panel-header h3 { font-size: 18px; margin: 0; }
.fv-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

/* === Кнопки панели === */
.fv-btn {
  background: #eee;
  border: 1px solid #666;
  border-radius: 5px;
  margin: 2px;
  padding: 5px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.fv-btn:hover { background: #ccc; }
.fv-btn:focus { outline: 2px solid #0055ff; outline-offset: 2px; }
.fv-reset { background: #222; color: #fff; font-weight: bold; }
.fv-reset:hover { background: #0055ff; }

.fv-group { margin-bottom: 10px; }
.fv-group label { display: block; font-weight: bold; margin-bottom: 4px; }

/* === Темы === */
.fv-theme-neutral, .fv-theme-neutral * {
  background: none !important;
  color: inherit !important;
}

.fv-theme-light, .fv-theme-light * {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #000 !important;
}

.fv-theme-dark, .fv-theme-dark * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

.fv-theme-yellow, .fv-theme-yellow * {
  background-color: #000 !important;
  color: #ff0 !important;
  border-color: #ff0 !important;
}

/* === Размер шрифта === */
.fv-font-small { font-size: 14px !important; }
.fv-font-medium { font-size: 18px !important; }
.fv-font-large { font-size: 22px !important; }

/* === Интервалы === */
.fv-spacing-normal *, .fv-spacing-normal p, .fv-spacing-normal li { line-height: 1.2em !important; }
.fv-spacing-wide *, .fv-spacing-wide p, .fv-spacing-wide li { line-height: 1.5em !important; }
.fv-spacing-extra *, .fv-spacing-extra p, .fv-spacing-extra li { line-height: 2em !important; }

/* === Изображения === */
.fv-img-mono img { filter: grayscale(100%) !important; opacity: 0.9 !important; }
.fv-img-hide img { display: none !important; }

/* === Глобальные улучшения === */
body.fv-enabled, html.fv-enabled {
  scroll-behavior: auto !important;
  transition: background 0.3s ease, color 0.3s ease;
}

/* === Мобильное поведение === */
@media (max-width: 768px) {

  /* На мобильных по умолчанию показываем только иконку 👓 */
  .fv-a11y-btn {
    top: 15px;
    width: 60px;
    height: 60px;
    border-radius:3px;
    font-size: 30px;
    justify-content: center;
    gap: 0;
    background: #F5A300;
    color: #fff;
    transition: all 0.3s ease;
  }

  /* Прячем текст внутри кнопки (кроме иконки) */
  .fv-a11y-btn span {
    display: none;
  }

  /* При фокусе или нажатии (tap/hold) — показываем подпись */
  .fv-a11y-btn:focus::after,
  .fv-a11y-btn:active::after {
    content: "Версия для слабовидящих";
    position: absolute;
    top: 0px;
    left: 260%;
  
    
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 14px;
    padding: 23px 10px;
    border-radius: 3px;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    animation: fvShowTip 0.3s ease forwards;
  }

  /* Мягкое появление подсказки */
  @keyframes fvShowTip {
    from { opacity: 0; transform: translate(-50%, 5px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
  }

  /* Для удобства нажатия */
  .fv-a11y-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,85,255,0.4);
  }
}