/* ==========================================================================
 * Video Chamada + Chamada Recebida
 * Extraido de: protected/views/layouts/main.php
 * ========================================================================== */

/* ========================== MODAL VIDEO CHAMADA ========================== */
#video-modal {
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.video-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#remote_video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

#local_video {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 180px;
    height: 135px;
    border-radius: 12px;
    border: 3px solid white;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

#end-call {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 18px 24px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.5);
    transition: all 0.3s ease;
    z-index: 10;
}

#end-call:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(220, 53, 69, 0.6);
}

/* ========================== MODAL CHAMADA RECEBIDA ========================== */
#incoming-call-modal {
    position: fixed;
    z-index: 10002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.incoming-call-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: pulseIn 0.5s ease;
}

@keyframes pulseIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.incoming-call-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: ringPulse 1.5s infinite;
}

@keyframes ringPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.incoming-call-icon i {
    font-size: 32px;
    color: white;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.incoming-call-content h3 {
    color: white;
    font-size: 24px;
    margin: 0 0 10px;
    font-weight: 600;
}

.incoming-call-content #caller-id {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin: 0 0 30px;
}

.incoming-call-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.call-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.call-btn.accept {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.call-btn.accept:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.call-btn.reject {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.call-btn.reject:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

/* Responsivo para modais de chamada */
@media (max-width: 768px) {
    .incoming-call-content {
        padding: 30px;
        margin: 20px;
    }

    .incoming-call-icon {
        width: 60px;
        height: 60px;
    }

    .incoming-call-icon i {
        font-size: 24px;
    }

    .incoming-call-content h3 {
        font-size: 20px;
    }

    .call-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    #local_video {
        width: 120px;
        height: 90px;
        bottom: 10px;
        right: 10px;
    }
}
