/* ═══ calls.css — UI звонков ═══ */

/* ── Кнопка звонка в хедере чата ── */
.call-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: color .2s, background .2s;
}
.call-btn:hover {
    color: var(--accent);
    background: var(--bg-hover);
}
.call-btn:active {
    transform: scale(.92);
}

/* ── Overlay звонка (верхняя часть чат-панели, чат остаётся внизу) ── */
.call-overlay {
    position: relative;
    width: 100%; flex-shrink: 0;
    height: 45vh;
    min-height: 260px;
    max-height: 55vh;
    z-index: 100;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: none;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.call-overlay.visible {
    display: flex;
}
/* Видеозвонок — занимает больше места */
.call-overlay.video-active {
    height: 70%;
}

/* Верхний блок: имя + статус */
.call-info {
    text-align: center;
    margin-bottom: 8px;
}
.call-peer-name {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.call-status-text {
    color: rgba(255,255,255,.6);
    font-size: .85rem;
}
.call-timer {
    color: rgba(255,255,255,.8);
    font-size: 1.1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
}

/* Аватар */
.call-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}
.call-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Пульсация при звонке (ringing) */
.call-avatar.ringing::before,
.call-avatar.ringing::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.25);
    animation: call-pulse 1.8s ease-out infinite;
}
.call-avatar.ringing::after {
    animation-delay: .6s;
}
@keyframes call-pulse {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Панель кнопок — затемнённая полоска внизу overlay */
.call-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: auto;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 16px;
    width: 100%;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0 0 16px 16px;
}
.call-ctrl-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform .15s, background .2s;
    color: #fff;
}
.call-ctrl-btn:active {
    transform: scale(.9);
}

