/* =======================================================
   styles-quiz.css - External Stylesheet for Academy Quiz Module
======================================================= */

/* ===============================
   IMPORT FONT
================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

/* ===============================
   BASE STYLES & STRUCTURE
================================= */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f7f9fb;
    margin: 0;
    color: #111;
}

.quiz-wrap {
    max-width: 900px;
    margin: 36px auto;
    padding: 22px;
}

.quiz-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.06);
}

/* ===============================
   COLORS & VARIABLES (Quiz Focused)
================================= */
:root {
    --primary: #1e3a8a; /* Deep Blue for buttons/accents */
    --accent: #0d9488;
    --muted: #6b7280;
    --success: #059669;
    --fail: #dc2626;
    --timer-warn: #f59e0b;
}

/* ===============================
   RETURN BUTTON
================================= */
#returnBtn {
    background: #e5e7eb;
    color: var(--primary);
    padding: 8px 12px;
    font-size: 13px;
    margin-left: 20px;
    align-self: right;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
#returnBtn:hover {
    background: #d1d5db;
}

/* ===============================
   OVERALL TIMER
================================= */
.overall-timer-box {
    background: #fef3c7;
    color: #d97706;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    margin-top: 10px;
    text-align: center;
    border: 1px solid #fcd34d;
}

.overall-timer-box.critical {
    background: #fef2f2;
    color: var(--fail);
    border-color: var(--fail);
}

/* ===============================
   META & PROGRESS
================================= */
.meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}

.meta .pill {
    background: #eef2ff;
    color: #2563eb;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
}

.progress-wrap {
    margin: 18px 0;
}

.progress {
    height: 10px;
    background: #e6eefc;
    border-radius: 999px;
    overflow: hidden;
}

.progress > i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
}

/* ===============================
   QUESTIONS
================================= */
.qbox {
    margin-top: 18px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.question {
    font-weight: 600;
    margin: 0 0 10px 0;
    width: 100%;
}

.timer {
    font-weight: 700;
    color: #2563eb;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #eef2ff;
}

.timer.warn {
    color: var(--fail);
    border-color: var(--fail);
}

/* CHOICES */
.choices {
    display: grid;
    gap: 10px;
}

.choice {
    background: #fbfdff;
    border: 1px solid #eef3ff;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.2s;
}

.choice:hover {
    border-color: #2563eb;
}

.choice input {
    accent-color: #2563eb;
}

/* Selection and Correct/Incorrect Feedback */
.choice.selected {
    border-color: #2563eb;
    background: #eef2ff;
}

.choice.correct {
    border-color: var(--success);
    background: #ecfaef;
}

.choice.incorrect {
    border-color: var(--fail);
    background: #fff1f2;
}

/* ===============================
   CONTROLS / BUTTONS
================================= */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 18px;
    padding: 10px 0;
    gap: 10px;
}

.controls .muted {
    flex: 1;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.controls button {
    flex: 0 0 auto;
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.controls button:hover:not([disabled]) {
    background: #102353;
}

.controls button[disabled] {
    opacity: 0.5;
    cursor: default;
}

/* ===============================
   RESULTS & REVIEW
================================= */
.result {
    display: none;
    margin-top: 18px;
}

.result.show {
    display: block;
}

.score {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.pass {
    color: var(--success);
}

.fail {
    color: var(--fail);
}

.review {
    margin-top: 16px;
}

.review .rev-item {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #eef2ff;
    margin-bottom: 10px;
    background: #fff;
}

.correct-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #ecfaef;
    color: var(--success);
    font-weight: 700;
    margin-left: 10px;
}

.wrong-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff1f2;
    color: var(--fail);
    font-weight: 700;
    margin-left: 10px;
}

.unanswered-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fefce8;
    color: #a16207;
    font-weight: 700;
    margin-left: 10px;
}

/* ===============================
   RESPONSIVE
================================= */
@media (max-width: 600px) {
    .quiz-wrap {
        padding: 12px;
    }

    #returnBtn {
        margin-left: 0;
        margin-top: 10px;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }

    .controls .muted {
        text-align: center;
    }
}

