/* ==========================================
   STUDENT EXAM UI
   Step 1 - CSS Loading Test
========================================== */

#em-student-exam-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

/* =========================================================
   STUDENT EXAM HEADER - STEP 6
========================================================= */

.em-student-exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    padding: 24px 28px;
    margin-bottom: 20px;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}


/* Coaching Name */

.em-coaching-name {
    font-size: 15px;
    font-weight: 700;

    color: #2563eb;

    text-transform: uppercase;
    letter-spacing: 0.8px;

    margin-bottom: 6px;
}


/* Exam Name */

.em-student-exam-header #em-exam-name {
    margin: 0;

    font-size: 28px;
    line-height: 1.25;

    font-weight: 700;

    color: #111827;
}


/* Session Name */

.em-student-exam-header #em-exam-session-name {
    margin: 7px 0 0;

    font-size: 14px;

    color: #6b7280;
}


/* Timer */

.em-exam-timer-box {
    min-width: 170px;

    padding: 14px 18px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    text-align: center;
}


.em-timer-label {
    display: block;

    font-size: 12px;

    font-weight: 600;

    color: #64748b;

    text-transform: uppercase;

    letter-spacing: 0.6px;

    margin-bottom: 5px;
}


#em-exam-timer {
    display: block;

    font-size: 28px;
    font-weight: 800;

    color: #dc2626;

    line-height: 1.2;

    transition:
        color 0.2s ease,
        text-shadow 0.2s ease,
        transform 0.2s ease;
}

/* =========================================================
   TIMER - LAST 5 MINUTES
========================================================= */

#em-exam-timer.em-timer-warning {
    color: #dc2626;

    text-shadow:
        0 0 6px rgba(220, 38, 38, 0.45),
        0 0 14px rgba(220, 38, 38, 0.25);

    animation: emTimerPulse 1.2s ease-in-out infinite;
}

@keyframes emTimerPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

}

/* =========================================================
   EXAM INFORMATION CARD
   ========================================================= */

.em-student-exam-information {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 24px;
    margin: 25px 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    font-size: 15px;
    color: #334155;
}

/* Information heading */
.em-student-exam-information .em-info-title {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Information grid */
.em-exam-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Individual information item */
.em-exam-info-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
}

/* Label */
.em-exam-info-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
    text-transform: uppercase;
}

/* Value */
.em-exam-info-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

/* Mobile */
@media (max-width: 768px) {

    .em-exam-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

/* Small mobile */
@media (max-width: 480px) {

    .em-student-exam-information {
        padding: 16px;
    }

    .em-exam-info-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   QUESTION AREA
   ========================================================= */
.em-exam-question-area {
    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 14px;

    padding: 12px 16px;
margin: 10px 0;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}



/* Question count - RIGHT */

.em-question-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 85px;

    padding: 7px 12px;

    background: #eff6ff;
    border: 1px solid #bfdbfe;

    border-radius: 8px;

    color: #2563eb;

    font-size: 14px;
    font-weight: 700;

    margin-left: auto;
}


/* Current question number */

.em-question-count #em-current-question-number {
    color: #2563eb;
}


/* / */

.em-question-divider {
    margin: 0 6px;

    color: #94a3b8;
}


/* Total questions */

.em-question-count #em-total-question-number {
    color: #64748b;
}

/* =========================================================
   QUESTION PALETTE HEADER
========================================================= */

.em-question-palette-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    box-sizing: border-box;

    margin-bottom: 10px;
}


/* Palette title */

.em-question-palette-header .em-question-palette-title {
    margin: 0;

    font-size: 13px;
    font-weight: 700;

    color: #334155;

    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Question counter */

.em-question-palette-header .em-question-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 55px;

    padding: 6px 10px;

    background: #eff6ff;

    border: 1px solid #bfdbfe;

    border-radius: 7px;

    color: #2563eb;

    font-size: 13px;
    font-weight: 700;

    margin-left: auto;
}

/* =========================================================
   QUESTION PALETTE
========================================================= */

.em-question-palette {
    margin-top: 10px;
margin-bottom: 15px;
padding: 14px 16px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.em-question-palette-title {
    margin-bottom: 12px;

    font-size: 13px;
    font-weight: 700;

    color: #475569;

    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.em-question-palette-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Individual question number */

.em-question-palette-item {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    color: #334155;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.em-question-palette-item:hover {
    background: #eff6ff;
    border-color: #93c5fd;

    transform: translateY(-1px);
}

/* =========================================================
   QUESTION PALETTE STATUS
   ========================================================= */

.em-question-palette-item.em-palette-current {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.em-question-palette-item.em-palette-answered {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.em-question-palette-item.em-palette-unanswered {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

/* Question text */

#em-question-container {
    font-size: 18px;
    color: #0f172a;
}

#em-question-container .em-question-text {
    font-size: 20px;
    line-height: 1.45;
    font-weight: 600;

    color: #111827;

    margin: 6px 0 12px 0;
}

/* Question loading */

.em-question-loading {
    color: #64748b;
    font-size: 16px;
}

/* =========================================================
   OPTIONS
   ========================================================= */

#em-question-container label {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 48px;

    box-sizing: border-box;

    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    padding: 10px 16px;
    margin-bottom: 8px;

    cursor: pointer;

    font-size: 16px;
    font-weight: 500;
    color: #1e293b;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


/* Hover */

#em-question-container label:hover {
    background: #eff6ff;
    border-color: #93c5fd;

    transform: translateY(-1px);

    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.08);
}


/* Radio button */

#em-question-container input[type="radio"] {
    width: 18px;
    height: 18px;

    margin: 0 12px 0 0;

    flex-shrink: 0;

    accent-color: #2563eb;
}

