/* ================================================
   ADHITHYA INNOVATIONS - SIX SIGMA EXAM CSS v2.1
   ================================================ */

/* Base font */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Question cards */
.question-box {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #f9fafb;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.question-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Sections controlled by JS */
.admin-hidden {
    display: none !important;
}

/* Timer at top of exam */
.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Password input wrappers */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    user-select: none;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #f59e0b !important;
}

/* When exam is finished and you want to freeze the screen */
.exam-ended {
    pointer-events: none;
    opacity: 0.6;
}

/* Candidate exam password panel */
.exam-password-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #f59e0b 100%);
    border: 3px solid #f59e0b;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow:
        0 20px 25px -5px rgba(245, 158, 11, 0.4),
        0 10px 10px -5px rgba(245, 158, 11, 0.2);
}

/* Exam password input field */
.exam-password-input {
    font-size: 1.25rem;
    padding: 1.25rem 3.5rem 1.25rem 1.5rem !important;
    letter-spacing: 2px;
    background: #ffffff;
    border: 3px solid #f59e0b;
    border-radius: 15px;
    font-weight: 600;
    text-align: center;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.exam-password-input:focus {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3);
}

/* Heading text above password box */
.exam-password-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: #b45309;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Chart containers (admin dashboard) */
.chart-container {
    height: 300px !important;
    position: relative;
}

.chart-container canvas {
    max-height: 100%;
}

/* Shake animation for invalid input (password, etc.) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    transform-origin: center;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .chart-container {
        height: 250px !important;
    }

    .exam-password-input {
        font-size: 1.1rem;
        padding: 1rem 3rem 1rem 1.2rem !important;
    }

    .password-toggle {
        right: 8px;
        font-size: 1.1rem;
    }
}

/* Admin password fields visual feedback */
#adminPanelSection input[type="password"] {
    transition: all 0.2s ease;
}

#adminPanelSection input[type="password"]:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Highlight selected answer option */
input[type="radio"]:checked + span {
    font-weight: 600;
    color: #6366f1;
}

/* Optional loading state class (if used from JS) */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print – show results, hide interactive controls */
@media print {
    .admin-hidden { display: block !important; }
    button,
    .exam-password-section { display: none !important; }
}
