/* ============================================================
   EduJA — Cumulative Assessment page styles
   Reuses .modal/.modal-content/.quiz-option/.quiz-feedback/
   .access-gate/.completion-badge from css/style.css; this file
   only adds what's unique to the assessment listing + review UI.
   ============================================================ */

.assess-content { padding: 16px; max-width: 900px; margin: 0 auto; }
.assess-header { text-align: center; margin-bottom: 18px; }
.assess-header h1 { color: #FDB827; }
.assess-header p { color: #ccc; font-size: 0.85rem; margin-top: 4px; }

.assess-grade-group { margin-bottom: 22px; }
.assess-grade-group h2 { color: #FDB827; font-size: 1.05rem; margin-bottom: 10px; }

.assess-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.assess-card {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 14px;
    padding: 14px;
    color: #f5e7c8;
}
.assess-card h3 { font-size: 0.95rem; margin-bottom: 6px; }
.assess-card .assess-meta { font-size: 0.72rem; color: #999; }

/* Term/Assessment picker — replaces the old flat list of every named
   assessment; each subject card now offers 3 terms x 5 assessments
   (see js/content/assess-grade*.js) via two dropdowns instead of a
   stacked list of buttons. See js/assessment.js's renderGradeGroups(),
   populateAssessmentSelect(), and renderAssessmentDetail(). */
.assess-picker-row { display: flex; gap: 8px; margin: 8px 0; }
.assess-picker-label {
    flex: 1; display: flex; flex-direction: column; gap: 3px;
    font-size: 0.68rem; color: #999; text-transform: uppercase; letter-spacing: 0.02em;
}
.assess-picker-label select {
    background: rgba(255,255,255,0.06); color: #f5e7c8; border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px; padding: 6px 8px; font-size: 0.8rem; font-family: inherit;
    /* Long option text (e.g. a lesson topic name) must not push the closed
       select wider than its card — some browsers otherwise size a <select>
       to fit its longest <option>, ignoring the flex layout entirely. */
    width: 100%; max-width: 100%; box-sizing: border-box;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* The OPEN dropdown list is native browser/OS chrome that mostly ignores
   styles set on the <select> itself — most browsers render it on a plain
   white popup regardless, so the dark #f5e7c8 text set above (meant for
   the dark page background) becomes pale and hard to read there. Setting
   background/color explicitly on <option> is the one pairing browsers
   reliably honor for the open list, so pin it to readable dark-on-white. */
.assess-picker-label select option { background: #fff; color: #1a1a2e; }
.assess-picker-label select option:disabled { color: #666; }
/* The practice page's Topic dropdown groups its options by strand/unit
   using <optgroup> (see js/practice.js) — that's the "category" label
   above each cluster of topics. Browsers style <optgroup> separately
   from <option> and, left unset, several render its label in a muted,
   low-contrast tone on the open list's white background. Pin it to a
   bright, clearly-readable color of its own so categories are easy to
   spot at a glance and easy to read. */
.assess-picker-label select optgroup {
    background: #fff;
    color: #1a56db;
    font-weight: 700;
    font-style: normal;
}
.assess-item-detail { padding-top: 8px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,0.08); }
.assess-start-btn {
    background: #FDB827; color: #000; border: none; padding: 8px 14px;
    border-radius: 30px; font-weight: bold; font-size: 0.8rem; cursor: pointer; width: 100%;
}
.assess-locked-btn {
    background: #2a3a2a; color: #999; border: 1px solid #3a4a3a; padding: 8px 14px;
    border-radius: 30px; font-size: 0.8rem; width: 100%; cursor: pointer;
}
.assess-best-score { font-size: 0.72rem; color: #86efac; margin-top: 6px; }

.assess-attempts-section { margin-top: 26px; }
.assess-attempts-section h2 { color: #FDB827; font-size: 1.05rem; margin-bottom: 10px; }
.assess-attempt-row {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #f5e7c8;
    font-size: 0.82rem;
}
.assess-attempt-score { font-weight: bold; color: #FDB827; }
.assess-attempt-comment { flex-basis: 100%; font-size: 0.75rem; color: #ccc; background: #1e2a1e; border-radius: 8px; padding: 6px 10px; margin-top: 4px; }

/* Taking-the-test state: an option the student picked, before grading */
.quiz-option.selected { background: #FDB827; border-color: #FDB827; font-weight: bold; }
.assess-submit-btn {
    background: #006633; color: #fff; border: none; padding: 10px 20px;
    border-radius: 30px; font-weight: bold; font-size: 0.85rem; cursor: pointer; margin-top: 10px;
}
.assess-submit-btn:disabled { background: #999; cursor: not-allowed; }
.assess-result-banner { text-align: center; padding: 14px; border-radius: 12px; background: #f0f0e8; margin-bottom: 14px; font-weight: bold; color: #1a1a2e; }

/* ============================================================
   Exam Prep page (exam-prep.html / js/exam-prep.js) — reuses
   .assess-content/.assess-header/.assess-grade-group/.assess-grid/
   .assess-card/.assess-start-btn/.assess-locked-btn/.access-gate
   above and from css/style.css; these rules only add what's unique
   to the pack cards and the Official CXC Resources link list.
   ============================================================ */
.examprep-real-name { font-size: 0.72rem; color: #ccc; margin: 2px 0 6px; }
.examprep-pack-meta { font-size: 0.72rem; color: #999; margin-bottom: 8px; line-height: 1.4; }
.examprep-condition { font-size: 0.68rem; color: #d99; margin-bottom: 8px; line-height: 1.4; }
.examprep-condition-unlocked { color: #86efac; }
.examprep-format-note { font-size: 0.68rem; color: #86a; opacity: 0.85; margin-top: 6px; line-height: 1.4; }
.examprep-download-status { font-size: 0.7rem; color: #FDB827; margin-top: 2px; min-height: 1em; }

/* 3-sets-per-subject layout: each subject card lists its Set 1/2/3
   download rows instead of one single download button, since each
   subject now ships as 3 separate exam-length PDFs rather than one
   combined pack (see js/exam-prep.js's cardHtml()). */
.examprep-set-list { margin: 4px 0 2px; }
.examprep-set-row {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-bottom: 6px;
}
.examprep-set-label { font-size: 0.75rem; color: #ccc; flex: 1 0 auto; min-width: 70px; }
.examprep-set-row .assess-start-btn, .examprep-set-row .assess-locked-btn {
    width: auto; padding: 6px 12px; font-size: 0.72rem; flex: 0 0 auto;
}
.examprep-set-row .examprep-download-status { flex-basis: 100%; }

/* Exam Success Guide — a single featured card above the subject grids,
   not a repeating grid entry, so it gets its own narrower layout and a
   gold accent border to read as a highlighted perk rather than just
   another pack. */
.examprep-section-intro { font-size: 0.8rem; color: #ccc; margin: -4px 0 10px; }
.examprep-guide-grid { grid-template-columns: 1fr; max-width: 480px; }
.examprep-guide-card { border: 1px solid rgba(253, 184, 39, 0.4); }

.cxc-links-section { margin-top: 30px; }
.cxc-links-section h2 { color: #FDB827; font-size: 1.05rem; margin-bottom: 6px; }
.cxc-links-section > p { color: #ccc; font-size: 0.8rem; margin-bottom: 12px; }
.cxc-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cxc-link-card {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 14px;
    padding: 14px;
    color: #f5e7c8;
    text-decoration: none;
    display: block;
    border: 1px solid rgba(255,255,255,0.08);
}
.cxc-link-card:hover { border-color: #FDB827; }
.cxc-link-card h3 { font-size: 0.9rem; margin-bottom: 4px; color: #FDB827; }
.cxc-link-card p { font-size: 0.72rem; color: #ccc; margin: 0; }

/* ============================================================
   Practice page (practice.html / js/practice.js) — Speed Round.
   A gamified, timed spin on the same practice-bank subject cards
   in #practiceSubjectGrid: reuses .assess-card/.assess-start-btn
   above and .quiz-option/.quiz-block/.modal-content from
   css/style.css; these rules only add what's unique to the
   round-level countdown + streak/score HUD + per-subject best
   badge (sql/133_speed_round.sql). See js/practice.js's
   openSpeedRoundSession().
   ============================================================ */
.speed-round-start-btn { margin-top: 6px; background: #FDB827; }
.speed-round-best-badge { font-size: 0.72rem; color: #86efac; margin-top: 6px; min-height: 1em; }

.speed-round-hud {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px; margin-bottom: 8px; flex-wrap: wrap;
}
.speed-round-timer {
    font-size: 1.3rem; font-weight: bold; color: #006633;
    background: #f0f0e8; border-radius: 10px; padding: 4px 12px; min-width: 3em; text-align: center;
}
.speed-round-timer.speed-round-timer-urgent { color: #b91c1c; background: #fde2e2; }
.speed-round-score { font-size: 0.85rem; font-weight: bold; color: #1a1a2e; }
.speed-round-streak { font-size: 0.85rem; color: #b45309; }
.speed-round-progress { font-size: 0.72rem; color: #666; margin-bottom: 8px; }

/* Instant per-tap feedback, distinct from the review-mode coloring
   .quiz-feedback uses after a whole set is submitted (regular
   Practice) — here only one question is ever visible at a time. */
.quiz-option.speed-round-correct { background: #bbf7d0; border-color: #16a34a; font-weight: bold; }
.quiz-option.speed-round-incorrect { background: #fecaca; border-color: #b91c1c; font-weight: bold; }
.speed-round-best-line { text-align: center; font-size: 0.85rem; color: #b45309; font-weight: bold; margin: -6px 0 12px; }
