/* exam.css ─ mock-test exam UI overrides.
   Loaded after question.css. Adds the question-number bar, exam progress
   counter, Prev/Next/Submit nav, and overrides .opt selection styling so the
   candidate never sees green/red feedback during the test. */

.qview--exam .qbar {
  margin-bottom: 14px;
}
.exam-progress {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink2);
  letter-spacing: 0.02em;
}
.exam-progress strong {
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 14px;
  margin: 0 2px;
}

.qnum-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 6px;
  padding: 12px;
  margin-bottom: 18px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 601px) {
  .qnum-bar {
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 8px;
    padding: 14px;
  }
}
.qnum {
  background: var(--bg);
  border: 1.5px solid var(--rule);
  color: var(--ink2);
  font: 600 13px var(--mono);
  height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-transition:
    background 0.12s,
    border-color 0.12s,
    transform 0.08s;
  transition:
    background 0.12s,
    border-color 0.12s,
    transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  padding: 0;
}
.qnum:hover {
  border-color: var(--primary);
  background: var(--paper);
}
.qnum:active {
  transform: translateY(1px);
}
.qnum.answered {
  background: var(--correct-bg);
  border-color: var(--correct);
  color: var(--correct);
}
.qnum.unanswered {
  background: var(--bg);
}
.qnum.current {
  border-width: 2px;
  border-color: var(--primary);
  color: var(--primary);
  background: var(--paper);
  box-shadow: 0 0 0 2px rgba(29, 53, 87, 0.18);
}
.qnum.current.answered {
  background: var(--correct-bg);
  color: var(--correct);
  border-color: var(--correct);
  box-shadow: 0 0 0 2px rgba(61, 106, 58, 0.25);
}
.qnum.flagged::after {
  content: "★";
  position: absolute;
  top: -2px;
  right: 2px;
  font-size: 10px;
  color: var(--accent);
  pointer-events: none;
}
.qnum:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* In exam mode, options show selection only — never green/red. */
.qview--exam .opt.selected {
  border-color: var(--primary);
  background: rgba(29, 53, 87, 0.05);
}
.qview--exam .opt.selected .key {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
}

.exam-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.exam-nav .btn {
  min-width: 120px;
}
.exam-nav .btn[data-act="prev"] {
  margin-right: auto;
}
.exam-nav .btn[data-act="clear"] {
  font-size: 12px;
  padding: 10px 14px;
}
@media (max-width: 600px) {
  .exam-nav {
    flex-direction: row;
  }
  .exam-nav .btn {
    flex: 1;
    min-width: 0;
    padding: 12px 10px;
    font-size: 13px;
  }
  .exam-nav .btn[data-act="clear"] {
    flex: 0 0 auto;
    font-size: 11px;
  }
}

.exam-submit-row {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.exam-submit-hint {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
}
