.cdo-chat-thread { position: relative; }

.cdo-chat-problem {
  position: absolute;
  z-index: 4;
  inset: 72px 12px auto;
  margin-inline: auto;
  width: min(calc(100% - 24px), 460px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 12px;
  border: 1px solid #efd9df;
  border-radius: 13px;
  color: #75152b;
  background: #fff7f9;
  box-shadow: 0 2px 9px #5f112b20;
  font-size: 14px;
  line-height: 1.35;
}

.cdo-chat-problem span { flex: 1; overflow-wrap: anywhere; }
.cdo-chat-problem button { color: inherit; flex: 0 0 36px; width: 36px; font-size: 23px; }

.cdo-chat-composition:has(.cdo-voice-panel:not([hidden])) {
  padding: 0;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -3px 14px #17225910;
}

.cdo-voice-panel {
  padding: 12px max(13px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left));
  background: #fff;
  border-radius: 24px 24px 0 0;
}

.cdo-voice-track, .cdo-voice-controls { display: flex; align-items: center; gap: 10px; }
.cdo-voice-track { min-height: 43px; padding-inline: 6px 0; margin-bottom: 9px; }
.cdo-voice-time { flex: 0 0 50px; font-variant-numeric: tabular-nums; font-size: 19px; }
.cdo-voice-wave {
  height: 38px;
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(2px, .65vw, 4px);
}
.cdo-voice-wave span { width: 3px; max-width: 3px; flex: 1; min-width: 0; height: 3px; border-radius: 3px; background: #74819c; }
.cdo-voice-controls { justify-content: space-between; }
.cdo-voice-controls button { border-radius: 999px; }
#voice-discard, #voice-send { flex: 0 0 48px; width: 48px; height: 48px; }
#voice-discard { background: #fcecf0; color: var(--cdo-red); }
#voice-toggle { flex: 1; height: 48px; width: auto; color: var(--cdo-navy); background: #eef2fa; }
#voice-send { color: #fff; background: var(--cdo-red); box-shadow: 0 2px 5px #5f112b32; }
#voice-send:hover:not(:disabled) { background: #a50d28; }
#voice-send:disabled { opacity: .55; }

@media (max-width: 690px) {
  .cdo-chat-problem { top: calc(67px + env(safe-area-inset-top)); }
}
