/* Camera Test CSS */
/* Styles specific to camera testing functionality */

/* Style for explainer text container */
.explainer-container {
    position: absolute;
    top: 800px; /* Position exactly 800px from the top */
    width: 90%; /* Match camera container width */
    max-width: 1200px; /* Match camera container max-width */
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
}

.camera-container {
    width: 90%; /* Adjusted width */
    max-width: 1200px; /* Added max-width for larger screens */
    margin: 3px auto; /* Reduced from 6px to 3px (half again) */
    text-align: center;
}

/* Camera Grid */
.camera-grid {
    display: grid;
    margin-top: 0px; /* Removed top margin */
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Reduced minmax from 300px to 150px */
    gap: 16px;
}

.camera-grid video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: rgba(0,0,0,0.1);
    /* aspect-ratio: 16/6.75; Removed to allow natural aspect ratio */
    object-fit: contain; /* Changed from cover to contain */
    /* Ensure video displays at its native resolution when possible */
}

.camera-wrapper {
    position: relative;
    width: 100%;
}

.camera-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: 1;
}

.camera-message {
    width: 100%;
    padding: 24px;
    text-align: center;
    color: #666;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
}

/* Fullscreen Button - used for both entering and exiting fullscreen */
.camera-fullscreen-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.camera-fullscreen-btn:hover {
    opacity: 1;
}

/* Fullscreen Styles */
.camera-wrapper:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: black;
    width: 100%;
    height: 100%;
    padding: 0;
}

.camera-wrapper:fullscreen video {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    object-fit: cover; /* Changed from contain to cover to fill entire screen */
    /* This will fill the full screen but may crop some video if aspect ratios don't match */
}

.camera-wrapper:fullscreen .camera-label {
    font-size: 1.2rem;
    padding: 8px 12px;
}

/* Ensure fullscreen button is always visible */
.camera-wrapper:fullscreen .camera-fullscreen-btn {
    z-index: 9999;
}
