/* Moment · голосовой модуль. Стили в духе рабочей поверхности Moment. */

.voice-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 480px;
  width: calc(100% - 32px);
  color: #e8eaf0;
  font-family: inherit;
}
.voice-dialog::backdrop { background: #11190d66; }
.voice-sheet {
  background: #0f1117;
  border: 1px solid #262b38;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 50px #20251a1f;
}
.voice-sheet h2 { font-size: 21px; font-weight: 620; letter-spacing: -.6px; margin: 0 0 12px; }
.voice-place {
  font-size: 12px;
  color: #e8eaf0;
  background: #241f3d;
  border: 1px solid #241f3d;
  border-radius: 12px;
  padding: 9px 12px;
  margin: 0 0 16px;
  line-height: 1.45;
}
.voice-text { font-size: 15px; line-height: 1.5; color: #9aa2b4; margin: 0 0 14px; }
.voice-hint { font-size: 12px; line-height: 1.5; color: #9aa2b4; margin: 0 0 16px; }
.voice-note { font-size: 13px; line-height: 1.5; color: #e8eaf0; margin: 0 0 14px; }
.voice-error { font-size: 14px; line-height: 1.5; color: #ef4444; margin: 0 0 16px; }
.voice-facts { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.voice-facts > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; border-bottom: 1px solid #171a23; padding-bottom: 8px; }
.voice-facts dt { color: #9aa2b4; margin: 0; }
.voice-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.voice-actions { display: flex; flex-direction: column; gap: 9px; }
.voice-actions.subtle { margin-top: 14px; }
.voice-actions button { min-height: 48px; border-radius: 16px; font-size: 15px; }
.voice-actions .primary { background: #e8eaf0; color: #0f1117; }
.voice-actions .secondary { background: #171a23; border: 1px solid #262b38; }
.voice-actions .danger { color: #f87171; background: none; min-height: 40px; }
.voice-progress,
.voice-level { height: 8px; border-radius: 8px; background: #262b38; overflow: hidden; margin: 0 0 12px; }
.voice-progress-fill,
.voice-level-fill { display: block; height: 100%; background: #6c5ce7; transition: width .15s linear; }
.voice-timer { font-size: 17px; font-variant-numeric: tabular-nums; margin: 0 0 12px; letter-spacing: -.3px; }

/* Кнопка микрофона в панели ввода Moment. */
.dictate { width: 32px; height: 39px; border: 0; background: none; font-size: 22px; }
.dictate[aria-pressed='true'] { color: #6c5ce7; }
.dictate:disabled { opacity: .35; }

/* Кнопка озвучивания ответа. */
.speak { font-size: 12px; color: #e8eaf0; background: none; padding: 4px 0; min-height: 28px; }
.speak[aria-pressed='true'] { color: #6c5ce7; }
.speak:disabled { color: #262b38; }

/* Voice sheet: clear actions, readable metadata, keyboard-safe scrolling. */
.voice-dialog{width:calc(100% - 24px);max-height:calc(min(100dvh,var(--moment-keyboard-height,100dvh)) - var(--moment-safe-top,env(safe-area-inset-top,0px)) - var(--moment-safe-bottom,env(safe-area-inset-bottom,0px)) - 32px);border-radius:24px;overflow:auto;touch-action:pan-y}
.voice-dialog::backdrop{background:#16200f70}
.voice-sheet{padding:24px 20px;display:flex;flex-direction:column}
.voice-sheet h2{font-size:25px;line-height:1.12;letter-spacing:-.7px;margin-bottom:16px}
.voice-place{order:10;margin:18px 0 0;background:#241f3d;border-color:#241f3d;color:#e8eaf0;font-size:11px;padding:11px 12px}
.voice-text{font-size:14px;color:#e8eaf0}
.voice-hint,.voice-note,.voice-facts dt{color:#9aa2b4}
.voice-facts{padding:12px;background:#241f3d;border-radius:14px;gap:10px}
.voice-facts>div{font-size:12px;border-color:#262b38}
.voice-facts>div:last-child{padding-bottom:0;border:0}
.voice-facts dd{max-width:60%}
.voice-actions button{min-height:48px;margin:0;border-radius:14px}
.voice-actions .primary{background:var(--green,#6c5ce7);color:#1b1730}
.voice-actions .secondary{background:#0f1117;border-color:#9aa2b4;color:#e8eaf0}
.voice-actions .danger{min-height:44px;color:#ef4444}
.voice-actions button:focus-visible{outline:3px solid #8b7cf6;outline-offset:3px}
.voice-progress,.voice-level{height:12px;background:#241f3d;margin-top:8px}
.voice-progress-fill,.voice-level-fill{background:#6c5ce7}
.voice-timer{font-size:23px;font-weight:550;line-height:1.4;margin-bottom:14px}
.voice-dialog[data-phase='recording'] h2::before{content:'';display:inline-block;width:10px;height:10px;background:#f87171;border-radius:50%;margin-right:10px;vertical-align:middle}
.voice-error{background:#f87171;padding:14px;border-radius:14px;color:#ef4444}
@media(max-height:700px){.voice-sheet{padding:20px 16px}.voice-sheet h2{font-size:23px;margin-bottom:12px}.voice-place{margin-top:14px}.voice-facts{margin-bottom:14px}}
@media(prefers-reduced-motion:reduce){.voice-progress-fill,.voice-level-fill{transition:none}}
