/**
 * Hiring Test Kiosk Application - Styles
 * Created: 2025-10-27
 * Optimized for fullscreen kiosk mode with touch-friendly UI
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    background-color: #5B9BD5;  /* Blue background from mockup */
    color: #FFFFFF;
    overflow: hidden;  /* Prevent scrolling in kiosk mode */
    height: 100vh;
    width: 100vw;
}

/* Screen Management */
.screen {
    display: none;
    height: 100vh;
    width: 100vw;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px;
}

.screen.active {
    display: flex;
}

/* Logo */
.logo {
    position: absolute;
    top: 30px;
    left: 40px;
    font-size: 28px;
    font-weight: bold;
    color: #FFFFFF;
}

/* Content Centering */
.content-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
.title-large {
    font-size: 72px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 60px;
    color: #FFFFFF;
    text-transform: uppercase;
    line-height: 1.2;
}

.title-medium {
    font-size: 56px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: #FFFFFF;
    text-transform: uppercase;
}

.subtitle {
    font-size: 36px;
    text-align: center;
    margin-bottom: 40px;
    color: #FFFFFF;
}

/* Buttons */
.btn {
    font-size: 28px;
    font-weight: bold;
    padding: 25px 60px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    font-style: italic;
    min-height: 80px;
    min-width: 300px;
}

.btn-large {
    font-size: 36px;
    padding: 30px 80px;
    min-height: 100px;
    min-width: 400px;
}

.btn-primary {
    background-color: #FFFFFF;
    color: #2B5797;
    border: 4px solid #2B5797;
}

.btn-primary:hover:not(:disabled) {
    background-color: #F0F0F0;
    transform: scale(1.05);
}

.btn-primary:disabled {
    background-color: #CCCCCC;
    color: #888888;
    border-color: #888888;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: transparent;
    color: #FFFFFF;
    border: 4px solid #FFFFFF;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.button-group {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

/* Video Container */
.video-container {
    width: 800px;
    max-width: 90vw;
    background-color: #000000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

/* Form Styles */
.form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 800px;
}

.input-field {
    width: 100%;
    padding: 25px 30px;
    font-size: 32px;
    border: 4px solid #FFFFFF;
    border-radius: 8px;
    background-color: #FFFFFF;
    color: #2B5797;
    font-weight: bold;
    text-align: center;
    font-style: italic;
}

.input-field::placeholder {
    color: #2B5797;
    font-style: italic;
}

.input-field:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.error-message {
    color: #FF6B6B;
    font-size: 20px;
    margin-top: -20px;
    min-height: 24px;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 4px;
}

/* Timer Styles */
.timer-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 40px auto;
}

#timer-canvas-1,
#timer-canvas-2 {
    position: absolute;
    top: 0;
    left: 0;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 96px;
    font-weight: bold;
    color: #FFFFFF;
    font-family: 'Courier New', monospace;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Webcam Styles */
.webcam-container {
    width: 640px;
    height: 480px;
    background-color: #000000;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.webcam-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Measurement Styles */
.measurement-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
}

.measurement-diagram {
    width: 400px;
    height: 400px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 4px solid #FFFFFF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.measurement-diagram img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.measurement-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.measurement-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.measurement-row label {
    font-size: 20px;
    font-weight: bold;
    text-align: left;
}

.input-field-small {
    padding: 15px 20px;
    font-size: 24px;
    border: 3px solid #FFFFFF;
    border-radius: 6px;
    background-color: #FFFFFF;
    color: #2B5797;
    font-weight: bold;
    text-align: center;
}

.input-field-small:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.validation-message {
    font-size: 24px;
    padding: 15px 30px;
    border-radius: 8px;
    text-align: center;
    min-height: 50px;
}

.validation-message.success {
    background-color: rgba(76, 175, 80, 0.8);
    color: #FFFFFF;
}

.validation-message.error {
    background-color: rgba(244, 67, 54, 0.8);
    color: #FFFFFF;
}

/* Checkbox Styles */
.checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 60px 0;
    width: 100%;
    max-width: 900px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 30px;
    cursor: pointer;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 3px solid #FFFFFF;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.checkbox-label:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.checkbox-large {
    width: 60px;
    height: 60px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.4;
    font-style: italic;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 30px;
    font-size: 32px;
    color: #FFFFFF;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .title-large {
        font-size: 56px;
    }

    .title-medium {
        font-size: 44px;
    }

    .btn-large {
        font-size: 30px;
        padding: 25px 60px;
        min-height: 80px;
        min-width: 300px;
    }

    .timer-container {
        width: 300px;
        height: 300px;
    }

    .timer-display {
        font-size: 72px;
    }
}

@media (max-width: 768px) {
    .screen {
        padding: 20px;
    }

    .title-large {
        font-size: 42px;
    }

    .measurement-inputs {
        grid-template-columns: 1fr;
    }
}

/* Fullscreen API Support */
:-webkit-full-screen {
    width: 100%;
    height: 100%;
}

:-moz-full-screen {
    width: 100%;
    height: 100%;
}

:-ms-fullscreen {
    width: 100%;
    height: 100%;
}

:fullscreen {
    width: 100%;
    height: 100%;
}
