
/* BSMS Web Voice Chat beta */
.voice-modal-card {
    width: min(480px, 94vw);
    max-height: min(760px, 92vh);
    overflow-y: auto;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg);
    color: var(--fg);
    box-shadow: var(--shadow);
}
.voice-modal-header, .voice-title-row, .voice-action-row, .voice-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.voice-modal-header { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.voice-modal-header h2 { margin: 0; font-size: 1.45rem; }
.voice-modal-header p { margin: 4px 0 0; color: var(--fg2); font-size: .9rem; }
.voice-title-row { justify-content: flex-start; }
.voice-beta-pill {
    display: inline-flex; align-items: center; border: 1px solid rgba(187,0,30,.35);
    border-radius: 999px; padding: 3px 8px; color: var(--accent); background: rgba(187,0,30,.09);
    font-size: .68rem; font-weight: 800; letter-spacing: .08em;
}
.voice-panel { padding: 26px 4px 18px; text-align: center; }
.voice-panel[hidden] { display: none !important; }
.voice-empty-icon {
    width: 68px; height: 68px; margin: 0 auto 16px; display: grid; place-items: center;
    border-radius: 22px; background: rgba(187,0,30,.1); color: var(--accent);
}
.voice-empty-icon svg { width: 32px; height: 32px; }
.voice-panel h3 { margin: 0 0 8px; font-size: 1.3rem; }
.voice-panel > p { margin: 0 auto 18px; max-width: 350px; color: var(--fg2); line-height: 1.5; }
.voice-primary-btn { background: var(--accent); color: #fff; border-color: var(--accent); }
.voice-primary-btn:hover:not(:disabled) { background: var(--accent-hover); }
.voice-muted-note { margin-top: 14px !important; font-size: .82rem; }
.voice-incoming-indicator, .voice-live-indicator {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 16px; color: var(--fg2); font-size: .82rem; font-weight: 700;
}
.voice-incoming-indicator span, .voice-live-indicator span {
    width: 8px; height: 8px; border-radius: 50%; background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22,163,74,.12);
}
.voice-incoming-indicator span { background: var(--accent); box-shadow: 0 0 0 4px rgba(187,0,30,.12); }
.voice-action-row { justify-content: center; margin-top: 18px; }
.voice-action-row .btn { min-width: 112px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.voice-action-row .ic { width: 18px; height: 18px; }
.voice-participants { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 8px; }
.voice-participant {
    display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px;
    background: var(--section-bg); color: var(--fg); font-size: .88rem;
}
.voice-participant-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; flex-shrink: 0; }
.voice-participant.local .voice-participant-dot { background: var(--accent); }
.voice-call-controls { margin-top: 20px; }
.voice-end-all {
    margin-top: 14px; padding: 7px 10px; border: 0; background: transparent;
    color: #ef4444; cursor: pointer; font-size: .82rem; font-weight: 650;
}
.voice-error {
    margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(239,68,68,.35);
    border-radius: 10px; background: rgba(239,68,68,.08); color: #ef4444; font-size: .88rem;
}
.voice-error[hidden] { display: none !important; }
.voice-modal-footer {
    border-top: 1px solid var(--border); padding-top: 14px; color: var(--fg2); font-size: .78rem;
}
.voice-modal-footer a { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.voice-modal-footer a:hover { text-decoration: underline; }
#voiceAudioContainer { display: none; }
@media (max-width: 520px) {
    .voice-modal-card { padding: 18px; border-radius: 20px; }
    .voice-modal-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
    .voice-action-row { gap: 8px; }
    .voice-action-row .btn { min-width: 0; flex: 1; }
}

.voice-call-duration { margin: 2px 0 4px !important; color: var(--fg) !important; font-size: 1.45rem !important; font-variant-numeric: tabular-nums; font-weight: 750; letter-spacing: .04em; }


/* Compact, movable active-call card */
.voice-mini-card {
    position: fixed; z-index: 9500; top: 18px; right: 18px; width: min(360px, calc(100vw - 24px));
    padding: 9px 12px 11px; border: 1px solid var(--border); border-radius: 16px;
    color: var(--fg); background: color-mix(in srgb, var(--bg) 84%, transparent);
    box-shadow: 0 12px 36px rgba(0,0,0,.32); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    animation: voiceMiniIn .2s ease;
}
.voice-mini-card[hidden] { display:none !important; }
@keyframes voiceMiniIn { from { opacity:0; transform:translateY(-6px) scale(.98); } to { opacity:1; transform:none; } }
.voice-mini-drag-handle { height: 9px; display:flex; align-items:center; justify-content:center; cursor:grab; touch-action:none; }
.voice-mini-drag-handle:active { cursor:grabbing; }
.voice-mini-drag-handle span { width:34px; height:3px; border-radius:9px; background:var(--fg2); opacity:.65; }
.voice-mini-main { display:flex; align-items:center; gap:7px; }
.voice-mini-copy { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.voice-mini-copy strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:.9rem; }
.voice-mini-copy span { color:var(--fg2); font-size:.78rem; font-variant-numeric:tabular-nums; }
.voice-mini-icon { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border:1px solid var(--border); border-radius:11px; background:var(--section-bg); color:var(--fg); cursor:pointer; }
.voice-mini-icon:hover { border-color:var(--accent); color:var(--accent); }
.voice-mini-icon .ic { width:17px; height:17px; fill:currentColor; }
.voice-mini-icon.is-muted { color:#ef4444; border-color:rgba(239,68,68,.45); }
.voice-mini-leave { color:#ef4444; }
.voice-active-layout { padding-top:25px; }
.voice-active-heading h3 { margin:0 0 8px; font-size:1.25rem; }
.voice-active-name { color:var(--fg) !important; font-size:1.02rem; font-weight:650; margin-bottom:9px !important; }
.voice-call-status:empty { display:none; }
.voice-group-people { margin:18px auto 8px; max-width:380px; text-align:left; }
.voice-group-people h4 { margin:0 0 9px; color:var(--fg2); font-size:.82rem; font-weight:700; }
.voice-group-people .voice-participants { justify-content:flex-start; margin:0; }
.voice-beta-notice {
    position:fixed; z-index:10050; bottom:18px; left:50%; transform:translateX(-50%);
    width:min(560px, calc(100vw - 28px)); display:flex; align-items:center; gap:13px;
    padding:15px; border:1px solid rgba(187,0,30,.48); border-radius:17px;
    background:color-mix(in srgb, var(--bg) 90%, transparent); color:var(--fg);
    box-shadow:0 16px 46px rgba(0,0,0,.4); backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px);
}
.voice-beta-notice[hidden] { display:none !important; }
.voice-beta-notice-icon { width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center; border-radius:13px; background:rgba(187,0,30,.14); color:var(--accent); }
.voice-beta-notice-icon .ic { width:21px; height:21px; }
.voice-beta-notice-copy { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.voice-beta-notice-copy strong { font-size:.94rem; }
.voice-beta-notice-copy span { color:var(--fg2); font-size:.82rem; line-height:1.35; }
.voice-beta-notice-dismiss { border:0; border-radius:10px; padding:9px 12px; color:#fff; background:var(--accent); font-weight:700; cursor:pointer; white-space:nowrap; }
@media (max-width:520px) {
    .voice-mini-card { top:14px; bottom:auto; right:12px; width:min(360px,calc(100vw - 24px)); }
    .voice-beta-notice { bottom:10px; gap:9px; padding:12px; }
    .voice-beta-notice-copy span { font-size:.77rem; }
    .voice-beta-notice-dismiss { padding:8px 10px; }
}


/* Voice call interaction polish */
.voice-panel-enter { animation: voicePanelEnter .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes voicePanelEnter {
    from { opacity:0; transform:translateY(10px) scale(.985); filter:blur(3px); }
    to { opacity:1; transform:translateY(0) scale(1); filter:blur(0); }
}
#voiceChatModal.show .voice-modal-card {
    animation: voiceModalEnter .32s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes voiceModalEnter {
    from { opacity:0; transform:translateY(18px) scale(.965); filter:blur(5px); }
    to { opacity:1; transform:translateY(0) scale(1); filter:blur(0); }
}
#voiceChatModal.voice-modal-closing { display:flex !important; animation:voiceOverlayFade .18s ease both; }
#voiceChatModal.voice-modal-closing .voice-modal-card { animation:voiceModalExit .18s ease both; }
@keyframes voiceOverlayFade { to { opacity:0; } }
@keyframes voiceModalExit { to { opacity:0; transform:translateY(10px) scale(.98); filter:blur(3px); } }
.voice-mini-card.is-closing { animation:voiceMiniOut .16s ease both; pointer-events:none; }
@keyframes voiceMiniOut { to { opacity:0; transform:translateY(-7px) scale(.97); filter:blur(3px); } }
.voice-beta-notice { animation:voiceToastEnter .32s cubic-bezier(.2,.8,.2,1) both; }
.voice-beta-notice.is-closing { animation:voiceToastExit .18s ease both; }
@keyframes voiceToastEnter { from { opacity:0; transform:translate(-50%,12px) scale(.97); filter:blur(4px); } to { opacity:1; transform:translate(-50%,0) scale(1); filter:blur(0); } }
@keyframes voiceToastExit { to { opacity:0; transform:translate(-50%,8px) scale(.98); filter:blur(3px); } }
.voice-outgoing-panel { padding-top:30px; }
.voice-outgoing-orbit {
    width:68px; height:68px; margin:0 auto 18px; display:grid; place-items:center;
    border-radius:50%; background:rgba(187,0,30,.12); color:var(--accent);
    animation:voiceDialPulse 1.65s ease-in-out infinite;
}
.voice-outgoing-orbit .ic { width:29px; height:29px; }
@keyframes voiceDialPulse {
    0%,100% { box-shadow:0 0 0 0 rgba(187,0,30,.2); transform:scale(1); }
    50% { box-shadow:0 0 0 14px rgba(187,0,30,0); transform:scale(1.055); }
}
.voice-outgoing-status { font-size:.88rem; margin-top:-8px !important; }
.voice-outgoing-panel > .btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:145px; }
.voice-outgoing-panel > .btn .ic { width:17px; height:17px; }
@media (prefers-reduced-motion: reduce) {
    .voice-panel-enter, #voiceChatModal.show .voice-modal-card, .voice-mini-card,
    .voice-beta-notice, .voice-outgoing-orbit { animation:none !important; }
    #voiceChatModal.voice-modal-closing, #voiceChatModal.voice-modal-closing .voice-modal-card,
    .voice-mini-card.is-closing, .voice-beta-notice.is-closing { animation:none !important; }
}
