/* ==========================================================================
   FormReady — document-validator.css  (page stylesheet, Document Validator)
   Owner: Kai (frontend) · Tokens/components come from styles.css +
   components.css (loaded first); this file only adds validator-specific
   layout built from the same :root tokens — no new colours. Mobile-first
   (usable at 390px). Status is never colour-only: every row carries the
   PASS / FAIL / INFO word in its badge next to the colour.
   ========================================================================== */

/* --- spec line under the document picker ---------------------------------- */
.validator-spec {
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
}
.validator-spec--verified {
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}
.validator-spec--guidance {
  background: var(--color-warning-soft);
  border-color: var(--color-warning-border);
  color: var(--color-warning);
}

/* --- report ----------------------------------------------------------------- */
.validator-report-for {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  margin-top: var(--space-2);
  overflow-wrap: anywhere;
}

.validator-report-list {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
}

.validator-row {
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
}
.validator-row--pass { border-color: var(--color-accent); }
.validator-row--fail { border-color: var(--color-destructive); }

.validator-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.validator-row-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-base);
}

.validator-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 2px solid var(--color-border);
  background: var(--color-muted);
  color: var(--color-muted-foreground);
}
.validator-badge--pass {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}
.validator-badge--fail {
  background: var(--color-destructive-soft);
  color: var(--color-destructive);
}

.validator-row-detail {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.validator-row-fixes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.validator-row-fixes .btn { flex: 1 1 150px; }
@media (min-width: 768px) {
  .validator-row-fixes .btn { flex: 0 1 auto; }
}

/* --- printing: the report is the artefact; controls stay on screen -------- */
@media print {
  .validator-no-print { display: none !important; }
  .validator-row { break-inside: avoid; }
  .validator-row--pass, .validator-row--fail { border-color: var(--color-border); }
}

@media (prefers-reduced-motion: reduce) {
  .validator-row, .validator-spec { transition: none !important; }
}
