/* Voice tests share the app's controls; the microphone state stays visible and explicit. */
.voice-test-dialog { width: min(640px, calc(100vw - 32px)); max-height: min(92dvh, 900px); padding: 0; color: #393630; background: #fff; }
.voice-test-dialog[open] { display: flex; flex-direction: column; }
.voice-test-dialog::backdrop { background: rgba(28, 29, 25, .5); backdrop-filter: blur(4px); }
.voice-test-dialog .modal-header, .voice-test-dialog .modal-footer { flex: 0 0 auto; }
.voice-test-dialog .modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.voice-test-dialog .modal-copy { font-size: 12px; line-height: 1.55; }
.voice-test-dialog .field-group label { font-size: 12px; }
.voice-test-dialog .field-group select { font-size: 13px; }
.voice-test-status { margin: 17px 0 12px; padding: 12px 14px; border-left: 3px solid #58765c; border-radius: 0 8px 8px 0; background: #f3f5f0; color: #3f5543; font-size: 13px; line-height: 1.5; }
.voice-test-status[role="alert"] { border-color: #a65043; background: #fbf0ed; color: #874336; }
.voice-test-recording { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; color: #8b4034; font-size: 12px; }
.voice-test-recording::before { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #ad5145; content: ""; }
.voice-test-recording strong { flex: 1; }
.voice-test-recording output { font-variant-numeric: tabular-nums; color: #6b645d; }
.voice-test-recording[hidden], .voice-test-actions [hidden] { display: none; }
.voice-test-transcript { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
.voice-test-transcript:empty { display: none; }
.voice-test-message { margin: 0; padding: 12px 0; }
.voice-test-message + .voice-test-message { border-top: 1px solid #ece9e4; }
.voice-test-message strong { display: block; margin-bottom: 4px; color: #716452; font-size: 11px; font-weight: 650; }
.voice-test-message span { display: block; color: #393630; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.voice-test-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.voice-test-actions .button { min-height: 42px; }
.voice-test-dialog audio { display: block; width: 100%; max-width: 100%; margin: 12px 0; }
.voice-test-dialog .advanced-inline { margin-top: 18px; }
.voice-test-dialog .advanced-inline summary { min-height: 28px; font-size: 12px; }
.voice-test-dialog [data-voice-metrics] { color: #777169; font-size: 12px; line-height: 1.5; }
.voice-test-dialog [data-voice-metrics] dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 16px; margin: 12px 0 0; }
.voice-test-dialog [data-voice-metrics] dt, .voice-test-dialog [data-voice-metrics] dd { margin: 0; }
.voice-test-dialog [data-voice-metrics] dd { color: #45483f; font-variant-numeric: tabular-nums; }
.voice-test-dialog [data-voice-pilot-form] { padding: 10px 0; }
.voice-test-dialog [data-voice-pilot-form] .setting-row { gap: 16px; padding-inline: 0; }
.voice-test-dialog [data-voice-pilot-form] .field-group { margin-bottom: 12px; }
.voice-test-dialog [data-voice-pilot-form] .setting-row strong { font-size: 12px; }
.voice-test-dialog [data-voice-pilot-form] .setting-row small { font-size: 11px; line-height: 1.45; }
[data-voice-choices] .voice-copy small { overflow-wrap: anywhere; }
[data-voice-choices] [data-voice-preview-status] { margin: 9px 0 0; color: #706a62; font-size: 11px; line-height: 1.5; }
[data-voice-choices] .voice-preview-button { min-height: 36px; }
[data-voice-choices] .voice-preview-button:disabled { color: #827c73; border-color: #e8e4df; background: #f6f4f0; cursor: default; }
[data-voice-choices] .voice-preview-button[aria-busy="true"]::before { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 2px solid #c8d2c6; border-top-color: #58765c; border-radius: 50%; vertical-align: -1px; animation: voice-loading .8s linear infinite; content: ""; }
@keyframes voice-loading { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .voice-test-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); margin: auto; border-radius: 14px; }
  .voice-test-dialog .modal-header { padding: 18px 16px 14px; }
  .voice-test-dialog .modal-body { padding: 14px 16px; }
  .voice-test-dialog .modal-footer { padding: 12px 16px; }
  .voice-test-actions .button { flex: 1 1 140px; }
  .voice-test-dialog .modal-footer .button { width: 100%; }
  [data-voice-choices] .voice-choice { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { [data-voice-choices] .voice-preview-button[aria-busy="true"]::before { animation: none; } }
