/* Talking with Mayla (OP-030, js/onix-mayla-speech.js, Components/Layout/MaylaSpeech.razor): the speaker (Voice settings) and the
   microphone in the question box, the line above it while Mayla listens or reads out loud, and the Voice settings drawer. The
   panel's own tokens carry both themes. */

/* ── the speaker and the microphone ─────────────────────────────────── */

.mayla-mic-btn { color: var(--muted); }
.mayla-mic-btn[hidden] { display: none; }
.mayla-mic-btn.is-listening { color: var(--danger); background: var(--danger-soft); animation: mayla-mic 1.4s ease-in-out infinite; }
@keyframes mayla-mic {
    0%, 100% { box-shadow: 0 0 0 0 var(--danger-soft); }
    50% { box-shadow: 0 0 0 6px var(--danger-soft); }
}
.mayla-speech-btn[hidden] { display: none; }
/* The box is narrower beside the speaker and the microphone: its hint stays on one line rather than half a second one. */
.mayla-input::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── the line above the box: listening, reading out loud, a word about what went wrong ── */

.mayla-speech-bar {
    display: flex; align-items: center; gap: 8px;
    margin: 6px 12px 0; padding: 6px 8px 6px 12px;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--panel); color: var(--ink); font-size: 12.5px;
}
.mayla-speech-bar[hidden] { display: none; }
.mayla-speech-bar--listening { border-color: var(--danger-soft); background: var(--danger-soft); }
.mayla-speech-bar--speaking { background: var(--brand-soft); }
.mayla-speech-bar--note { border-radius: var(--radius-md); color: var(--muted); }
.mayla-speech-text { flex: 1; min-width: 0; }
.mayla-speech-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: mayla-dots 1.1s infinite linear; }
.mayla-speech-stop { flex: none; }

/* ── the Voice settings drawer ────────────────────────────────────────── */

.mayla-speech-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 14px; padding: 14px 16px; }
.mayla-speech-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.mayla-speech-row input { flex: none; margin-top: 3px; }
.mayla-speech-row span { display: grid; gap: 2px; }
.mayla-speech-row strong { font-size: 14px; }
.mayla-speech-row small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.mayla-speech-field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.mayla-speech-field select {
    max-width: 220px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm, 8px);
    background: var(--panel); color: var(--ink); font: 14px/1.3 var(--font-text);
}
.mayla-speech-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mayla-speech-status { color: var(--muted); font-size: 12.5px; }
.mayla-speech .mayla-note { margin: 0; }
.mayla-speech .mayla-note[hidden], .mayla-speech-try[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
    .mayla-mic-btn.is-listening, .mayla-speech-dot { animation: none; }
}
