/* Therapy Center: the form pages (Request Care and its thank-you page; the Careers page, its resume drop area and
   its thank-you page with the receipt, Build 7; Build 5 reuses this for the referral form). Builds on the tokens and
   the shared form rules in /assets/css/site.css (section 19). No new colours: every colour here is a role token
   (text, muted, heading on the surface and the page; the button pair for the part numbers; the success, error and
   link colours of the drop area's states), each pair in tools/check-contrast.py. Ported from the sister site's form
   stylesheet without its legal parts; the drop area is ported as reviewed there. */

/* ======================================================================
   1. Form page layout: the form on the left, "What happens next" beside it from 1024px
   ====================================================================== */
.form-layout { display: grid; gap: var(--space-l); align-items: start; }
@media (min-width: 1024px) {
  .form-layout { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); }
}
.form-layout__main, .form-layout__aside { display: grid; gap: var(--space-m); min-width: 0; }

/* The side column follows the form (card 126; Tim, 2026-11-16: "can we make sure this moves with the page scoling").
   Where it sits beside the form (from 1024px), it sticks 1rem below the sticky header (its height is the header's own
   token) and stops at the end of the form: it keeps its own height (align-items: start, above), and a sticky grid item
   stays in its grid area, the form's row. On Careers the two cards are one column, so they move together. It is never
   cut off: each page's column sticks only where the window can show all of it below the header; in a shorter window it
   scrolls as before. Heights measured in headless Chrome on 2026-11-16 at 1024px wide (where the column is narrowest
   and tallest), every disclosure open: the referral card 449px, the Request Care card 595px, the Careers stack 1652px
   (1064px closed). Each threshold is the header at its tallest (77px), the 1rem gap, that height and a 24px margin,
   rounded up: 600px, 720px and 1800px, written in em so it grows with the visitor's text size. Re-measure if a card's
   words change. No animation (nothing moves but the page) and no JavaScript. */
@media (min-width: 1024px) and (min-height: 37.5em) {
  .form-layout__aside--follow-referral { position: sticky; top: calc(var(--header-h) + 1rem); }
}
@media (min-width: 1024px) and (min-height: 45em) {
  .form-layout__aside--follow-request { position: sticky; top: calc(var(--header-h) + 1rem); }
}
@media (min-width: 1024px) and (min-height: 112.5em) {
  .form-layout__aside--follow-careers { position: sticky; top: calc(var(--header-h) + 1rem); }
}

.form-crisis { margin: 0; }

.form-card {
  padding: clamp(1.25rem, 0.6rem + 2.8vw, 2.75rem);
  background: var(--color-surface);
  border: 1px solid rgba(var(--edge-rgb), 0.07);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.form-card__title { font-size: var(--step-3); margin-bottom: 0.35em; }
.form-privacy { margin-bottom: var(--space-l); }
/* The one-line pointer to the Auto No-Fault guide above the Request Care form (Build 8): quiet, in the muted colour. */
.form-guide { margin: calc(-1 * var(--space-s)) 0 var(--space-l); color: var(--color-muted); }

/* Form parts: numbered groups of the required questions. The number sits in the button colours (teal with stone
   or dark text), the pair the contrast check already covers. */
.form-part { display: grid; gap: 1.35rem; padding-top: var(--space-l); border-top: 1px solid var(--color-border); }
.form-part__title { display: flex; align-items: center; gap: 0.75rem; font-size: var(--step-2); margin: 0; }
.form-part__num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-button);
  color: var(--color-on-button);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}
.form-part__note { margin: 0; font-size: var(--step--1); color: var(--color-muted); max-width: 62ch; }
.form-part__note a { font-weight: 600; }
/* The last part (consent) has no heading; it sits right above the send button. */
.form-part--final { gap: 0.75rem; }

/* The resume drop area (Build 7; the sister site's reviewed kit). forms.js builds it around the file input from the
   page's <template> (dropzoneTemplate() in components.mjs); without JavaScript the plain file input shows.
   States: empty (dashed), dragging (.is-dragover), ready (.is-ready) and wrong file (.is-wrong).
   Colours are role tokens only; the pairs are in tools/check-contrast.py ("the resume drop area"). */
