/* Small additions on top of Bootstrap. Colours use Bootstrap's CSS variables. */

.question-text {
  font-size: 1.1rem;
  line-height: 1.6;
  white-space: pre-line; /* keep line breaks that exist in the source text */
}

/* Each option is a clickable row containing the input and its text. */
.option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  cursor: pointer;
  background: var(--bs-body-bg);
}
.option:hover { border-color: var(--bs-primary); }
.option:has(input:focus-visible) { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.option input { margin-top: 0.3rem; flex: none; }
.option-letter { font-weight: 700; margin-right: 0.35rem; }
.option-text { overflow-wrap: anywhere; }

/* States applied after the answer is submitted. */
.option.is-locked { cursor: default; }
.option.is-selected { border-color: var(--bs-primary); background: var(--bs-primary-bg-subtle); }
.option.is-correct { border-color: var(--bs-success); background: var(--bs-success-bg-subtle); }
.option.is-wrong { border-color: var(--bs-danger); background: var(--bs-danger-bg-subtle); }
/* Text marker so the result is not conveyed by colour alone. */
.option-flag { margin-left: auto; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }

.explanation p { margin-bottom: 0.75rem; overflow-wrap: anywhere; }

.stat { border-radius: var(--bs-border-radius); padding: 0.75rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-correct { background: var(--bs-success-bg-subtle); }
.stat-incorrect { background: var(--bs-danger-bg-subtle); }
.stat-skipped { background: var(--bs-secondary-bg); }

@media (max-width: 575.98px) {
  .card-body { padding: 1rem !important; }
  .card-footer .btn { flex: 1 1 auto; }
}
