/* =============================================================
   Forms — JSHW

   The contact form's fields and the availability table that sits
   alongside it on Reach Out.

   Structure only. Every value is a token from tokens.css — no
   hard-coded hex, spacing or type values in here (see CLAUDE.md).

   Load order: 6th and last, after components.css. See the stylesheet
   block in _includes/layouts/base.njk for the full order.
   ============================================================= */

/* --- Contact form -------------------------------------------------- */

.form-field {
  margin: 0 0 var(--space-m);
  max-width: 32rem;
}

.form-field label {
  display: block;
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-3xs);
}

.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  padding: var(--space-2xs) var(--space-xs);
  min-height: var(--target-comfortable);
}

.form-field textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-field--checkbox {
  display: flex;
  align-items: start;
  gap: var(--space-2xs);
}

/* Equal specificity (0,1,1) to `.form-field input` above and relies on
   source order to win. Both rules must stay in this file, in this
   order — splitting them apart is the one edit that would silently
   break the checkbox layout. */
.form-field--checkbox input {
  width: auto;
  min-height: auto;
  margin-top: 0.3em;
}

.form-field--checkbox label {
  font-weight: var(--weight-normal);
}

/* Honeypot — visually hidden, not display:none (real assistive-tech
   users who do land on it via non-tab-order traversal still get a
   real label telling them to leave it blank), out of tab order.
   clip -> clip-path 2 Sep 2026, same reason as .visually-hidden in
   base.css. That constraint is what matters here: this must stay
   visually hidden but still reachable, so display:none is not an
   option however much simpler it looks. */
.form-field--honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Availability table -------------------------------------------- */

.availability {
  border-collapse: collapse;
  margin: var(--space-l) 0;
}

.availability th,
.availability td {
  text-align: left;
  padding: var(--space-2xs) var(--space-m) var(--space-2xs) 0;
  border-bottom: 1px solid var(--color-border);
}
