/* ============================================
   Віджет доступності для людей з вадами зору
   ============================================ */

/* Кнопка-тригер (глаз) в шапці */
#accessibility-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  color: #fff;
  font-size: 20px;
  transition: opacity 0.2s;
}
#accessibility-btn:hover {
  opacity: 0.75;
}
#accessibility-btn:focus {
  outline: 2px solid #fff;
  border-radius: 3px;
}

/* Панель */
#accessibility-panel {
  display: none;
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 99999;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 24px 28px 20px 28px;
  min-width: 280px;
  max-width: 320px;
  font-family: 'Open Sans', sans-serif;
  animation: acc-fadein 0.18s ease;
}
#accessibility-panel.open {
  display: block;
}
@keyframes acc-fadein {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Заголовок панелі */
#accessibility-panel h3 {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin: 0 0 18px 0;
  padding: 0;
  border: none;
}

/* Кнопка закрити */
#accessibility-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}
#accessibility-close:hover {
  color: #333;
}

/* Секції */
.acc-section {
  margin-bottom: 18px;
}
.acc-section label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Розмір тексту */
.acc-font-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.acc-font-controls button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px solid #ddd;
  background: #f7f7f7;
  font-size: 18px;
  font-weight: 700;
  color: #444;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1;
}
.acc-font-controls button:hover {
  border-color: #aaa;
  background: #eee;
}
.acc-font-size-label {
  font-size: 14px;
  color: #333;
  min-width: 28px;
  text-align: center;
  font-weight: 600;
}

/* Кольорова схема */
.acc-color-controls {
  display: flex;
  gap: 8px;
}
.acc-color-btn {
  flex: 1;
  padding: 8px 6px;
  border-radius: 8px;
  border: 2px solid #ddd;
  background: #f7f7f7;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.15s, background 0.15s;
  color: #444;
}
.acc-color-btn:hover,
.acc-color-btn.active {
  border-color: #2196f3;
  background: #e8f4fd;
  color: #1565c0;
}
.acc-color-btn.active {
  border-width: 2px;
}
.acc-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid #ccc;
}
.acc-dot-color { background: #f0c040; }
.acc-dot-bw    { background: #222; border-color: #222; }

/* Підкреслити посилання */
.acc-underline-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid #ddd;
  background: #f7f7f7;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.acc-underline-btn:hover,
.acc-underline-btn.active {
  border-color: #2196f3;
  background: #e8f4fd;
  color: #1565c0;
}

/* Скидання */
.acc-reset-btn {
  width: 100%;
  padding: 9px;
  border-radius: 8px;
  border: none;
  background: #f0f0f0;
  font-size: 13px;
  color: #777;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}
.acc-reset-btn:hover {
  background: #e0e0e0;
  color: #333;
}

/* ============================================
   Режим Ч/Б
   ============================================ */
body.acc-bw {
  filter: grayscale(100%) contrast(1.2);
}

/* ============================================
   Підкреслення посилань
   ============================================ */
body.acc-underline a {
  text-decoration: underline !important;
}
