/* --- Tables ------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
th,
td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
}
thead th {
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
}
tbody tr:nth-child(even) {
  background: var(--off-white);
}
td.numeric,
th.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Forms -------------------------------------------------------------- */

.field {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.field label {
  font-weight: 600;
}
.field .hint {
  font-size: 0.875rem;
  color: var(--ink-soft);
}
input,
select,
textarea {
  font: inherit;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  width: 100%;
}
textarea {
  min-height: 6rem;
  resize: vertical;
}

/* A required field that is empty is MARKED, not merely unfilled. On the review
 * screen an unknown category renders exactly like this, and that visibility is
 * the whole safety property — see docs/architecture/bookkeeping-queue.md §6. */
.field-required-empty input,
.field-required-empty select {
  border-color: var(--pink-text);
  background: #fff8fb;
}

.form-grid {
  display: grid;
  gap: 0 var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .form-grid.two-up {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Notices ------------------------------------------------------------ */

.notice {
  padding: var(--space-4);
  border-radius: var(--radius);
  margin-bottom: var(--space-6);
}
.notice-error {
  background: var(--error-bg);
  color: var(--error-ink);
}
.notice-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.notice-ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.notice ul {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-6);
}

.badge {
  display: inline-block;
  padding: 2px var(--space-3);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-confident {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.badge-weak {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.badge-none {
  background: var(--error-bg);
  color: var(--error-ink);
}

/* --- Choice lists (radios and checkboxes on the booking form) ------------- */

.label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.choice {
  display: block;
  padding: var(--space-2) 0;
}
.choice input {
  margin-right: var(--space-2);
}
.choice .hint {
  display: block;
  margin-left: var(--space-6);
}
.addon-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
.addon-group legend {
  font-weight: 700;
  padding: 0 var(--space-2);
}