/* =========================================================
   SELECTED OPTION
   ========================================================= */

#em-question-container .em-question-option.em-option-selected {
    background: #eff6ff;
    border-color: #2563eb;

    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.15);

    color: #1d4ed8;

    font-weight: 600;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .em-exam-question-area {
        padding: 20px;
    }

    #em-question-container .em-question-text {
        font-size: 19px;
    }

}

@media (max-width: 480px) {

    .em-exam-question-area {
        padding: 16px;
        border-radius: 10px;
    }

    #em-question-container .em-question-text {
        font-size: 18px;
    }

    #em-question-container label {
        padding: 13px;
    }

}

/* =========================================================
   EXAM NAVIGATION
   ========================================================= */

.em-exam-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    margin-top: 20px;
    padding: 0;

    gap: 15px;
}


/* =========================================================
   NAVIGATION BUTTONS
   ========================================================= */

.em-exam-nav-btn,
.em-exam-submit-btn {
    min-width: 130px;

    padding: 13px 22px;

    border: none;
    border-radius: 8px;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}


/* Previous / Next */

.em-exam-nav-btn {
    background: #2563eb;
    color: #ffffff;
}


/* Hover */

.em-exam-nav-btn:hover:not(:disabled) {
    background: #1d4ed8;

    transform: translateY(-1px);

    box-shadow:
        0 4px 10px rgba(37, 99, 235, 0.20);
}


/* Disabled Previous */

.em-exam-nav-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;

    cursor: not-allowed;

    box-shadow: none;

    transform: none;
}


/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

.em-exam-submit-btn {
    background: #16a34a;
    color: #ffffff;
}


.em-exam-submit-btn:hover {
    background: #15803d;

    transform: translateY(-1px);

    box-shadow:
        0 4px 10px rgba(22, 163, 74, 0.20);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .em-exam-navigation {
        gap: 10px;
    }

    .em-exam-nav-btn,
    .em-exam-submit-btn {
        min-width: 0;
        flex: 1;

        padding: 12px 10px;

        font-size: 14px;
    }

}

/* =========================================================
   SUBMIT CONFIRMATION MODAL
========================================================= */

.em-submit-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}


/* Overlay */

.em-submit-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(15, 23, 42, 0.55);

    backdrop-filter: blur(3px);
}


/* Modal box */

.em-submit-modal-box {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 460px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 16px;

    padding: 30px;

    text-align: center;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.20);
}


/* Icon */

.em-submit-modal-icon {
    width: 48px;
    height: 48px;

    margin: 0 auto 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #eff6ff;
    border: 1px solid #bfdbfe;

    color: #2563eb;

    font-size: 22px;
    font-weight: 700;
}


/* Title */

.em-submit-modal-title {
    margin: 0 0 10px;

    font-size: 22px;
    line-height: 1.3;

    font-weight: 700;

    color: #111827;
}


/* Description */

.em-submit-modal-text {
    margin: 0 0 24px;

    font-size: 15px;
    line-height: 1.6;

    color: #64748b;
}


/* Status */

.em-submit-modal-status {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 10px;

    margin-bottom: 25px;
}


/* Status item */

.em-submit-status-item {
    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    padding: 12px 8px;
}


/* Status label */

.em-submit-status-label {
    display: block;

    margin-bottom: 5px;

    font-size: 11px;
    font-weight: 600;

    color: #64748b;

    text-transform: uppercase;
}


/* Status value */

.em-submit-status-item strong {
    display: block;

    font-size: 18px;
    font-weight: 700;

    color: #111827;
}


/* Buttons */

.em-submit-modal-actions {
    display: flex;

    gap: 12px;

    justify-content: center;
}


/* Cancel */

