/* TTS module (Google Cloud TTS) — prefix: llac-otts- */

.llac-timeline-slides {
  position: relative;
}

.openai-tts,
.llac-otts {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-family: inherit;
  line-height: 1;
  pointer-events: auto;
}

/* Timeline: sit under the share button in the header actions column */
.llac-timeline-actions .openai-tts,
.llac-timeline-actions .llac-otts {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
}

.llac-otts-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.llac-otts-btn,
.llac-otts-btn-stop {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.59rem;
  height: 2.59rem;
  padding: 0;
  border: 1px solid #1b7f96;
  border-radius: 999px;
  background: #fff;
  color: #1b7f96;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(27, 127, 150, 0.15);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  position: relative;
}

.llac-otts-btn:hover,
.llac-otts-btn-stop:hover {
  background: rgba(27, 127, 150, 0.1);
  border-color: #1b7f96;
  color: #1b7f96;
}

.llac-otts-btn:active,
.llac-otts-btn-stop:active {
  transform: scale(0.96);
}

.llac-otts-btn:focus-visible,
.llac-otts-btn-stop:focus-visible {
  outline: 2px solid #1b7f96;
  outline-offset: 2px;
}

.llac-otts-icon {
  width: 1.32rem;
  height: 1.32rem;
  display: block;
}

.llac-otts-label {
  display: none !important;
}

.llac-otts.is-loading .llac-otts-btn {
  color: #1b7f96;
  border-color: rgba(27, 127, 150, 0.45);
  pointer-events: none;
}

.llac-otts.is-playing .llac-otts-btn {
  background: #1b7f96;
  border-color: #1b7f96;
  color: #fff;
}

.llac-otts.is-playing .llac-otts-label {
  color: #1b7f96;
  font-weight: 600;
}

.llac-otts.is-paused .llac-otts-btn {
  background: rgba(27, 127, 150, 0.12);
  border-color: #1b7f96;
  color: #1b7f96;
}

.llac-otts.is-error .llac-otts-btn {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fef2f2;
}

.llac-otts.is-error .llac-otts-label {
  color: #b91c1c;
}

.llac-otts-spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid rgba(27, 127, 150, 0.25);
  border-top-color: #1b7f96;
  border-radius: 50%;
  animation: llac-otts-spin 0.7s linear infinite;
}

.llac-otts.is-loading .llac-otts-icon-speaker {
  opacity: 0.15;
}

@keyframes llac-otts-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .llac-otts-spinner {
    animation: none;
    border-top-color: transparent;
  }

  .llac-otts-btn,
  .llac-otts-btn-stop {
    transition: none;
  }
}
