/* ═══════════════════════════════════════════════════
   Estilos Premium para Llamadas de Voz Integradas
   ═══════════════════════════════════════════════════ */

.call-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid #7c6bf0;
    opacity: 0;
    transform: scale(1);
    transition: opacity 0.3s;
    pointer-events: none;
}

.call-ring1 {
    width: 100%;
    height: 100%;
}

.call-ring2 {
    width: 80%;
    height: 80%;
    border-color: #c084fc;
}

.call-ring3 {
    width: 60%;
    height: 60%;
    border-color: #34d399;
}

.call-ring.active {
    animation: callRingPulse 1.8s ease-out infinite;
}

.call-ring2.active {
    animation-delay: 0.3s;
}

.call-ring3.active {
    animation-delay: 0.6s;
}

@keyframes callRingPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.6;
    }

    70% {
        transform: scale(1.08);
        opacity: 0.15;
    }

    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

.call-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c6bf0, #c084fc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 30px rgba(124, 107, 240, 0.4), 0 0 0 3px rgba(124, 107, 240, 0.2);
    transition: box-shadow 0.3s, transform 0.3s;
    user-select: none;
}

.call-avatar.speaking {
    box-shadow: 0 0 45px rgba(52, 211, 153, 0.5), 0 0 0 3px rgba(52, 211, 153, 0.3);
    animation: callAvatarBob 0.6s ease-in-out infinite alternate;
}

@keyframes callAvatarBob {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.04);
    }
}

.call-visualizer .bar {
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(to top, #7c6bf0, #c084fc);
    height: 4px;
    transition: height 0.08s ease;
    flex-shrink: 0;
}

.call-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: background 0.4s;
}

.call-dot.connecting {
    background: #fbbf24;
    animation: callBlink 1s infinite;
}

.call-dot.connected {
    background: #34d399;
    animation: none;
}

.call-dot.speaking {
    background: #c084fc;
    animation: callBlink 0.5s infinite;
}

.call-dot.error {
    background: #f87171;
}

@keyframes callBlink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0.3
    }
}

.call-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.call-btn.muted {
    background: rgba(248, 113, 113, 0.15);
    border-color: #f87171;
    color: #f87171;
}

.call-btn.active-settings {
    background: rgba(124, 107, 240, 0.15);
    border-color: #7c6bf0;
    color: #7c6bf0;
}

/* Toggle Switch */
.call-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.call-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    transition: 0.3s;
    border-radius: 34px;
}

.call-switch-slider::before {
    content: "";
    position: absolute;
    height: 10px;
    width: 10px;
    left: 3px;
    bottom: 3px;
    background-color: #64748b;
    transition: 0.3s;
    border-radius: 50%;
}

.call-switch input:checked+.call-switch-slider {
    background-color: #7c6bf0;
    border-color: rgba(255, 255, 255, 0.15);
}

.call-switch input:checked+.call-switch-slider::before {
    transform: translateX(16px);
    background-color: #fff;
}

.call-transcript-entry {
    margin-bottom: 6px;
    line-height: 1.4;
    animation: callFadeUp 0.3s ease;
}

@keyframes callFadeUp {
    from {
        opacity: 0;
        transform: translateY(4px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.call-transcript-entry .who {
    font-weight: 600;
    margin-right: 4px;
}

.call-transcript-entry.user .who {
    color: #c084fc;
}

.call-transcript-entry.agent .who {
    color: #34d399;
}

.call-transcript-entry .msg {
    color: var(--text-primary);
}

@keyframes drift {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(20px, 15px) scale(1.05);
    }
}
