/* ═══════════════════════════════════════════════════════════════
   Pulse Chat — Voice calling UI. Loaded alongside pulse.css.
   Uses the pulse.css theme tokens, so it themes automatically.
   See docs/voice-calling-plan.md.
   ═══════════════════════════════════════════════════════════════ */

/* ── Incoming-call modal ─────────────────────────────────────── */
.pulse-incoming-overlay {
    position: fixed;
    inset: 0;
    background: var(--pulse-overlay);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    font-family: var(--pulse-font);
}

.pulse-incoming-card {
    width: 320px;
    max-width: calc(100vw - 32px);
    padding: 28px 24px 24px;
    text-align: center;
    background: var(--pulse-bg);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius-lg);
    box-shadow: var(--pulse-shadow-lg);
}

.pulse-incoming-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 14px;
    border-radius: var(--pulse-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    font-size: 30px;
    font-weight: 600;
}

.pulse-incoming-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pulse-incoming-name {
    font-size: 19px;
    font-weight: 600;
    color: var(--pulse-text);
}

.pulse-incoming-sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--pulse-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pulse-incoming-recording {
    margin-top: 14px;
    font-size: 12px;
    color: var(--pulse-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pulse-incoming-actions {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 44px;
}

/* ── Round call buttons ──────────────────────────────────────── */
.pulse-call-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: var(--pulse-radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--pulse-bg-active);
    transition: transform var(--pulse-transition), filter var(--pulse-transition);
}

.pulse-call-btn:hover { filter: brightness(1.08); }
.pulse-call-btn:active { transform: scale(0.94); }

.pulse-call-accept { background: var(--pulse-success); }
.pulse-call-decline { background: var(--pulse-accent); }
.pulse-call-muted { background: var(--pulse-accent); }

.pulse-call-btn-sm { width: 38px; height: 38px; }

/* ── Recording indicator ─────────────────────────────────────── */
.pulse-rec-dot {
    width: 9px;
    height: 9px;
    flex: none;
    border-radius: var(--pulse-radius-full);
    background: #ef4444;
    animation: pulse-rec-blink 1.8s ease-in-out infinite;
}

@keyframes pulse-rec-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── In-call bar ─────────────────────────────────────────────── */
.pulse-call-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 16px;
    background: var(--pulse-bg);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius-full);
    box-shadow: var(--pulse-shadow-lg);
    font-family: var(--pulse-font);
}

.pulse-call-bar-status {
    font-size: 13px;
    color: var(--pulse-text-secondary);
}

.pulse-call-bar-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.pulse-call-bar-with {
    font-size: 13px;
    font-weight: 600;
    color: var(--pulse-text);
}

.pulse-call-bar-timer {
    font-size: 12px;
    color: var(--pulse-text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.pulse-call-spinner {
    width: 14px;
    height: 14px;
    flex: none;
    border: 2px solid var(--pulse-border-strong);
    border-top-color: var(--pulse-primary);
    border-radius: var(--pulse-radius-full);
    animation: pulse-call-spin 0.7s linear infinite;
}

@keyframes pulse-call-spin {
    to { transform: rotate(360deg); }
}
