.voice-input { min-width: 0; }
.voice-input button {
  font: inherit;
  font-size: .81rem;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--surface);
  color: #3f6537;
  cursor: pointer;
}
.voice-input button:disabled { opacity: .52; cursor: default; }
.voice-input button:focus-visible { outline: 2px solid var(--green-main); outline-offset: 2px; }
.voice-panel {
  margin-top: 5px;
  padding: 10px;
  background: var(--green-tint);
  border-radius: 13px;
  color: var(--ink-2);
  font-size: .79rem;
}
.voice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.voice-input [hidden] { display: none; }
.voice-input .voice-hold {
  background: #47723e;
  border-color: transparent;
  color: white;
  font-weight: 700;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
}
.voice-input .voice-cancel { color: #985849; }
.voice-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px 0;
  font-variant-numeric: tabular-nums;
}
.voice-timer i {
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background: #5e8f4d;
  animation: qinghe-voice-breathe 1.6s ease-in-out infinite alternate;
}
.voice-canceling .voice-timer i { background: #a46050; }
.voice-message { margin-top: 5px; }
.voice-message:empty { display: none; }
.voice-preview { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.voice-preview label { width: 100%; }
.voice-preview textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  resize: vertical;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  min-height: 88px;
}
@keyframes qinghe-voice-breathe {
  from { box-shadow: 0 0 0 1px #79a96b50; }
  to { box-shadow: 0 0 0 5px #79a96b30; }
}
@media (prefers-reduced-motion: reduce) {
  .voice-timer i { animation: none; }
}

.composer-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.voice-toggle {
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--green-tint);
  color: #3f6537;
  cursor: pointer;
  font: inherit;
  font-size: .81rem;
  font-weight: 700;
  min-height: 34px;
  padding: 5px 10px;
}
.chat-bar input { min-width: 0; }
.voice-toggle-compact {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  align-self: stretch;
  min-height: 36px;
  padding: 0;
}
.voice-toggle[aria-expanded="true"], .voice-choices button[aria-pressed="true"] {
  background: #e4efdc;
  border-color: #8eae81;
}
.voice-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
}
.voice-toggle:focus-visible { outline: 2px solid var(--green-main); outline-offset: 2px; }
