/* ==========================================================================
   Consica AI — Live Voice Call Overlay Styling
   ========================================================================== */

.live-call-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(9, 13, 22, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.live-call-overlay.active {
    opacity: 1;
    visibility: visible;
}

.live-call-modal {
    width: min(520px, 100%);
    background: linear-gradient(180deg, #111827 0%, #0b0f19 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 80px rgba(37, 99, 235, 0.15);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    color: #ffffff;
    overflow: hidden;
}

/* Close/Header Bar */
.live-call-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.live-call-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-call-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    color: #ffffff;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.live-call-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-call-title-wrap {
    text-align: left;
}

.live-call-agent-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.live-call-mode-tag {
    font-size: 0.72rem;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* Pulsing Voice Orb Visualizer */
.live-call-orb-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 20px 0;
    display: grid;
    place-items: center;
}

.live-call-orb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #60a5fa 0%, #2563eb 50%, #1d4ed8 100%);
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.6), inset 0 -8px 20px rgba(0, 0, 0, 0.4);
    z-index: 2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.orb-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, 0.4);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

/* Status States Animations */
.live-call-modal[data-state="listening"] .orb-ring {
    animation: orbPulse 2s infinite ease-out;
}

.live-call-modal[data-state="speaking"] .live-call-orb {
    animation: orbGlow 1.2s infinite ease-in-out alternate;
    background: radial-gradient(circle at 35% 35%, #818cf8 0%, #4f46e5 50%, #3730a3 100%);
    box-shadow: 0 0 55px rgba(99, 102, 241, 0.8), inset 0 -8px 20px rgba(0, 0, 0, 0.4);
}

.live-call-modal[data-state="connecting"] .live-call-orb {
    animation: orbRotate 1.5s infinite linear;
    background: radial-gradient(circle at 35% 35%, #fbbf24 0%, #d97706 50%, #b45309 100%);
}

.live-call-modal[data-state="processing"] .live-call-orb {
    animation: orbRotate 1.5s infinite linear;
}

@keyframes orbPulse {
    0% {
        transform: scale(0.7);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes orbGlow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 35px rgba(99, 102, 241, 0.5);
    }
    100% {
        transform: scale(1.12);
        box-shadow: 0 0 65px rgba(99, 102, 241, 0.9);
    }
}

@keyframes orbRotate {
    0% { transform: rotate(0deg) scale(0.95); }
    50% { transform: rotate(180deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(0.95); }
}

/* Status Badge */
.live-call-status {
    font-size: 0.88rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    display: inline-block;
}

.live-call-modal[data-state="speaking"] .status-dot {
    background: #818cf8;
    box-shadow: 0 0 10px #818cf8;
}

.live-call-modal[data-state="processing"] .status-dot {
    background: #f59e0b;
}

/* Live Subtitle / Response Box */
.live-call-subtitle-box {
    width: 100%;
    min-height: 70px;
    max-height: 120px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #e2e8f0;
    margin-bottom: 28px;
    text-align: left;
}

/* Controls Bar */
.live-call-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.live-call-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1.3rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.live-call-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.live-call-btn.muted {
    background: #dc2626;
    color: #ffffff;
}

.live-call-btn.hangup {
    width: 64px;
    height: 64px;
    background: #ef4444;
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.live-call-btn.hangup:hover {
    background: #dc2626;
    transform: scale(1.08);
}
