/* ============================================================
   CALL SCREEN STYLES
   ============================================================ */
.call-overlay {
    position: fixed;
    inset: 0;
    z-index: 650;
    background: linear-gradient(160deg, #1B1E2C, #0B0C10);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.call-remote-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.call-remote-video.screen-share-mode {
    object-fit: contain;
    background: #000;
}

.call-remote-video:not(.has-stream) {
    display: none;
}

.call-info {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    margin-top: calc(-10vh + env(safe-area-inset-top, 0px));
}

.call-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFB347, #89CFF0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.call-name {
    font-size: 1.3rem;
    font-weight: 600;
}

.call-status {
    font-size: .95rem;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

.call-local-video {
    position: absolute;
    top: calc(1rem + env(safe-area-inset-top, 0px));
    right: 1rem;
    width: 110px;
    height: 150px;
    border-radius: 14px;
    object-fit: cover;
    background: #111;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    z-index: 3;
    display: none;
    transform: scaleX(-1); /* зеркалим свою камеру, как в любом видеозвонке */
}

.call-controls, .call-incoming-actions {
    position: absolute;
    bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.call-ctrl-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-ctrl-btn.active {
    background: #fff;
    color: #1a1a1a;
}

.call-end-btn, .call-reject-btn {
    background: #E74C3C;
}

.call-accept-btn {
    background: #34C759;
}

.call-ctrl-btn:active {
    transform: scale(.92);
}

/* ---------- Трансляции (livestream) в группах/каналах ---------- */
.broadcast-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .55rem .9rem;
    background: linear-gradient(90deg, rgba(231,76,60,0.14), rgba(231,76,60,0.05));
    border-bottom: 1px solid rgba(231,76,60,0.25);
    font-size: .85rem;
    color: var(--text-primary, #222);
    flex-shrink: 0;
}

.broadcast-banner i {
    color: #E74C3C;
    margin-right: .3rem;
}

.broadcast-join-btn {
    border: none;
    background: #E74C3C;
    color: #fff;
    padding: .4rem .9rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.broadcast-join-btn:active {
    transform: scale(.95);
}

.broadcast-overlay {
    position: fixed;
    inset: 0;
    z-index: 660;
    background: #0B0C10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.broadcast-overlay-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.broadcast-overlay-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(.75rem + env(safe-area-inset-top, 0px)) 1rem .75rem;
    background: linear-gradient(rgba(0,0,0,.5), transparent);
    color: #fff;
    z-index: 2;
}

.broadcast-overlay-title {
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.broadcast-overlay-title::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E74C3C;
    display: inline-block;
    animation: broadcastPulse 1.4s ease infinite;
}

@keyframes broadcastPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.broadcast-overlay-sub {
    font-size: .75rem;
    color: rgba(255,255,255,.65);
}

.broadcast-overlay-stop {
    position: absolute;
    bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
