/* Native patient registration form for spravatotreatmentcenters.com (2026-10-11).
   Replaces the Airtable iframe so registrations can be measured. Ported from the
   spravatonj.com /get-started/ form, re-coloured to STC's palette and scoped under
   .stc-reg so nothing leaks into the Mobirise theme. Posts JSON to /stc-patient-reg/. */
.stc-reg {
  --ink: #1f1d2b; --ink-soft: #3d3a4d; --muted: #5f5a6e;
  --line: #e6e1d6; --line-hard: #cfc7b8;
  --accent: #200960; --accent-dim: #14053f; --accent-tint: #f6f3ee; --warm: #b5603f;
  --paper: #ffffff; --radius: 6px;
  --font-ui: 'Be Vietnam', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Cormorant Garamond', Georgia, serif;
  --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem;
  color: var(--ink); font-family: var(--font-ui); font-size: 1rem; line-height: 1.55;
  max-width: 880px; margin: 0 auto;
}
.stc-reg * { box-sizing: border-box; }
.stc-reg .form-card { background: var(--paper); border: 1px solid var(--line-hard); border-radius: 10px; padding: var(--s-6);
  box-shadow: 0 1px 2px rgba(20,22,26,.05), 0 10px 28px -18px rgba(20,22,26,.28); }
.stc-reg .form-card > h2 { font-family: var(--font-head); font-weight: 600; font-size: 2rem; color: var(--accent); margin: 0 0 var(--s-3); }
.stc-reg .lf-consent { font-size: .875rem; color: var(--muted); margin: 0 0 var(--s-5); max-width: 44rem; }
.stc-reg .reg-form { display: flex; flex-direction: column; gap: var(--s-6); }
.stc-reg fieldset { border: 0; border-top: 1px solid var(--line-hard); padding: var(--s-5) 0 0; margin: 0; min-width: 0; }
.stc-reg legend { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; color: var(--accent);
  padding: 0 var(--s-3) 0 0; margin: 0; width: auto; float: none; line-height: 1.2; }
.stc-reg legend .n { font-family: var(--font-ui); font-size: .875rem; font-weight: 600; color: var(--warm); margin-right: var(--s-2); }
.stc-reg .fs-note { font-size: .875rem; color: var(--muted); margin: var(--s-2) 0 var(--s-4); max-width: 44rem; }
.stc-reg .lf-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 560px) { .stc-reg .lf-grid { grid-template-columns: 1fr 1fr; } }
.stc-reg .lf-full { grid-column: 1 / -1; }
.stc-reg .lf-field label { display: block; font-size: .875rem; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.stc-reg .req { color: var(--warm); }
.stc-reg .lf-field input, .stc-reg .lf-field select, .stc-reg .lf-field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font-family: var(--font-ui); font-size: 1rem; line-height: 1.4;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line-hard); border-radius: var(--radius); }
.stc-reg .lf-field textarea { min-height: 96px; resize: vertical; }
.stc-reg .lf-field input:focus, .stc-reg .lf-field select:focus, .stc-reg .lf-field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.stc-reg [aria-invalid="true"] { border-color: var(--warm) !important; background: #fbeee8 !important; }
.stc-reg .lf-hint { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.stc-reg .lf-choices { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin: 0; padding: 0; border: 0; }
.stc-reg .lf-choices.stack { flex-direction: column; gap: var(--s-2); }
.stc-reg .lf-choices label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; margin: 0; cursor: pointer; }
.stc-reg .lf-choices input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex: none; margin: 0; }
.stc-reg .lf-q { grid-column: 1 / -1; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.stc-reg .lf-q > .q { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 4px; }
.stc-reg .lf-q[data-invalid="true"] { background: #fbeee8; }
.stc-reg .lf-q[data-invalid="true"] > .q { color: var(--warm); }
.stc-reg .reg-cond[hidden] { display: none; }
.stc-reg .reg-crisis { background: var(--accent-tint); border-left: 3px solid var(--accent); padding: var(--s-4); font-size: .875rem; margin-top: var(--s-4); }
.stc-reg .reg-crisis a, .stc-reg .lf-field a, .stc-reg .fs-note a { color: var(--accent); text-decoration: underline; }
.stc-reg .lf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.stc-reg .cta { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start;
  font-family: var(--font-ui); font-weight: 600; font-size: 1rem; padding: 13px 26px; border-radius: 999px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; min-height: 48px; transition: background .2s; }
.stc-reg .cta:hover { background: var(--accent-dim); }
.stc-reg .cta .arw { transition: transform .25s; }
.stc-reg .cta:hover .arw { transform: translateX(4px); }
.stc-reg .cta[disabled] { opacity: .65; cursor: progress; }
.stc-reg .lf-status { min-height: 1.5em; font-size: .9375rem; margin: 0; }
.stc-reg .lf-status[data-state="error"] { color: var(--warm); font-weight: 600; }
.stc-reg .lf-status[data-state="ok"] { color: var(--ink-soft); }
@media (max-width: 560px) { .stc-reg .form-card { padding: var(--s-5) var(--s-4); } .stc-reg .form-card > h2 { font-size: 1.6rem; } }
