/* Scoped audio card: colors belong to this surface, independent of bubble themes. */
.chat-audio { box-sizing:border-box; display:grid; grid-template-columns:48px minmax(0,1fr) 44px; gap:9px; align-items:center; width:100%; min-width:0; padding:10px; border:1px solid #42617a; border-radius:14px; background:#122c40; color:#f4f8ff; color-scheme:dark; font:inherit; }
.chat-audio .chat-audio-engine { display:none; }
.chat-audio :is(button,input) { box-sizing:border-box; font:inherit; }
.chat-audio :is(.chat-audio-play,.chat-audio-rate,.chat-audio-retry) { display:inline-grid; place-items:center; min-height:44px; border:1px solid #6d9eb0; border-radius:999px; padding:6px; background:#24465e; color:#f4f8ff; cursor:pointer; touch-action:manipulation; }
.chat-audio .chat-audio-play { width:48px; height:48px; background:#7ee5cc; color:#092c31; border-color:#7ee5cc; }
.chat-audio .chat-audio-play svg { width:26px; height:26px; fill:currentColor; }
.chat-audio .chat-audio-rate { min-width:44px; font-size:13px; font-weight:700; font-variant-numeric:tabular-nums; }
.chat-audio .chat-audio-timeline { min-width:0; }
.chat-audio .chat-audio-track { position:relative; height:44px; border-radius:5px; }
.chat-audio .chat-audio-wave { position:absolute; inset:3px 0; overflow:hidden; border-radius:4px; color:#a8becb; }
.chat-audio .chat-audio-wave svg { display:block; width:100%; height:100%; }
.chat-audio .chat-audio-wave rect { fill:currentColor; }
.chat-audio .chat-audio-wave rect.is-played { fill:#7ee5cc; }
.chat-audio input.chat-audio-seek { position:absolute; inset:0; width:100%; height:44px; min-width:0; margin:0; padding:0; border:0; border-radius:4px; background:transparent; appearance:none; -webkit-appearance:none; cursor:pointer; color:#f4f8ff; }
.chat-audio .chat-audio-seek::-webkit-slider-runnable-track { height:3px; background:transparent; }
.chat-audio .chat-audio-seek::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:12px; height:12px; margin-top:-4.5px; border:2px solid #122c40; border-radius:50%; background:#f4f8ff; }
.chat-audio .chat-audio-seek::-moz-range-track { height:3px; background:transparent; }
.chat-audio .chat-audio-seek::-moz-range-thumb { width:9px; height:9px; border:2px solid #122c40; border-radius:50%; background:#f4f8ff; }
.chat-audio .chat-audio-seek:disabled { cursor:default; }
.chat-audio .chat-audio-details { display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 10px; min-height:17px; font-size:12px; line-height:1.4; color:#d5e4ef; }
.chat-audio .chat-audio-time { flex:none; font-variant-numeric:tabular-nums; white-space:nowrap; color:#f4f8ff; }
.chat-audio .chat-audio-status:empty { display:none; }
.chat-audio .chat-audio-status { overflow-wrap:anywhere; }
.chat-audio[data-audio-state="error"] .chat-audio-status { color:#ffd49c; }
.chat-audio .chat-audio-retry { grid-column:1 / -1; justify-self:start; padding:8px 14px; border-radius:9px; font-size:13px; }
.chat-audio .chat-audio-retry[hidden] { display:none; }
.chat-audio :is(button,input):focus-visible { outline:3px solid #ffdf82; outline-offset:3px; }
/* Counter fit-content from compact chat only for media; text bubbles stay compact. */
:is(#clientMessages,#adminMessages,.appearance-preview) .message:has(.chat-audio) { width:min(386px,94%); }
@media (max-width:360px) { .chat-audio { gap:6px; padding:8px; grid-template-columns:44px minmax(0,1fr) 44px; } .chat-audio .chat-audio-play { width:44px; height:44px; } }
@media (forced-colors:active) { .chat-audio { border:1px solid CanvasText; background:Canvas; color:CanvasText; } .chat-audio :is(.chat-audio-play,.chat-audio-rate,.chat-audio-retry) { border:1px solid ButtonText; background:ButtonFace; color:ButtonText; } .chat-audio :is(.chat-audio-time,.chat-audio-status,.chat-audio-wave) { color:CanvasText; } .chat-audio .chat-audio-wave rect.is-played { fill:Highlight; } }

/* Prévia de vídeo escolhido/capturado, sem alterar linhas de fotos e PDFs. */
.chat-compose-dialog .chat-compose-file.has-video-preview { display:grid; grid-template-columns:minmax(0,1fr); }
.chat-compose-dialog .chat-compose-file.has-video-preview > video { grid-column:1 / -1; grid-row:1; width:100%; max-height:min(22dvh,180px); object-fit:contain; }
.chat-compose-dialog .chat-compose-file.has-video-preview > span { grid-column:1 / -1; grid-row:2; }
.chat-compose-dialog .chat-compose-file.has-video-preview > button { grid-column:1 / -1; grid-row:3; justify-self:end; }