.dropzone {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius);
  background: var(--color-surface);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
/* The native input stays the real control: visually hidden but focusable (never display:none), first in
   the area, so its keyboard focus ring can be drawn on the pill (empty) or on "choose another" (a file). */
.dropzone > input.dropzone__input[type='file'] {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.dropzone__input:focus-visible + .dropzone__empty .dropzone__button { outline: 3px solid var(--focus); outline-offset: 3px; }
.dropzone__input:focus-visible ~ .dropzone__again label { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Empty: the whole area opens the file dialog. */
.dropzone__empty { display: grid; justify-items: center; gap: 0.3rem; padding: 1.25rem 0.5rem 1.4rem; text-align: center; cursor: pointer; }
.dropzone__disc { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 0.4rem; border-radius: 50%; background: var(--color-tint); color: var(--color-link); }
.dropzone__title { margin: 0; font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; line-height: 1.3; color: var(--color-heading); }
.dropzone__line { margin: 0; color: var(--color-muted); }
.dropzone__drag { display: none; }
/* A picture of the site's small ghost button; the input behind it is the control. */
.dropzone__button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.7rem;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--color-heading);
  border-radius: var(--radius-pill);
  color: var(--color-heading);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease);
}
.dropzone__empty:hover .dropzone__button { background: var(--color-tint); }
.dropzone__status:empty { display: none; }

/* A file is chosen (ready, or a wrong file): the card replaces the empty area. */
.dropzone.is-ready, .dropzone.is-wrong { border-style: solid; }
.dropzone.is-ready { border-color: var(--color-success); }
.dropzone.is-wrong, .field.has-error .dropzone:not(.is-dragover) { border-color: var(--color-error); }
.dropzone.is-ready .dropzone__empty, .dropzone.is-wrong .dropzone__empty { display: none; }
.dropzone__again { display: none; margin: 0 0 0.15rem; font-size: var(--step--1); text-align: center; color: var(--color-muted); }
.dropzone.is-ready .dropzone__again, .dropzone.is-wrong .dropzone__again { display: block; }
.dropzone__again label { color: var(--color-link); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.dropzone__again label:hover { color: var(--color-heading); text-decoration-thickness: 2px; }
/* The card wraps on a narrow screen: the name keeps at least ~11rem and Remove moves to its own line. */
.dropzone__card { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.85rem; padding: 0.8rem 0.6rem 0.8rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-page); }
.dropzone__file-icon { display: block; flex: none; color: var(--color-label); }
.dropzone__file { flex: 1 1 11rem; min-width: 0; }
.dropzone__name { margin: 0; font-weight: 600; line-height: 1.35; color: var(--color-text); overflow-wrap: anywhere; }
.dropzone__ready, .dropzone__cant { display: flex; align-items: center; gap: 0.3rem; margin: 0.2rem 0 0; font-size: var(--step--1); font-weight: 600; line-height: 1.35; }
.dropzone__ready { color: var(--color-success); }
.dropzone__cant { color: var(--color-error); }
.dropzone__remove {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
  margin-left: auto;
  padding: 0 0.7rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--color-link);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.dropzone__remove:hover { background: var(--color-tint); color: var(--color-heading); }

/* Dragging a file over the area (last, so it wins over the states above). */
.dropzone.is-dragover { border-style: solid; border-color: var(--color-link); background: var(--color-tint); }
.dropzone.is-dragover .dropzone__disc { background: var(--color-surface); }
.dropzone.is-dragover .dropzone__idle { display: none; }
.dropzone.is-dragover .dropzone__drag { display: inline; }
.dropzone.is-dragover .dropzone__button { visibility: hidden; }

/* The notice for a referring provider (shown by forms.js when that choice is picked; hidden otherwise). */
.form-redirect { margin: 0; }
.form-redirect .arrow-link { margin-top: 0.35rem; }

/* The optional questions: one closed <details class="more"> (the disclosure itself is styled in site.css).
   Here it only gets the same divider as a form part, and spacing for the fields inside. */
