/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #e1e4e8;
}

h1 {
    color: #0078d4;
}

h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #0078d4;
    color: white;
}

.btn-primary:hover {
    background-color: #005a9e;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.status-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #e9f5ff;
    border-radius: 4px;
    text-align: center;
}

#status-message {
    font-weight: bold;
    color: #0078d4;
}

.video-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
    position: relative;
    height: 65vh;
}

/* Force remote video to take up all available space */
.remote-video-container {
    width: 100%;
    height: 100%;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 2px solid #0078d4;
    flex-grow: 1;
}

/* Size local video appropriately */
.local-video-container {
    width: 200px;
    height: 150px;
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 2px solid white;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-left: auto;
}

/* Force videos to cover their containers properly */
.remote-video-container video,
.local-video-container video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Force renderer divs to take full space */
.remote-video-container > div,
.local-video-container > div,
.remote-video-container > .azure-communication-services-calling__renderer__video,
.local-video-container > .azure-communication-services-calling__renderer__video {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Better call-active picture-in-picture effect */
.call-active .local-video-container {
    position: absolute !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 20 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
    transition: all 0.3s ease !important;
    width: 160px !important;
    height: 120px !important;
}

.call-active .remote-video-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px !important;
}

/* Better loading indicator */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px 15px;
    border-radius: 20px;
    z-index: 100;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Highlight active buttons */
.btn.active {
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.5);
}

.auth-section, .call-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: #666;
    border-top: 1px solid #e1e4e8;
    margin-top: 50px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-container {
        flex-direction: column;
    }
    
    .remote-video-container {
        height: 40vh;
    }
    
    .local-video-container {
        width: 120px;
        height: 90px;
        bottom: 10px;
        right: 10px;
    }
    
    .controls {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn {
        flex: 0 0 calc(50% - 10px);
        margin-bottom: 10px;
    }
}

/* Add styling for the video placeholder */
.video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #1f1f1f;
    color: #ffffff;
    font-size: 14px;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
} 