/*
Theme Name: Video Call Simulator
Theme URI: 
Author: Your Name
Author URI: 
Description: A WordPress theme that simulates video calls with pre-recorded videos
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: video-call-simulator
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Call container */
.call-container {
    width: 100%;
    max-width: 1200px;
    height: 80vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Video elements */
.video-container {
    position: relative;
    flex: 1;
    background: #000;
    overflow: hidden;
}

.remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Large preview of local video on incoming call */
.local-video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.3; /* Make it slightly transparent */
}

/* Small local video during call */
.local-video {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    background: #000;
    object-fit: cover;
    display: none; /* Hidden by default, shown after accepting call */
}

.call-screen {
    position: relative;
    overflow: hidden;
}

/* Call controls */
.call-controls {
    padding: 20px;
    
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-accept {
    background-color: #4CAF50;
    color: white;
}

.btn-reject {
    background-color: #f44336;
    color: white;
}

.btn-end-call {
    background-color: #f44336;
    color: white;
    display: none;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Call screen */
.call-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 100;
    text-align: center;
    padding: 20px;
}

.call-screen h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.call-screen p {
    margin-bottom: 30px;
    font-size: 18px;
    opacity: 0.9;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

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

/* Animação de pulso para o contador */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Estilo do contador de tempo */
#callTimer {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    z-index: 1000;
    display: none;
    transition: all 0.3s ease;
}

@media (min-width: 1024px) {
  #callTimer {
    top: 113px;
  }
}

/* Estilo para quando o tempo estiver acabando */
#callTimer.warning {
    color: #ff6b6b;
    /* animation: pulse 1s infinite; */
}

/* Animação de tremor para os botões de chamada */
@keyframes shake {
    0%, 100% { transform: translateX(0) rotate(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px) rotate(-2deg); }
    20%, 40%, 60%, 80% { transform: translateX(2px) rotate(2deg); }
}

/* Aplicar animação aos botões de chamada */
#acceptCall, #rejectCall {
    animation: shake 0.5s infinite;
    transform-origin: center center;
}

/* Pausar a animação quando o mouse estiver sobre o botão */
#acceptCall:hover, #rejectCall:hover {
    animation-play-state: paused;
}

/* Responsive */
@media (max-width: 768px) {
    .call-container {
        height: 100vh;
        border-radius: 0;
    }
    
    .local-video {
        width: 120px;
        height: 90px;
    }
    
    .call-screen h2 {
        font-size: 22px;
    }
    
    .call-screen p {
        font-size: 16px;
    }
}




/* CSS do template de chamada */
body:not(.logged-in) {
    overflow: hidden !important;
    background: #000 !important;
}




    #page {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }
    .site-header, .site-footer {
        display: none !important;
    }
    body { 
        margin: 0; 
        padding: 0; 
        height: 100vh; 
        overflow: hidden; 
        background: #000;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }
    
    .call-screen {
        position: relative;
        width: 100%;
        height: 100vh;
        max-width: 414px;
        margin: 0 auto;
        background: #000;
        overflow: hidden;
    }
    
    .remote-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .local-video {
        position: absolute;
        bottom: 168px;
        right: 28px;
        width: 110px;
        height: 132px;
        border-radius: 10px;
        border: 2px solid #fff;
        z-index: 10;
        background: #000;
    }
    
    .caller-info {
        position: absolute;
        top: 40px;
        left: 0;
        right: 0;
        text-align: center;
        color: white;
        z-index: 5;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    }
    
    .caller-avatar {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        border: 3px solid #fff;
        margin: 0 auto 10px;
        overflow: hidden;
    }
    
    .caller-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .caller-name {
        font-size: 20px;
        font-weight: 500;
        margin: -10px 0;
    }
    
    .call-status {
        font-size: 14px;
        color: #ccc;
    }
    
    .call-controls {
        position: absolute;
        bottom: 70px;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        gap: 20px;
        z-index: 20;
    }
    
    .control-btn {
        background: rgba(255, 255, 255, 0.3);
        color: white;
        border: none;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        transition: all 0.2s;
        backdrop-filter: blur(10px);
    }
    
    .control-btn:active {
        transform: scale(0.95);
    }
    
    .control-btn.off {
        background: rgba(255, 59, 48, 0.8);
    }
    
    .end-call-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 60px;
    height: 59px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
    }
    
    .end-call-btn:active {
        transform: scale(0.95);
    }
    
    @media (max-width: 414px) {
        .call-screen { 
            max-width: 100%; 
        }
        
        .local-video {
            width: 100px;
            height: 160px;
            bottom: 170px;
        }
    }
