/* Tests — the upcoming quiz/test list and the per-test analysis page.
   Token-driven throughout, so light and dark both come from css/base.css. */

/* ---- list: one bordered block of rows, like the app list ---- */
.test-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}
.test-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-3);
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: left;
}
.test-row:last-child { border-bottom: 0; }
.test-row:hover { background: var(--surface-2); }
.test-row-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: var(--fs-md);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Two lines on a phone: one line showed a third of a long title. */
@media (max-width: 760px) {
  .test-row-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* ---- class chip ----
   Also on every Home "At a glance" row (Focus now, Next quiz/test, Due this
   week) and in the Question Bank. Loaded globally from index.html, so it is
   shared rather than duplicated per view. */
.class-chip {
  /* The same 20px height as .badge (issue #16 F-57); inline-block, not
     inline-flex, so the ellipsis still works. */
  display: inline-block;
  flex-shrink: 0;
  max-width: 140px;
  padding: 0 var(--sp-2);
  line-height: 1.25rem;
  border-radius: var(--radius);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- detail header ---- */
.test-head { margin-bottom: var(--sp-3); }
.test-head h2 { font-size: var(--fs-xl); margin: var(--sp-3) 0 var(--sp-2); }
.test-head-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.test-course-name { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---- analysis panel (chapter pills reuse .chapter-tag, the related list
   reuses the .assess-* rules from css/course-hub.css) ---- */
.test-analysis {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--sp-1) var(--sp-4) var(--sp-4);
}
.chapter-row { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: var(--sp-0) 0; }
.test-none { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---- coursework to review: the title is the button that opens the file ----
   .assess-related* come from css/course-hub.css (the course page shares them); these
   rules stay scoped to .test-analysis so that page is left alone. */
.test-analysis .assess-related-doc {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.assess-doc-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  text-align: left;
  cursor: pointer;
}
.assess-doc-btn:hover { text-decoration: underline; }
.assess-doc-btn:disabled { color: var(--text-muted); cursor: default; text-decoration: none; }
.assess-related-why {
  font-size: var(--fs-xs);
  color: var(--text);
  line-height: var(--lh);
  margin-top: var(--sp-0);
}

/* ---- action row: notes / deck / plan ---- */
.test-action-block {
  margin-top: var(--sp-4);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-3);
}
.test-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.test-action-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: var(--lh);
}
.test-action-status:not(:empty) { margin-top: var(--sp-3); }
.test-action-note { font-size: var(--fs-xs); color: var(--text-muted); line-height: var(--lh); }
.test-action-note:not(:empty) { margin-top: var(--sp-2); }
.test-action-err { color: var(--danger); }
.test-action-src { font-size: var(--fs-2xs); }
.test-plan-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.test-plan-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text);
}
.test-plan-date { min-width: 92px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.test-plan-mins { margin-left: auto; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---- hint box ---- */
.hint-box {
  margin-top: var(--sp-4);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-3);
}
.hint-label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--sp-2); }
.hint-input { width: 100%; resize: vertical; }
.hint-actions { margin-top: var(--sp-2); display: flex; gap: var(--sp-2); }

/* ---- Home "Next career fair" card (restored) — these two classes come from
   the pre-refactor home.js and lost their rules in the styles.css rewrite. */
.today-fair { display: flex; flex-direction: column; gap: var(--sp-2); }
.today-sub { font-size: var(--fs-xs); color: var(--text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