.call-ctrl-btn.mute     { background: rgba(255,255,255,.25); }
.call-ctrl-btn.mute.on  { background: #e45e5e; }
.call-ctrl-btn.video    { background: rgba(255,255,255,.25); }
.call-ctrl-btn.video.on { background: #e45e5e; }
.call-ctrl-btn.speaker  { background: rgba(255,255,255,.25); }
.call-ctrl-btn.speaker.on { background: var(--accent); }
.call-ctrl-btn.screen   { background: rgba(255,255,255,.25); }
.call-ctrl-btn.screen.on { background: #166534; }
.call-ctrl-btn.settings { background: rgba(255,255,255,.25); }
.call-ctrl-btn.settings.on { background: rgba(255,255,255,.4); }
.call-ctrl-btn.add-person { background: rgba(74,222,128,.3); }

/* Flip camera button — поверх локального видео */
.call-local-wrap {
    position: absolute;
    bottom: 70px;
    right: 12px;
    width: 100px;
    height: 130px;
    z-index: 2;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.call-local-wrap .call-video-local {
    position: static;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    background: #222;
    border: 2px solid rgba(255,255,255,.2);
    pointer-events: none;
}
/* Resize handle — bottom-right corner */
.call-local-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 0 0 12px 0;
    background: rgba(0,0,0,.5);
    color: rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .6rem;
    cursor: nwse-resize;
    touch-action: none;
    z-index: 4;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background .15s;
}
.call-local-resize:hover {
    background: rgba(0,0,0,.7);
    color: #fff;
}
.call-flip-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: .85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background .15s, transform .3s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.call-flip-btn:hover {
    background: rgba(0,0,0,.65);
}
.call-flip-btn:active {
    transform: scale(.85);
}
.call-flip-btn.flipping {
    animation: flipSpin .4s ease;
}
@keyframes flipSpin {
    0% { transform: rotateY(0); }
    100% { transform: rotateY(180deg); }
}
/* Групповой звонок — flip в ячейке */
.gcall-cell .call-flip-btn {
    top: 6px;
    right: 6px;
}
@media (max-width: 768px) {
    .call-local-wrap {
        width: 90px;
        height: 120px;
        bottom: 120px;
        right: 12px;
    }
    .call-flip-btn {
        width: 28px;
        height: 28px;
        font-size: .75rem;
        top: 4px;
        right: 4px;
    }
    .call-local-resize {
        width: 26px;
        height: 26px;
        font-size: .55rem;
    }
}

/* Settings panel */
.call-settings-panel {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(22,33,62,.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    z-index: 101;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.call-settings-panel.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.call-settings-title {
    font-size: .75rem;
    font-weight: 700;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 12px;
}
.call-settings-row {
    margin-bottom: 10px;
}
.call-settings-row:last-child { margin-bottom: 0; }
.call-settings-label {
    display: block;
    font-size: .7rem;
    color: rgba(255,255,255,.5);
    margin-bottom: 4px;
}
.call-settings-select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: .8rem;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    transition: border-color .15s;
}
.call-settings-select:focus {
    border-color: rgba(94,181,247,.6);
}
.call-settings-select option {
    background: #1a1a2e;
    color: #fff;
}
@media (max-width: 768px) {
    .call-settings-panel {
        min-width: 260px;
        max-width: calc(100vw - 32px);
        bottom: 100px;
    }
}
.call-ctrl-btn.hangup   { background: #e45e5e; width: 52px; height: 52px; font-size: 1.3rem; }
.call-ctrl-btn.accept   { background: #16a34a; width: 52px; height: 52px; font-size: 1.3rem; }
.call-ctrl-btn.accept-audio { background: #3b82f6; width: 46px; height: 46px; font-size: 1rem; }

.call-ctrl-label {
    font-size: .6rem;
    color: rgba(255,255,255,.7);
    text-align: center;
    margin-top: 4px;
}

/* Входящий звонок: кнопки внизу с затемнением */
.call-incoming-btns {
    display: flex;
    gap: 40px;
    margin-top: auto;
    width: 100%;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0 0 16px 16px;
    padding: 14px 16px;
    align-items: center;
    justify-content: center;
}
.call-incoming-btns .call-ctrl-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Видео контейнеры */
.call-video-wrap {
    position: absolute;
    inset: 0;
    display: none;
}
.call-overlay.video-active .call-video-wrap {
    display: block;
}
.call-video-remote {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}
/* call-video-local теперь внутри .call-local-wrap, стили там */
.call-video-local {
    cursor: grab;
}
.call-overlay.video-active .call-info {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.call-overlay.video-active .call-avatar {
    display: none;
}
.call-overlay.video-active .call-controls {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    justify-content: center;
    z-index: 2;
}

/* ── Resize-разделитель между overlay и чатом ── */
.call-resize-handle {
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 10px;
    cursor: ns-resize;
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.call-resize-handle::before {
    content: '';
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,.25);
    transition: background .15s, width .15s;
}
.call-resize-handle:hover::before,
.call-resize-handle.dragging::before {
    background: rgba(255,255,255,.5);
    width: 60px;
}

/* Кнопка чата в контролах */
.call-ctrl-btn.chat-toggle {
    background: rgba(255,255,255,.25);
}
.call-ctrl-btn.chat-toggle.chat-hidden {
    background: rgba(228,94,94,.4);
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .call-avatar {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }
    .call-peer-name {
        font-size: 1.2rem;
    }
    .call-controls {
        gap: 10px;
        padding: 0 8px;
    }
    .call-ctrl-btn {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
    .call-ctrl-btn.hangup,
    .call-ctrl-btn.accept {
        width: 56px;
        height: 56px;
        font-size: 1.2rem;
    }
    .call-ctrl-label {
        font-size: .55rem;
    }
    /* Скрываем Экран и Звук на мобильных */
    .call-ctrl-desktop-only {
        display: none !important;
    }
    /* call-video-local стили теперь в .call-local-wrap media query */
}
@media (max-width: 380px) {
    .call-controls {
        gap: 8px;
        padding: 0 4px;
    }
    .call-ctrl-btn {
        width: 44px;
        height: 44px;
        font-size: .9rem;
    }
    .call-ctrl-btn.hangup,
    .call-ctrl-btn.accept {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    .call-ctrl-label {
        font-size: .5rem;
    }
}

/* Звуковая индикация (визуальная) */
.call-audio-indicator {
    display: flex;
    gap: 3px;
    align-items: center;
    justify-content: center;
    height: 24px;
    margin-top: 8px;
}
.call-audio-bar {
    width: 3px;
    background: #4ade80;
    border-radius: 2px;
    animation: call-audio-bounce 1s ease-in-out infinite;
}
.call-audio-bar:nth-child(1) { height: 8px;  animation-delay: 0s; }
.call-audio-bar:nth-child(2) { height: 14px; animation-delay: .15s; }
.call-audio-bar:nth-child(3) { height: 10px; animation-delay: .3s; }
.call-audio-bar:nth-child(4) { height: 16px; animation-delay: .45s; }
.call-audio-bar:nth-child(5) { height: 8px;  animation-delay: .6s; }

@keyframes call-audio-bounce {
    0%, 100% { transform: scaleY(1); }
    50%      { transform: scaleY(1.8); }
}

/* Плавный toast */
.call-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    background: rgba(0,0,0,.85);
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: .8rem;
    font-weight: 600;
    z-index: 9999;
    transition: transform .3s ease;
    pointer-events: none;
}
.call-toast.visible {
    transform: translateX(-50%) translateY(0);
}

/* ── Системное сообщение о звонке в чате ── */
.msg-call-system {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--bg-bubble, rgba(255,255,255,.06));
    max-width: 260px;
    cursor: default;
}
.msg-row.out .msg-call-system {
    margin-left: auto;
}
.msg-row.in .msg-call-system {
    margin-right: auto;
}
.msg-call-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(255,255,255,.08);
    flex-shrink: 0;
}
[data-theme='light'] .msg-call-icon {
    background: rgba(0,0,0,.06);
}
.msg-call-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.msg-call-label {
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
}
.msg-call-time {
    font-size: .65rem;
    color: var(--text-muted, rgba(255,255,255,.4));
}

/* ═══════════════════════════════════════
   GROUP CALLS UI
   ═══════════════════════════════════════ */

.gcall-overlay {
    position:relative; width:100%; flex-shrink:0;
    height:45vh; min-height:260px; max-height:55vh;
    z-index:100;
    background:linear-gradient(135deg,#1a1a2e 0%,#16213e 50%,#0f3460 100%);
    flex-direction:column;
    display:none;
    border-radius:0 0 16px 16px;
    box-shadow:0 4px 24px rgba(0,0,0,.5);
}
.gcall-overlay.visible { display:flex; }

.gcall-header {
    display:flex; align-items:center; justify-content:space-between;
    padding:10px 16px; flex-shrink:0;
    position:relative;
}
.gcall-title { color:#fff; font-size:.95rem; font-weight:700; }
.gcall-subtitle { color:rgba(255,255,255,.5); font-size:.7rem; margin-top:1px; }
.gcall-timer {
    color:rgba(255,255,255,.8); font-size:1.1rem; font-weight:700;
    font-variant-numeric:tabular-nums;
    position:absolute; left:50%; transform:translateX(-50%);
}

/* Grid layout */
.gcall-grid {
    flex:1; display:grid; gap:4px; padding:4px; overflow:hidden;
    align-content:center;
}
.gcall-grid-1 { grid-template-columns:1fr; }
.gcall-grid-2 { grid-template-columns:1fr 1fr; }
.gcall-grid-3 { grid-template-columns:1fr 1fr; }
.gcall-grid-4 { grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; }
.gcall-grid-5,.gcall-grid-6 { grid-template-columns:1fr 1fr 1fr; grid-template-rows:1fr 1fr; }
.gcall-grid-7,.gcall-grid-8,.gcall-grid-9 { grid-template-columns:1fr 1fr 1fr; grid-template-rows:1fr 1fr 1fr; }

.gcall-cell {
    position:relative; overflow:visible;
    background:transparent;
    display:flex; align-items:center; justify-content:center;
    flex-direction:column; gap:6px;
    min-height:80px;
    transition: all .3s;
}
/* Видео-ячейка — прямоугольная */
.gcall-cell video {
    width:100%; height:100%; object-fit:cover;
    position:absolute; inset:0;
    border-radius:16px;
}
.gcall-cell-ava {
    display:flex; align-items:center; justify-content:center;
    z-index:1; position:relative;
}
.gcall-ava {
    width:100px; height:100px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-weight:700; font-size:1.8rem;
    overflow:hidden;
    position:relative;
    z-index:1;
    transition: box-shadow .4s ease;
}
.gcall-ava img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
/* Нежная зелёная подсветка при разговоре */
.gcall-cell.speaking .gcall-ava {
    box-shadow: 0 0 20px 8px rgba(74,222,128,.25), 0 0 40px 16px rgba(74,222,128,.1);
}
.gcall-cell.speaking-strong .gcall-ava {
    box-shadow: 0 0 24px 10px rgba(74,222,128,.35), 0 0 50px 20px rgba(74,222,128,.15);
}
.gcall-cell-name {
    position:relative;
    color:rgba(255,255,255,.8); font-size:.72rem; font-weight:600;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    z-index:2; max-width:90%; text-align:center;
}
/* Когда видео активно — имя внизу */
.gcall-cell:has(video:not([style*='display:none'])) .gcall-cell-name {
    position:absolute; bottom:8px; left:10px; right:10px;
    color:#fff; text-shadow:0 1px 4px rgba(0,0,0,.7);
}
/* Фон не меняем — только свечение вокруг аватарки */

/* Мини-бар свёрнутого звонка */
.gcall-mini-bar {
    display:none; align-items:center; gap:4px;
    padding:10px 16px; cursor:pointer;
    background:linear-gradient(135deg,rgba(22,33,62,.95),rgba(30,40,70,.95));
    border-bottom:1px solid rgba(255,255,255,.08);
    color:#fff; transition:background .2s;
    position:relative; z-index:50;
}
.gcall-mini-bar:hover {
    background:linear-gradient(135deg,rgba(30,45,80,.98),rgba(40,55,90,.98));
}

.gcall-controls {
    display:flex; gap:12px; align-items:center; justify-content:center;
    padding:12px 12px; flex-shrink:0; flex-wrap:wrap;
    margin-top:auto;
    background:rgba(0,0,0,.45);
    backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
    border-radius:0 0 16px 16px;
}

/* Join banner */
.gcall-join-banner {
    display:flex; align-items:center; justify-content:space-between;
    padding:10px 16px; background:rgba(74,222,128,.12);
    border-bottom:1px solid rgba(74,222,128,.2);
    animation:gcallBannerIn .3s ease;
}
@keyframes gcallBannerIn { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
.gcall-join-info { font-size:.8rem; color:var(--text); font-weight:600; }
.gcall-join-btn {
    background:#16a34a; color:#fff; border:none;
    padding:6px 18px; border-radius:10px; font-size:.78rem; font-weight:700;
    cursor:pointer; transition:background .15s;
}
.gcall-join-btn:hover { background:#15803d; }

@media (max-width:768px) {
    .gcall-ava { width:72px; height:72px; font-size:1.4rem; }
    .gcall-cell { min-height:70px; }
    .gcall-header { padding:12px 14px; }
    .gcall-timer { font-size:.95rem; }
}

/* ═══ Presentation mode (screen share) ═══ */
.gcall-grid.presentation {
    grid-template-columns:1fr !important;
    grid-template-rows:1fr auto !important;
    gap:6px;
}
.gcall-screen-cell {
    width:100%; border-radius:12px; overflow:hidden;
    background:#000; position:relative; min-height:0;
}
.gcall-screen-cell video {
    width:100%; height:100%; object-fit:contain;
}
.gcall-screen-vol {
    position:absolute; bottom:8px; right:8px;
    display:flex; align-items:center; gap:6px;
    background:rgba(0,0,0,.6); border-radius:10px;
    padding:4px 10px; z-index:3; backdrop-filter:blur(6px);
}
.gcall-screen-vol button {
    background:none; border:none; color:#fff; font-size:.75rem;
    cursor:pointer; opacity:.8; padding:2px;
}
.gcall-screen-vol button:hover { opacity:1; }
.gcall-screen-vol input[type=range] {
    width:70px; height:3px; -webkit-appearance:none; appearance:none;
    background:rgba(255,255,255,.2); border-radius:2px; outline:none;
}
.gcall-screen-vol input[type=range]::-webkit-slider-thumb {
    -webkit-appearance:none; width:12px; height:12px;
    border-radius:50%; background:#fff; cursor:pointer;
}
.gcall-screen-vol input[type=range]::-moz-range-thumb {
    width:12px; height:12px; border-radius:50%;
    background:#fff; border:none; cursor:pointer;
}
.gcall-participants-strip {
    display:flex; gap:8px; justify-content:center; align-items:center;
    padding:6px 8px; flex-shrink:0;
}
.gcall-strip-cell {
    display:flex; flex-direction:column; align-items:center; gap:2px;
}
.gcall-strip-cell .gcall-ava {
    width:44px; height:44px; font-size:.85rem;
}
.gcall-strip-cell .gcall-cell-name {
    font-size:.6rem; max-width:60px;
}
/* Speaking glow в strip */
.gcall-strip-cell.speaking .gcall-ava {
    box-shadow: 0 0 14px 5px rgba(74,222,128,.25), 0 0 28px 10px rgba(74,222,128,.1);
}

/* ═══════════════════════════════════════
   ADD PERSON TO CALL — modal
   ═══════════════════════════════════════ */
.call-add-modal {
    position:absolute; bottom:0; left:0; right:0;
    max-height:70vh; z-index:10002;
    background:rgba(22,33,62,.97);
    backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
    border-top:1px solid rgba(255,255,255,.1);
    border-radius:20px 20px 0 0;
    display:flex; flex-direction:column;
    transform:translateY(100%);
    transition:transform .3s ease;
    overflow:hidden;
}
.call-add-modal.visible {
    transform:translateY(0);
}
.call-add-header {
    display:flex; align-items:center; justify-content:space-between;
    padding:16px 20px 8px; flex-shrink:0;
}
.call-add-header span {
    font-size:.95rem; font-weight:700; color:#fff;
}
.call-add-header button {
    background:rgba(255,255,255,.1); border:none; color:#fff;
    width:32px; height:32px; border-radius:50%; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    font-size:.85rem; transition:background .15s;
}
.call-add-header button:hover { background:rgba(255,255,255,.2); }

.call-add-search {
    padding:0 16px 10px; position:relative;
}
.call-add-search i {
    position:absolute; left:28px; top:50%; transform:translateY(-50%);
    color:rgba(255,255,255,.3); font-size:.75rem; pointer-events:none;
    margin-top:-5px;
}
.call-add-search input {
    width:100%; padding:10px 12px 10px 36px;
    border-radius:12px; border:1px solid rgba(255,255,255,.12);
    background:rgba(255,255,255,.06); color:#fff;
    font-size:.85rem; outline:none;
    transition:border-color .15s;
}
.call-add-search input:focus { border-color:rgba(94,181,247,.5); }
.call-add-search input::placeholder { color:rgba(255,255,255,.3); }

.call-add-selected {
    padding:0 16px; display:flex; flex-wrap:wrap; gap:4px;
    min-height:0;
}
.call-add-tag {
    display:inline-flex; align-items:center; gap:4px;
    background:rgba(94,181,247,.2); color:var(--accent,#5eb5f7);
    padding:4px 10px; border-radius:8px; font-size:.72rem; font-weight:600;
}
.call-add-tag button {
    background:none; border:none; color:rgba(94,181,247,.6);
    cursor:pointer; font-size:.85rem; padding:0 0 0 2px; line-height:1;
}

.call-add-list {
    flex:1; overflow-y:auto; padding:6px 8px; min-height:100px;
}
.call-add-item {
    display:flex; align-items:center; gap:12px;
    padding:10px 12px; border-radius:12px; cursor:pointer;
    transition:background .12s;
}
.call-add-item:hover { background:rgba(255,255,255,.06); }
.call-add-item.selected { background:rgba(94,181,247,.1); }
.call-add-ava {
    width:40px; height:40px; border-radius:50%; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-weight:700; font-size:.75rem; overflow:hidden;
}
.call-add-ava img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.call-add-info { flex:1; min-width:0; }
.call-add-name { font-size:.85rem; font-weight:600; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.call-add-sub { font-size:.68rem; color:rgba(255,255,255,.4); }
.call-add-check {
    width:24px; height:24px; border-radius:50%; flex-shrink:0;
    border:2px solid rgba(255,255,255,.15);
    display:flex; align-items:center; justify-content:center;
    font-size:.65rem; color:transparent; transition:all .15s;
}
.call-add-item.selected .call-add-check {
    background:var(--accent,#5eb5f7); border-color:var(--accent,#5eb5f7); color:#fff;
}

.call-add-go {
    margin:10px 16px 16px; padding:12px;
    border-radius:14px; border:none;
    background:#16a34a; color:#fff;
    font-size:.88rem; font-weight:700;
    cursor:pointer; transition:background .15s, opacity .15s;
}
.call-add-go:disabled { opacity:.4; cursor:default; }
.call-add-go:not(:disabled):hover { background:#15803d; }

/* ══ Баннер "Идёт звонок — Присоединиться" ══ */
.gcall-join-banner {
    display:flex; align-items:center; justify-content:space-between;
    padding:10px 16px;
    background:linear-gradient(90deg, rgba(74,222,128,.12), rgba(74,222,128,.05));
    border-bottom:1px solid rgba(74,222,128,.25);
    animation:fadeIn .2s ease;
}
.gcall-join-info {
    display:flex; align-items:center;
    font-size:.82rem; font-weight:600; color:var(--text);
}
.gcall-join-info i {
    font-size:1rem; animation:gcallPulse 2s infinite;
}
@keyframes gcallPulse {
    0%,100% { opacity:1; } 50% { opacity:.4; }
}
.gcall-join-btn {
    padding:7px 18px; border-radius:20px; border:none;
    background:#16a34a; color:#fff;
    font-size:.78rem; font-weight:700;
    cursor:pointer; font-family:inherit;
    transition:background .15s, transform .1s;
}
.gcall-join-btn:hover { background:#15803d; }
.gcall-join-btn:active { transform:scale(.95); }

/* ══ Минимизация звонка ══ */
.call-overlay.minimized, .gcall-overlay.minimized {
  opacity:0 !important; pointer-events:none !important;
}
/* Кнопка свернуть */
.call-minimize-btn, .gcall-minimize-btn {
  position:absolute; top:10px; right:10px; z-index:10;
  width:32px; height:32px; border-radius:50%; border:none;
  background:rgba(255,255,255,.15); color:#fff;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  font-size:.75rem; transition:background .15s;
}
.call-minimize-btn:hover, .gcall-minimize-btn:hover {
  background:rgba(255,255,255,.2);
}
/* Мини-бар (общий для 1-на-1 и групповых) */
.gcall-mini-bar {
  display:none; position:fixed; top:0; left:0; right:0; z-index:9999;
  background:linear-gradient(90deg,#16a34a,#15803d);
  padding:10px 16px; align-items:center; justify-content:space-between;
  cursor:pointer; animation:gcallMiniIn .2s ease;
  box-shadow:0 2px 12px rgba(0,0,0,.3);
}
.gcall-overlay.minimized .gcall-mini-bar,
.call-mini-bar-visible {
  display:flex !important;
}
@keyframes gcallMiniIn { from{transform:translateY(-100%)} to{transform:translateY(0)} }
.gcall-mini-info {
  display:flex; align-items:center; gap:8px;
  color:#fff; font-size:.85rem; font-weight:600;
}
.gcall-mini-pulse {
  animation:gcallPulse 2s infinite; font-size:.9rem;
}
.gcall-mini-timer {
  font-variant-numeric:tabular-nums; opacity:.8;
}
.gcall-mini-actions {
  display:flex; gap:8px;
}
.gcall-mini-actions button {
  width:34px; height:34px; border-radius:50%; border:none;
  background:rgba(255,255,255,.15); color:#fff;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  font-size:.8rem; transition:background .15s;
}
.gcall-mini-actions button:hover { background:rgba(255,255,255,.25); }
.gcall-mini-hangup {
  background:#e45e5e !important;
}
.gcall-mini-hangup:hover {
  background:#dc2626 !important;
}

/* ══ Статус подключения звонка ══ */
.gcall-conn-status {
  text-align:center; font-size:.78rem; font-weight:600;
  padding:6px 16px; min-height:0;
  transition:all .3s;
}
.gcall-conn-status:empty { padding:0; }
.gcall-conn-waiting {
  color:#f59e0b; background:rgba(245,158,11,.08);
  animation:gcallPulse 2s infinite;
}
.gcall-conn-connecting {
  color:#60a5fa; background:rgba(96,165,250,.08);
  animation:gcallPulse 1.5s infinite;
}
.gcall-conn-error {
  color:#e45e5e; background:rgba(228,94,94,.1);
}
.gcall-conn-ok { display:none; }

/* ══ Меню громкости участника (ПКМ) ══ */
.gcall-vol-menu {
  position:fixed; z-index:10000;
  background:#1e1e2e; border:1px solid rgba(255,255,255,.12);
  border-radius:14px; padding:12px 14px;
  box-shadow:0 8px 32px rgba(0,0,0,.6);
  min-width:220px; animation:ctxIn .12s ease;
}
.gcall-vol-name {
  font-size:.85rem; font-weight:700; color:#fff;
  margin-bottom:8px; text-align:center;
}
.gcall-vol-row {
  display:flex; align-items:center; gap:8px;
}
.gcall-vol-slider {
  flex:1; -webkit-appearance:none; appearance:none;
  height:4px; background:rgba(255,255,255,.15); border-radius:2px;
  outline:none; cursor:pointer;
}
.gcall-vol-slider::-webkit-slider-thumb {
  -webkit-appearance:none; width:16px; height:16px;
  border-radius:50%; background:var(--accent,#5eb5f7);
  cursor:pointer; border:none;
}
.gcall-vol-slider::-moz-range-thumb {
  width:16px; height:16px; border-radius:50%;
  background:var(--accent,#5eb5f7); cursor:pointer; border:none;
}
.gcall-vol-pct {
  font-size:.75rem; font-weight:700; color:#fff;
  min-width:36px; text-align:right;
}

/* ══ Эквалайзер звонков ══ */
.call-eq-panel {
  position:absolute; bottom:120px; left:50%; transform:translateX(-50%) translateY(10px);
  background:rgba(22,33,62,.97); backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.1); border-radius:18px;
  padding:16px 20px; min-width:340px; max-width:460px;
  z-index:102; opacity:0; pointer-events:none;
  transition:opacity .2s, transform .2s;
}
.call-eq-panel.visible {
  opacity:1; pointer-events:auto; transform:translateX(-50%) translateY(0);
}
.call-eq-title {
  font-size:.72rem; font-weight:700; color:rgba(255,255,255,.5);
  text-transform:uppercase; letter-spacing:.05em; margin-bottom:10px;
}
.call-eq-presets {
  display:flex; gap:5px; flex-wrap:wrap; margin-bottom:14px;
}
.call-eq-preset {
  padding:5px 12px; border-radius:10px; border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05); color:rgba(255,255,255,.7);
  font-size:.7rem; font-weight:600; cursor:pointer; transition:all .15s;
  font-family:inherit;
}
.call-eq-preset:hover { background:rgba(94,181,247,.15); border-color:var(--accent); color:#fff; }
.call-eq-preset.active { background:var(--accent,#5eb5f7); border-color:var(--accent); color:#fff; }
.call-eq-bands {
  display:flex; gap:4px; align-items:flex-end; justify-content:center; height:120px;
  margin-bottom:8px;
}
.call-eq-band {
  display:flex; flex-direction:column; align-items:center; gap:2px; flex:1;
}
.call-eq-band input[type=range] {
  writing-mode:vertical-lr; direction:rtl;
  -webkit-appearance:none; appearance:none;
  width:28px; height:90px;
  background:transparent; cursor:pointer;
}
.call-eq-band input[type=range]::-webkit-slider-runnable-track {
  width:4px; background:rgba(255,255,255,.12); border-radius:2px;
}
.call-eq-band input[type=range]::-webkit-slider-thumb {
  -webkit-appearance:none; width:14px; height:14px;
  border-radius:50%; background:var(--accent,#5eb5f7);
  margin-left:-5px; cursor:pointer;
}
.call-eq-band input[type=range]::-moz-range-track {
  width:4px; background:rgba(255,255,255,.12); border-radius:2px;
}
.call-eq-band input[type=range]::-moz-range-thumb {
  width:14px; height:14px; border-radius:50%;
  background:var(--accent,#5eb5f7); border:none; cursor:pointer;
}
.call-eq-label {
  font-size:.55rem; color:rgba(255,255,255,.4); white-space:nowrap;
}
.call-eq-val {
  font-size:.55rem; color:rgba(255,255,255,.6); font-weight:600;
  min-height:14px;
}
@media (max-width:768px) {
  .call-eq-panel { min-width:280px; max-width:calc(100vw - 32px); bottom:100px; }
  .call-eq-bands { height:100px; }
  .call-eq-band input[type=range] { height:70px; }
}
.gcall-vol-preset {
  flex:1; padding:5px 0; border-radius:8px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.05); color:rgba(255,255,255,.7);
  font-size:.68rem; font-weight:600; cursor:pointer;
  font-family:inherit; transition:all .12s;
}
.gcall-vol-preset:hover {
  background:rgba(94,181,247,.15); border-color:var(--accent,#5eb5f7);
  color:#fff;
}
