/* The audio card follows the compact player chosen in the design preview. */
html[data-color-theme] #chat-messages .chat-bubble.has-audio {
  display:block;width:370px;max-width:100%;padding:16px;border:1px solid var(--theme-border,#495064);
  border-radius:22px;background:linear-gradient(135deg,#3c4055,#283343);color:#f4f3fc;box-shadow:0 4px 16px #0000000d;
}
html[data-color-theme=light] #chat-messages .chat-bubble.has-audio { background:linear-gradient(135deg,#e9e6f8,#dfe8f5);color:#24304a; }
.chat-audio-card { display:grid;grid-template-columns:46px minmax(0,1fr) 32px;column-gap:12px;row-gap:10px;width:100%;max-width:100%;padding:0; }
.audio-track-copy { grid-column:2 / -1;min-width:0;padding-right:26px;display:grid;gap:4px; }
.audio-track-copy strong { font-size:16px;line-height:1.25;font-weight:650;white-space:nowrap;text-overflow:ellipsis;overflow:hidden; }
.audio-track-copy>span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;opacity:.72; }
.audio-play,.audio-download { display:grid;place-items:center;align-self:center;flex:none;padding:0;border:0;border-radius:50%;cursor:pointer;text-decoration:none; }
.audio-play { grid-column:1;grid-row:1 / 3;width:46px;height:46px;min-height:46px;background:linear-gradient(140deg,#e7ddfc,#cdb5f3);color:#292c3e; }
.audio-play svg { width:25px;height:25px;stroke:currentColor;stroke-width:3;stroke-linecap:round;fill:none; }
.audio-play .audio-play-shape { fill:currentColor;stroke:none; }
.audio-play[aria-busy=true] { opacity:.65; }
.audio-timeline { grid-column:2;grid-row:2;display:flex;align-items:center;gap:9px;min-width:0; }
.audio-clock { font-size:11px;line-height:16px;white-space:nowrap;font-variant-numeric:tabular-nums;opacity:.75; }
#chat-messages .audio-seek { --audio-progress:0%;display:block;flex:1;min-width:25px;width:100%;height:24px;min-height:24px;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;appearance:none;-webkit-appearance:none;background:transparent;cursor:pointer;touch-action:pan-x; }
.audio-seek::-webkit-slider-runnable-track { height:4px;border-radius:8px;background:linear-gradient(to right,#c4a4ef var(--audio-progress),#a8acc03d var(--audio-progress)); }
.audio-seek::-moz-range-track { height:4px;border-radius:8px;background:#a8acc03d; }
.audio-seek::-moz-range-progress { height:4px;border-radius:8px;background:#c4a4ef; }
.audio-seek::-webkit-slider-thumb { width:11px;height:11px;margin-top:-3.5px;border:0;border-radius:50%;background:#f9f6ff;appearance:none;-webkit-appearance:none;box-shadow:0 1px 3px #0002; }
.audio-seek::-moz-range-thumb { width:11px;height:11px;border:0;border-radius:50%;background:#f9f6ff; }
.audio-seek:disabled { cursor:default;opacity:.5; }
.audio-download { grid-column:3;grid-row:2;width:32px;height:32px;background:#c5c9e01a;color:inherit; }
.audio-download svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
.audio-download:hover { background:#c5c9e031; }
.audio-footer { grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:4px;min-width:0; }
.audio-format { font-size:12px;opacity:.7;white-space:nowrap; }
html[data-color-theme] #chat-messages .has-audio .chat-bubble-meta { display:flex;align-items:center;gap:5px;margin:0;font-size:11px;color:inherit;opacity:.8; }
html[data-color-theme] #chat-messages .has-audio .message-more, .has-audio .message-select-check { position:absolute;right:9px;top:8px;margin:0; }
html[data-color-theme] #chat-messages .has-audio .message-more { color:inherit;background:transparent;width:28px;height:28px; }
.has-audio .chat-bubble-text:not([hidden]) { margin:10px 0 0; }
.audio-error { grid-column:1 / -1;margin:0;font-size:12px;line-height:1.4; }
.audio-play:focus-visible,.audio-download:focus-visible,.audio-seek:focus-visible { outline:2px solid #bc9ae8;outline-offset:4px; }
.chat-media-open.is-video-preview { aspect-ratio:16 / 9;background:#212331; }
.chat-media-open.is-video-preview>img { width:100%;height:100%;object-fit:cover; }
.chat-media-open.is-video-preview>img[hidden] { display:none; }
.video-preview-placeholder { position:absolute;inset:0;display:grid;place-items:center;padding-top:80px;background:linear-gradient(135deg,#353449,#202b39);font-size:12px;line-height:18px;color:#d5cbe6; }
.video-preview-placeholder[hidden] { display:none; }
@media(max-width:360px) {
  html[data-color-theme] #chat-messages .chat-bubble.has-audio { padding:13px; }
  .chat-audio-card { grid-template-columns:42px minmax(0,1fr) 30px;column-gap:9px; }
  .audio-play { width:42px;height:42px;min-height:42px; }
  .audio-track-copy strong { font-size:14px; }
  .audio-timeline { gap:6px; }
  .audio-clock { font-size:10px; }
}
