/* Practice exams: overview cards, the timer and the result. Tokens come from main.css. */

.exam-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  margin-bottom: 56px;
}
.exam-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 10px;
  padding: 22px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1.5px solid var(--line);
}
.exam-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 0.92rem; color: var(--ink-2); }
.exam-card__title { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; line-height: 1.2; }
.exam-card__summary { color: var(--ink-2); font-size: 0.97rem; }
.exam-card__parts { display: flex; flex-wrap: wrap; gap: 6px; }
.exam-card__parts li { padding: 2px 10px; border-radius: 999px; background: var(--band); font-size: 0.88rem; }
.exam-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.exam-card__status { font-size: 0.92rem; color: var(--ink-2); }
.exam-card__status.is-passed { color: #1F6437; font-weight: 600; }
.exam-history { margin-bottom: 24px; }
.exam-history__table { width: 100%; }

/* Timer: stays visible while scrolling through an exercise. */
.exam-timer {
  position: sticky;
  top: 84px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 14px rgba(29, 43, 36, 0.18);
}
.exam-timer[hidden] { display: none; }
.exam-timer.is-low { background: var(--wrong); }

/* Overview and result inside the exam player */
.exam-part { font-weight: 600; }
.exam-facts, .exam-rules { display: grid; gap: 6px; margin: 12px 0 4px; padding-left: 20px; list-style: disc; }
.exam-rules__title { margin-top: 18px; font-weight: 600; }
.exam-timeleft { font-weight: 600; }
.exam-verdict { font-family: var(--font-display); font-size: 1.5rem; }
.exam-result.is-passed .exam-verdict { color: #1F6437; }
.exam-table { margin-top: 16px; }
.exam-meta { margin-top: 10px; color: var(--ink-2); font-size: 0.95rem; }

.exam-result .form__alert {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--r-s);
  background: var(--die-soft);
  border: 1.5px solid var(--die);
  font-weight: 500;
}
.exam-table th:last-child, .exam-table td:last-child { text-align: right; }
.exam-history__table th, .exam-history__table td { text-align: left; padding-right: 24px; white-space: nowrap; }
.exam-history__table td:last-child, .exam-history__table th:last-child { text-align: right; padding-right: 0; }
