/* ═══════ QUIZ PAGE STYLES ═══════
   Styles specific to the quiz page (quiz.html).
   ═══════════════════════════════════ */

/* Override subtitle alignment for quiz */
.subtitle { text-align: center; }

/* Extra bottom margin on quiz sections */
.section { margin-bottom: 24px; }

/* ═══════ QUIZ INTERACTION STYLES ═══════ */

.quiz-option {
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}
.quiz-option:hover {
  border-color: var(--mid-blue);
  background: #f8f9fc;
}
.quiz-option.selected {
  border-color: var(--mid-blue);
  background: #f8f9fc;
  box-shadow: 0 0 0 1px var(--mid-blue);
}
.quiz-option.selected strong {
  color: var(--mid-blue);
}
.quiz-option:focus-visible {
  outline: 2px solid var(--mid-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Hidden explanation text inside correct options */
.explanation-text { display: none; }

/* ── INLINE FEEDBACK (shown below question on narrow screens) ── */
.feedback {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14.5px;
  line-height: 1.5;
}
.feedback.incorrect {
  display: block;
  background: var(--light-gray);
  border-left: 3px solid var(--secondary-gray);
  color: var(--text-secondary);
  font-weight: 600;
}
.feedback.correct {
  display: block;
  background: #fef9e7;
  border-left: 3px solid var(--accent-gold);
  color: var(--text-primary);
}
.feedback.correct strong {
  color: var(--mid-blue);
  font-weight: 700;
}

/* ── RIGHT FEEDBACK RAIL (wide screens) ── */
.feedback-rail {
  position: fixed;
  top: 0; right: 0;
  width: var(--comment-width);
  height: 100vh; overflow-y: auto;
  padding: 40px 20px 60px 16px;
  background: var(--white);
  border-left: 1px solid #e2e5e9;
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
.feedback-rail::-webkit-scrollbar { width: 5px; }
.feedback-rail::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ── RAIL HEADER ── */
.rail-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e5e9;
}
.rail-header-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--primary-blue);
  margin-bottom: 6px;
}
.rail-header-hint {
  font-size: 12.5px;
  color: var(--secondary-gray);
  line-height: 1.5;
}

.rail-feedback-card {
  display: none;
  background: var(--light-gray);
  border-left: 3px solid var(--secondary-gray);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  transition: background .15s, border-left-color .15s;
}
.rail-feedback-card.visible {
  display: block;
}
.rail-feedback-card.correct {
  background: #fef9e7;
  border-left-color: var(--accent-gold);
  color: var(--text-primary);
}
.rail-feedback-card.incorrect {
  background: var(--light-gray);
  border-left-color: var(--secondary-gray);
  color: var(--text-secondary);
}
.rail-feedback-card .feedback-label {
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 6px;
}
.rail-feedback-card.correct .feedback-label {
  color: var(--mid-blue);
}
.rail-feedback-card.incorrect .feedback-label {
  color: var(--secondary-gray);
}
.rail-feedback-card .feedback-body strong {
  color: var(--mid-blue);
  font-weight: 700;
}

/* ── QUIZ FOOTER ── */
.quiz-footer {
  margin-top: 24px;
  padding-top: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.quiz-footer p { margin-bottom: 6px; }

/* ── WIDE SCREEN: use rail, hide inline feedback ── */
@media (min-width: 1381px) {
  .feedback { display: none !important; }
}

/* ── NARROW SCREEN: hide rail, show inline feedback ── */
@media (max-width: 1380px) {
  .feedback-rail { display: none; }
}