.em-submit-cancel-btn,
.em-submit-confirm-btn {
    min-width: 130px;

    padding: 12px 18px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


/* Cancel */

.em-submit-cancel-btn {
    background: #ffffff;

    border: 1px solid #cbd5e1;

    color: #475569;
}


.em-submit-cancel-btn:hover {
    background: #f8fafc;

    border-color: #94a3b8;
}


/* Confirm */

.em-submit-confirm-btn {
    background: #16a34a;

    border: 1px solid #16a34a;

    color: #ffffff;
}


.em-submit-confirm-btn:hover {
    background: #15803d;

    border-color: #15803d;

    transform: translateY(-1px);
}


/* =========================================================
   SUBMIT MODAL MOBILE
========================================================= */

@media (max-width: 480px) {

    .em-submit-modal {
        padding: 15px;
    }

    .em-submit-modal-box {
        padding: 22px 18px;
        border-radius: 14px;
    }

    .em-submit-modal-title {
        font-size: 20px;
    }

    .em-submit-modal-status {
        gap: 6px;
    }

    .em-submit-status-item {
        padding: 10px 5px;
    }

    .em-submit-modal-actions {
        flex-direction: column-reverse;
    }

    .em-submit-cancel-btn,
    .em-submit-confirm-btn {
        width: 100%;
    }

}

/* =========================================================
   EXAM SUBMISSION SUCCESS MODAL
========================================================= */

.em-exam-success-modal {
    position: fixed;
    inset: 0;

    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(15, 23, 42, 0.65);

    padding: 20px;
    box-sizing: border-box;
}

.em-exam-success-card {
    width: 100%;
    max-width: 500px;

    background: #ffffff;

    border-radius: 18px;

    padding: 40px 30px;

    text-align: center;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.20);

    box-sizing: border-box;
}

.em-success-icon {
    width: 70px;
    height: 70px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #dcfce7;

    border: 2px solid #22c55e;

    color: #16a34a;

    font-size: 38px;
    font-weight: 700;
}

.em-exam-success-card h2 {
    margin: 0 0 12px;

    font-size: 28px;
    font-weight: 700;

    color: #111827;
}

.em-exam-success-card p {
    margin: 0 0 28px;

    font-size: 16px;
    line-height: 1.6;

    color: #64748b;
}

.em-return-dashboard-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 210px;

    padding: 13px 24px;

    border: none;
    border-radius: 8px;

    background: #16a34a;

    color: #ffffff;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.em-return-dashboard-btn:hover {
    background: #15803d;

    transform: translateY(-1px);
}

@media (max-width: 480px) {

    .em-exam-success-card {
        padding: 30px 20px;
    }

    .em-exam-success-card h2 {
        font-size: 23px;
    }

    .em-exam-success-card p {
        font-size: 15px;
    }

    .em-return-dashboard-btn {
        width: 100%;
    }

}

/* =========================================================
   EXAM VIEWPORT MODE
========================================================= */

.em-student-exam-container {
    max-width: 1200px;
    margin: 0 auto;

    box-sizing: border-box;
}


/* Reduce outer spacing */

#em-student-exam-wrapper {
    margin-top: 10px;
    margin-bottom: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}


/* Compact header */

.em-student-exam-header {
    padding: 16px 20px;
    margin-bottom: 12px;
}


/* Compact information card */

.em-student-exam-information {
    padding: 14px 18px;
    margin: 12px 0;
}


/* Compact information items */

.em-exam-info-item {
    padding: 10px 12px;
}

/* =========================================================
   FULLSCREEN WARNING
========================================================= */

.em-fullscreen-warning {

    position: fixed;

    inset: 0;

    z-index: 999999;

    display: flex;

    align-items: center;

    justify-content: center;

    background: rgba(15, 23, 42, 0.82);

    padding: 20px;

    box-sizing: border-box;
}


/* Warning card */

.em-fullscreen-warning-card {

    width: 100%;

    max-width: 520px;

    background: #ffffff;

    border-radius: 18px;

    padding: 40px;

    text-align: center;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.25);

}


/* Warning icon */

.em-fullscreen-warning-icon {

    width: 64px;

    height: 64px;

    margin: 0 auto 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #fef3c7;

    color: #d97706;

    font-size: 30px;

    font-weight: 700;
}


/* Heading */

.em-fullscreen-warning-card h2 {

    margin: 0 0 12px;

    font-size: 26px;

    color: #111827;
}


/* Text */

.em-fullscreen-warning-card p {

    margin: 0 0 28px;

    font-size: 16px;

    line-height: 1.6;

    color: #64748b;
}


/* Return button */

.em-return-fullscreen-btn {

    border: none;

    border-radius: 9px;

    padding: 13px 24px;

    background: #2563eb;

    color: #ffffff;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.em-return-fullscreen-btn:hover {

    background: #1d4ed8;

    transform: translateY(-1px);
}

/* =========================================================
   EXAM CONTAINER FULLSCREEN
========================================================= */

.em-student-exam-container:fullscreen {

    width: 100vw;
    height: 100vh;

    max-width: none;

    margin: 0;
    padding: 20px;

    box-sizing: border-box;

    overflow-y: auto;
    overflow-x: hidden;

    background: #ffffff;
}


/* =========================================================
   WEBKIT FULLSCREEN SUPPORT
========================================================= */

.em-student-exam-container:-webkit-full-screen {

    width: 100vw;
    height: 100vh;

    max-width: none;

    margin: 0;
    padding: 20px;

    box-sizing: border-box;

    overflow-y: auto;
    overflow-x: hidden;

    background: #ffffff;
}