/* Overlay Component Styles for Full-Screen UI Design */

/* Full-Screen Video Container */
.full-screen-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: contain; /* Preserve aspect ratio */
    z-index: 1;
    background: #E6F3FF; /* GS Battery light blue background */
}

/* RESTING State Overlay */
.resting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.25); /* 25% transparent black */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.resting-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.resting-overlay-content {
    text-align: center;
    color: white;
}

.resting-overlay-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.resting-overlay-text {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.resting-overlay-subtext {
    font-size: 16px;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Status Pill */
.status-pill {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 200px; /* Fixed width to match VAD bar */
    background: linear-gradient(135deg, #005bb0 0%, #003d7a 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 91, 176, 0.3);
    display: flex;
    align-items: center;
    justify-content: center; /* Center content within fixed width */
    gap: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Include padding in width calculation */
}

.status-pill-icon {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1); /* Make icon white */
}

.status-pill-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Status Pill State Colors */
.status-pill.resting {
    background: linear-gradient(135deg, #666666 0%, #444444 100%);
}

.status-pill.idle {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

.status-pill.listening {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

.status-pill.thinking {
    background: linear-gradient(135deg, #F44336 0%, #D32F2F 100%);
}

.status-pill.speaking {
    background: linear-gradient(135deg, #F44336 0%, #D32F2F 100%);
}

.status-pill.error {
    background: linear-gradient(135deg, #F44336 0%, #D32F2F 100%);
}

/* VAD Bar */
.vad-bar {
    position: absolute;
    top: 80px;
    left: 20px;
    width: 200px; /* Fixed width to match status pill */
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    z-index: 100;
    box-sizing: border-box; /* Include border in width calculation */
}

.vad-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a, #00ff88);
    background-size: 200% 100%;
    width: var(--vad-width, 0%);
    transition: width 0.1s ease;
    animation: shimmer 1.5s infinite;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Camera Feed Overlay */
.camera-feed-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 120px;
    height: 90px;
    border: 3px solid transparent;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
}

.camera-feed-overlay-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* Camera Feed Visual States */
.camera-feed-overlay.disabled {
    display: none;
}

.camera-feed-overlay.face-detected {
    border-color: #ffde1c;
    box-shadow: 0 0 15px rgba(255, 222, 28, 0.4);
}

.camera-feed-overlay.mouth-moving {
    border-color: #91cf00;
    box-shadow: 0 0 15px rgba(145, 207, 0, 0.4);
}

.camera-feed-overlay.error {
    border-color: #ff9400;
    box-shadow: 0 0 15px rgba(255, 148, 0, 0.4);
}

/* Company Logo */
.company-logo {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 120px;
    height: 67.5px; /* Maintain 16:9 aspect ratio (960:540) */
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 0;
}

.company-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Conversation Transcription Display - Moved to transcription.css for better organization */

/* Responsive Design */
/* Mobile (< 768px) */
@media (max-width: 767px) {
    .status-pill {
        top: 15px;
        left: 15px;
        width: 150px; /* Fixed width to match VAD bar on mobile */
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .vad-bar {
        top: 70px;
        left: 15px;
        width: 150px; /* Fixed width to match status pill on mobile */
        height: 10px;
    }
    
    .camera-feed-overlay {
        width: 60px;
        height: 45px;
        top: 15px;
        right: 15px;
        border: 2px solid transparent;
    }
    
    .company-logo {
        bottom: 1px;
        right: 1px;
        width: 80px;
        height: 45px; /* Maintain 16:9 aspect ratio (960:540) */
        padding: 0;
    }
    
    /* Conversation transcription responsive styles moved to transcription.css */
    
    .resting-overlay-icon {
        font-size: 60px;
    }
    
    .resting-overlay-text {
        font-size: 20px;
    }
    
    .resting-overlay-subtext {
        font-size: 14px;
    }
}

/* Tablet (768px - 1920px) */
@media (min-width: 768px) and (max-width: 1919px) {
    .camera-feed-overlay {
        width: 120px;
        height: 90px;
        top: 20px;
        right: 20px;
        border: 3px solid transparent;
    }
}

/* Desktop/Kiosk (> 1920px) */
@media (min-width: 1920px) {
    .camera-feed-overlay {
        width: 160px;
        height: 120px;
        top: 30px;
        right: 30px;
        border: 3px solid transparent;
    }
    
    .status-pill {
        top: 30px;
        left: 30px;
        width: 250px; /* Fixed width to match VAD bar on desktop */
        padding: 14px 24px;
        font-size: 18px;
    }
    
    .vad-bar {
        top: 90px;
        left: 30px;
        width: 250px; /* Fixed width to match status pill on desktop */
        height: 14px;
    }
    
    .company-logo {
        bottom: 30px;
        right: 30px;
        width: 140px;
        height: 70px;
    }
    
    .company-logo-text {
        font-size: 16px;
    }
    
    /* Conversation transcription desktop styles moved to transcription.css */
}

/* Animations */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .resting-overlay {
        cursor: default;
    }
    
    .status-pill,
    .vad-bar,
    .camera-feed-overlay,
    .company-logo,
    .conversation-transcription {
        /* Ensure touch targets are appropriately sized */
        min-height: 44px;
    }
}
