/* Aurora: compact voice controls with real audio peaks and local transcription. */
html[data-color-theme] #chat-messages .chat-bubble.has-voice {
  display:block;box-sizing:border-box;width:360px;max-width:100%;min-width:0;padding:8px 11px;border:1px solid #52677b99;border-radius:18px;
  background:linear-gradient(115deg,#303b50,#253d4d);color:#f4f5ff;box-shadow:inset 0 1px #ffffff08;
}
html[data-color-theme=light] #chat-messages .chat-bubble.has-voice {background:linear-gradient(115deg,#e0e5f4,#d9eef0);color:#28334b;border-color:#aebfce;}
.voice-player {display:grid;grid-template-columns:44px minmax(0,1fr) 30px 25px;grid-template-rows:25px 18px;gap:0 7px;align-items:center;min-width:0;}
.voice-play {grid-column:1;grid-row:1/3;position:relative;display:grid;place-items:center;width:44px;height:44px;padding:0;min-height:0;border:0;border-radius:50%;background:transparent;color:white;cursor:pointer;}
.voice-play:before {content:"";position:absolute;inset:5px;border-radius:50%;background:linear-gradient(140deg,#b59bfa,#8079e9);box-shadow:inset 0 1px #ffffff30;}
.voice-play>svg:not(.voice-ring) {position:relative;width:18px;height:18px;fill:currentColor;stroke:currentColor;stroke-width:2;stroke-linecap:round;}
.voice-play .voice-ring {position:absolute;inset:0;width:44px;height:44px;fill:none;stroke-width:2.7;transform:rotate(-90deg);pointer-events:none;}
.voice-ring circle:first-child {stroke:#53647c;}.voice-ring circle:last-child {stroke:#4ee7ed;stroke-linecap:round;stroke-dasharray:125.664;stroke-dashoffset:var(--voice-ring,125.664);}
.voice-wave {grid-column:2;grid-row:1;position:relative;display:block;min-width:0;height:25px;}
.voice-wave svg {display:block;width:100%;height:100%;overflow:visible;}
.voice-wave rect {fill:#697b96;}.voice-wave rect.is-played {fill:#56e9e9;}
.voice-seek {position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;background:transparent;opacity:0;cursor:pointer;touch-action:pan-x;}
.voice-clock {grid-column:2;grid-row:2;display:block;margin:0;color:inherit;font-size:11px;line-height:18px;font-variant-numeric:tabular-nums;white-space:nowrap;}
.voice-speed,.voice-transcribe {display:grid;place-items:center;min-height:0;margin:0;padding:0;border:0;color:inherit;cursor:pointer;}
.voice-speed {grid-column:3;grid-row:1;width:30px;height:23px;border-radius:14px;background:#7588a32b;font-size:12px;font-weight:650;}
.voice-transcribe {grid-column:4;grid-row:1;width:25px;height:25px;border-radius:7px;background:transparent;color:#dfdcff;}
.voice-transcribe svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.voice-transcribe[aria-busy=true] svg {animation:voice-busy 1.4s linear infinite;}
.voice-transcribe:hover {background:#b4c9ee20;}
html[data-color-theme] #chat-messages .has-voice .voice-player>.chat-bubble-meta {grid-column:3/5;grid-row:2;display:flex;justify-content:flex-end;gap:3px;position:static;margin:0;padding:0;min-width:0;line-height:18px;font-size:10px;color:#c3cce7;white-space:nowrap;}
.has-voice .read-receipt svg {width:19px;height:15px;}.has-voice .read-receipt.is-read {color:#aba0ff;}
.has-voice .chat-bubble-text:not([hidden]) {margin:6px 0 0;}
.voice-transcript {margin:7px 0 0;padding:8px 1px 2px;border-top:1px solid #91a5bf40;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text;}
.voice-transcript[hidden] {display:none;}.voice-transcript.is-status {font-size:12px;color:inherit;opacity:.8;}
.voice-player button:focus-visible,.voice-wave:focus-within {outline:2px solid #8fe8f2;outline-offset:2px;border-radius:8px;}
.chat-bubble.is-selectable .voice-transcribe {visibility:hidden;}
.voice-play[aria-busy=true]:before {opacity:.6;}
@keyframes voice-busy {to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.voice-transcribe[aria-busy=true] svg{animation:none;}}
/* No empty column is reserved for a removed text-message ellipsis. */
.chat-bubble.message-without-menu {grid-template-columns:minmax(0,1fr);}
.chat-bubble.is-selectable {user-select:none;}
#chat-messages .chat-bubble .message-select-check {position:absolute;z-index:4;top:5px;right:5px;left:auto;grid-column:auto;grid-row:auto;width:17px;height:17px;margin:0;}
.chat-bubble.message-without-menu.is-selectable:not(.has-voice) {padding-right:28px;}
.message-forwarded {grid-column:1/-1;grid-row:1;display:block;margin-bottom:4px;color:var(--theme-accent,#c1adee);font-size:11px;line-height:1.35;}
.chat-bubble.is-forwarded:not(.has-voice):not(.has-media) .chat-bubble-text {grid-row:2;}
.chat-bubble.is-forwarded:not(.has-voice):not(.has-media)>.chat-bubble-meta {grid-row:3;}
.message-context-menu {position:fixed;z-index:1200;box-sizing:border-box;width:250px;max-width:calc(100vw - 16px);margin:0;padding:9px;border:1px solid var(--theme-border,#4f4564);border-radius:14px;background:var(--theme-panel,#242630);color:var(--theme-text,#f7f2ff);box-shadow:0 12px 35px #0007;}
.message-context-menu h2 {font-size:14px;margin:4px 5px;}.message-context-menu .social-message-preview {max-height:45px;margin:6px 5px;font-size:12px;overflow:hidden;}
.message-context-menu .message-action-list {gap:3px;}.message-context-menu .message-action-list button {min-height:38px;font-size:13px;}
.message-context-menu[hidden] {display:none;}
.forward-recipients {display:grid;gap:6px;max-height:40vh;overflow-y:auto;margin-top:10px;}
.forward-recipients button {min-height:42px;width:100%;padding:8px 12px;border:1px solid var(--theme-border,#514b60);border-radius:9px;background:var(--theme-surface,#303542);color:inherit;text-align:left;font:inherit;font-size:13px;overflow-wrap:anywhere;cursor:pointer;}
.forward-recipients button[aria-pressed=true] {outline:2px solid var(--theme-accent,#b5a2f8);outline-offset:-2px;}
#messages-forward-search {box-sizing:border-box;width:100%;margin-top:6px;min-height:42px;padding:8px 10px;border-radius:10px;border:1px solid var(--theme-border,#514b60);background:var(--theme-canvas,#171a20);color:inherit;font:inherit;}
.message-selection-bar {flex-wrap:wrap;}#message-selection-count{min-width:68px;}#message-selection-forward,#message-selection-delete{min-height:36px;padding:6px 9px;font-size:12px;}
@media(max-width:360px){.voice-player{grid-template-columns:42px minmax(0,1fr) 28px 23px;column-gap:5px;}html[data-color-theme] #chat-messages .chat-bubble.has-voice{padding:8px;}.voice-clock{font-size:10px;}}
