/* Matnni ovozda o'qib berish: belgilash tugmasi va pastdagi holat paneli (tts.js) */

.tts-sel-btn {
  position: absolute;
  z-index: 10001;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #8a0202;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(66, 0, 0, .35);
  transition: transform .15s ease, background .15s ease;
}
.tts-sel-btn:hover { background: #b30303; transform: scale(1.08); }
.tts-sel-btn:focus-visible,
.tts-bar__stop:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.tts-sel-btn[hidden], .tts-bar[hidden], .tts-bar__stop[hidden] { display: none; }

.tts-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px;
  border-radius: 999px;
  background: #2a0606;
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.tts-bar__icon { display: inline-flex; color: #ff8a8a; }
.tts-bar__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tts-bar__stop {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tts-bar__stop:hover { background: #c62828; }
.tts-bar--error { border-radius: 14px; background: #5c1a00; }
.tts-bar--error .tts-bar__text { white-space: normal; }

@media (prefers-reduced-motion: reduce) {
  .tts-sel-btn { transition: none; }
}