.tc-form .form-optional { margin: 0; padding-top: var(--space-m); border-top: 1px solid var(--color-border); }
.tc-form .form-optional > .more__body { display: grid; gap: 1.35rem; padding-top: 1rem; }

.field-row { display: grid; gap: 1.35rem; align-items: start; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Long checkbox lists read better in two columns once there is room. */
@media (min-width: 640px) {
  .field--group[data-layout='columns'] .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
}

.field__counter.is-near-limit { color: var(--color-text); font-weight: 600; }

/* Status box added by forms.js (the preview notice, a send failure, the bot check's messages). */
.form-notice { flex-direction: column; gap: 0.35rem; }
.form-notice p { margin: 0; }
.form-notice a { font-weight: 600; }

/* Cloudflare Turnstile: the bot check, drawn by forms.js into [data-turnstile] above the status line. Flexible width
   (Cloudflare's "flexible" size fills its container from 300px up); empty, and so flat, without a site key. */
.turnstile:not(:empty) { margin-top: var(--space-s); }

.tc-form .form-actions { padding-top: var(--space-s); }
@media (max-width: 479.98px) {
  .tc-form .form-actions .btn { width: 100%; }
}

/* The side card: "What happens next" (the shared steps, stacked and compact), the phone, the hours. */
.aside-card {
  position: relative;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  background: var(--color-surface);
  border: 1px solid rgba(var(--edge-rgb), 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.aside-card > :last-child { margin-bottom: 0; }
.aside-card__title { font-size: var(--step-2); margin-bottom: 0.6em; }
.aside-card__talk { margin: 1.25rem 0 0.75rem; }
.aside-card__hours { margin: 1rem 0 0; font-size: var(--step--1); color: var(--color-muted); }

/* ======================================================================
   2. Thank-you page
   ====================================================================== */
.thanks-card {
  max-width: 44rem;
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  background: var(--color-surface);
  border: 1px solid rgba(var(--edge-rgb), 0.07);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.thanks-card > :last-child { margin-bottom: 0; }
.thanks-card__title { font-size: var(--step-3); margin-bottom: 1.25rem; }
.thanks-card__talk { margin: 1.75rem 0 0.75rem; }
.thanks-card__link { margin: 1.25rem 0 0; }
.thanks-crisis { max-width: 44rem; margin-top: var(--space-m); }

/* The receipt on the careers thank-you page (Build 7): the files the receiver confirmed it saved, filled by
   forms.js from this tab's storage; hidden until then. */
.receipt { max-width: 44rem; margin: 0 0 var(--space-m); padding: 1.25rem 1.5rem; background: var(--color-success-bg); border: 1px solid var(--color-success-border); border-radius: var(--radius); }
.receipt__title { margin: 0 0 0.5rem; font-weight: 600; color: var(--color-success); }
.receipt__list { margin: 0; padding-left: 1.25rem; overflow-wrap: anywhere; }
.receipt__when { margin: 0.5rem 0 0; font-size: var(--step--1); }
.receipt__when:empty { display: none; }

/* ======================================================================
   3. Careers (Build 7): the "why" points, the path from RBT to BCBA, the open roles, the aside's second card
   ====================================================================== */
.points { display: grid; gap: var(--space-m); margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) {
  .points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
}
.point__title { font-size: var(--step-1); margin: 0 0 0.35em; }
.point__text { margin: 0; max-width: 40ch; }

.path__note { margin: var(--space-m) 0 0; max-width: 62ch; }

.roles { display: grid; gap: var(--space-s); margin: 0; padding: 0; list-style: none; }
.role {
  padding: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  background: var(--color-surface);
  border: 1px solid rgba(var(--edge-rgb), 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.role__title { font-size: var(--step-1); margin: 0 0 0.3em; }
.role__text { margin: 0; max-width: 62ch; }

.form-card__intro { margin: 0 0 var(--space-m); max-width: 62ch; }
.aside-card + .aside-card { margin-top: var(--space-m); }
.aside-card--tint { background: var(--color-tint); }
.aside-card .more { margin: 0.75rem 0 0; }
