/* Audio recorder + inline audio attachments */

.audio-recorder {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.audio-rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--wt-border);
  background: var(--wt-bg);
  color: var(--wt-fg-3);
  cursor: pointer;
}
.audio-rec-btn:hover { color: var(--wt-fg); background: var(--wt-bg-2); }
.audio-rec-btn.is-stop {
  background: oklch(0.65 0.18 30 / 0.12);
  border-color: oklch(0.65 0.18 30 / 0.55);
  color: oklch(0.75 0.18 30);
}
.audio-rec-btn.is-cancel {
  padding: 4px 6px;
  color: var(--wt-fg-4);
}
.audio-rec-btn.is-send {
  background: var(--wt-primary);
  border-color: var(--wt-primary);
  color: white;
}

.audio-rec-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  background: oklch(0.65 0.18 30 / 0.10);
  border: 1px solid oklch(0.65 0.18 30 / 0.35);
}

.audio-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(0.65 0.20 25);
  animation: audio-pulse 1s ease-in-out infinite;
}
@keyframes audio-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.7); opacity: 0.4; }
}

.audio-rec-time {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: oklch(0.75 0.18 30);
}

.audio-rec-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--wt-border);
  background: var(--wt-bg-2);
}
.audio-rec-preview audio {
  height: 28px;
  max-width: 220px;
}
.audio-rec-meta {
  font-size: 10.5px;
  color: var(--wt-fg-4);
  font-variant-numeric: tabular-nums;
}

.audio-rec-err {
  margin: 4px 0 0;
  font-size: 11px;
  color: oklch(0.70 0.20 25);
}

/* Audio inline in message bubbles */
.msg-audio-player {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  background: var(--wt-bg-2);
  border-radius: 8px;
  border: 1px solid var(--wt-border);
  margin-top: 4px;
  max-width: 280px;
}
.msg-audio-player audio { width: 100%; height: 32px; }
.msg-audio-player .meta {
  font-size: 10.5px;
  color: var(--wt-fg-4);
}
