/* RegenOrtho Palm Beach — patient forms
   Loaded only on /forms/new-patient.html and /forms/peptide-glp-questionnaire.html.
   Tokens come from styles.css; nothing here overrides the design system. */

.form-section { padding-top: 2.6rem; }
.form-shell {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 2.6rem; align-items: start;
}

/* ------------------------------- step rail ------------------------------- */

.f-steps { position: sticky; top: calc(var(--header-h) + 20px); min-width: 0; }
.f-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.f-step {
  display: flex; align-items: baseline; gap: .7rem; width: 100%; text-align: left;
  background: none; border: 0; border-left: 2px solid rgba(9, 45, 92, .12);
  padding: .55rem .8rem; cursor: pointer; color: var(--muted);
  font: 600 .84rem/1.35 var(--sans); transition: color .2s, border-color .2s, background .2s;
}
.f-step > span:first-child { font: 800 .7rem/1 var(--sans); letter-spacing: .1em; color: #5C6C78; }
.f-step:hover { color: var(--navy-800); background: rgba(9, 45, 92, .04); }
.f-step.is-current { color: var(--navy-800); border-left-color: var(--gold); background: rgba(253, 201, 41, .1); }
.f-step.is-current > span:first-child { color: var(--bronze-text); }
.f-step.is-done > span:first-child { color: #2F7D4F; }
.f-step:focus-visible { outline: 2px solid var(--navy-800); outline-offset: 2px; }

/* ------------------------------ privacy card ----------------------------- */

.f-privacy {
  display: flex; gap: .85rem; align-items: flex-start;
  background: rgba(47, 125, 79, .07); border: 1px solid rgba(47, 125, 79, .32);
  border-radius: var(--r-md); padding: 1rem 1.15rem; margin-bottom: 1.8rem;
}
.f-privacy[hidden] { display: none; }   /* a class display: beats the UA [hidden] rule */
.f-privacy svg { flex: none; color: #1F6B41; margin-top: .1rem; }
.f-privacy p { margin: 0; font-size: .88rem; color: #2C4A3A; }
.f-privacy strong { color: #14512F; }

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

.f-required-note { font-size: .82rem; color: var(--muted); margin: 0 0 1.2rem; }
.req { color: #A4361B; font-weight: 700; }

.f-errors {
  background: rgba(164, 54, 27, .07); border: 1px solid rgba(164, 54, 27, .4);
  border-radius: var(--r-md); padding: .95rem 1.15rem; margin-bottom: 1.5rem; color: #7C2913;
}
.f-errors strong { display: block; margin-bottom: .4rem; font-size: .95rem; }
.f-errors ul { margin: 0; padding-left: 1.1rem; font-size: .87rem; }
.f-errors a { color: #7C2913; }

.f-sec-num {
  font: 800 .72rem/1 var(--sans); letter-spacing: .18em; color: var(--bronze-text);
  margin: 0 0 .5rem;
}
.f-sec h2 { font-size: 1.75rem; margin: 0 0 .35rem; }
.f-sec h2:focus { outline: none; }
.f-sec h2:focus-visible { outline: 2px solid var(--navy-800); outline-offset: 4px; }
.f-sec-intro { color: var(--muted); font-size: .92rem; margin: 0 0 1.4rem; }
.f-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem 1.4rem; margin-top: 1.2rem; }
.f-fields > * { grid-column: 1 / -1; margin: 0; }
.f-fields > .f-half { grid-column: span 1; }

.f-row { display: flex; flex-direction: column; gap: .35rem; }
.f-row label, .f-yesno legend, .f-checks legend {
  font: 700 .84rem/1.4 var(--sans); color: var(--navy-800); padding: 0;
}
.f-hint { font: 400 .78rem/1.45 var(--sans); color: var(--muted); }

.patient-form input[type="text"], .patient-form input[type="tel"],
.patient-form input[type="email"], .patient-form input[type="date"],
.patient-form select, .patient-form textarea {
  width: 100%; font: 400 .95rem/1.5 var(--sans); color: var(--navy-900);
  background: #fff; border: 1px solid #B9C6D2; border-radius: 10px;
  padding: .65rem .8rem; transition: border-color .18s, box-shadow .18s;
}
.patient-form textarea { resize: vertical; min-height: 84px; }
.patient-form input:focus, .patient-form select:focus, .patient-form textarea:focus {
  outline: none; border-color: var(--navy-800); box-shadow: 0 0 0 3px rgba(9, 45, 92, .16);
}
.patient-form input::placeholder, .patient-form textarea::placeholder { color: #778794; }
.patient-form [aria-invalid="true"] { border-color: #A4361B; }
.patient-form [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(164, 54, 27, .2); }

/* --------------------------- yes / no segments --------------------------- */

.f-yesno, .f-checks { border: 0; padding: 0; margin: 0; min-width: 0; }
.f-yesno {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1.2rem;
  align-items: center; padding: .8rem 0; border-bottom: 1px solid rgba(9, 45, 92, .1);
}
.f-yesno legend { float: left; width: 100%; margin-bottom: .3rem; }
.f-yesno legend + .f-hint { grid-column: 1; }
.f-yesno .f-seg { grid-column: 2; grid-row: 1; }
.f-yesno .f-follow { grid-column: 1 / -1; }

/* the segmented control: real radios, visually hidden, labels do the work */
.f-seg { display: inline-flex; border: 1px solid #B9C6D2; border-radius: 999px; overflow: hidden; background: #fff; }
.f-seg input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.f-seg label {
  padding: .48rem 1.15rem; cursor: pointer; font: 700 .8rem/1 var(--sans);
  color: var(--muted); transition: background .18s, color .18s; user-select: none;
}
.f-seg label + input + label { border-left: 1px solid #B9C6D2; }
.f-seg input:checked + label { background: var(--navy-800); color: #fff; }
.f-seg input:focus-visible + label { outline: 2px solid var(--navy-800); outline-offset: -2px; }
.f-seg input:checked + label:hover { background: var(--navy-800); }
.f-seg label:hover { background: rgba(9, 45, 92, .07); }

.f-follow { display: flex; flex-direction: column; gap: .3rem; margin-top: .5rem;
  padding-left: .9rem; border-left: 2px solid var(--gold); }
.f-follow[hidden] { display: none; }
.f-follow label { font: 600 .8rem/1.4 var(--sans); color: var(--muted); }

/* the medical-history block reads as a table of rows */
.f-sec-grid .f-fields { display: block; margin-top: .4rem; }
.f-sec-grid .f-yesno:first-of-type { border-top: 1px solid rgba(9, 45, 92, .1); }

/* ------------------------------- checkboxes ------------------------------ */

.f-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .55rem; margin-top: .7rem; }
.f-check { display: flex; align-items: flex-start; gap: .55rem; }
.f-check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--navy-800); cursor: pointer; }
.f-check label { font: 500 .88rem/1.4 var(--sans); color: var(--navy-900); cursor: pointer; }
.f-check input:focus-visible { outline: 2px solid var(--navy-800); outline-offset: 2px; }

.f-ack-text {
  background: var(--porcelain); border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0;
  padding: 1rem 1.2rem; font-size: .9rem; color: #2B3B48; margin: 0;
}
.f-ack { margin-top: 1.1rem; }
.f-save-opt { display: flex; flex-direction: column; gap: .35rem; margin-top: 1.6rem;
  padding-top: 1.3rem; border-top: 1px solid rgba(9, 45, 92, .12); }
.f-save-opt .f-hint { padding-left: 1.75rem; }

/* --------------------------------- nav ----------------------------------- */

.f-nav { display: flex; align-items: center; gap: 1rem; margin-top: 2.2rem;
  padding-top: 1.6rem; border-top: 1px solid rgba(9, 45, 92, .12); flex-wrap: wrap; }
.f-progress { margin: 0 auto; font: 700 .8rem/1 var(--sans); letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); order: -1; flex: 1; }
.f-nav .btn { min-width: 132px; justify-content: center; }

/* -------------------------------- summary -------------------------------- */

.f-done { max-width: 780px; }
.f-print-head { display: none; }
.f-done > h2 { margin: 0 0 .6rem; }
.f-done > h2:focus { outline: none; }
.f-done > p { color: var(--muted); }
.f-done-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.5rem 0 2.2rem; }

.f-summary { border: 1px solid rgba(9, 45, 92, .16); border-radius: var(--r-md); overflow: hidden; }
.f-summary h3 {
  font: 800 .74rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--bronze-text); background: var(--porcelain);
  margin: 0; padding: .8rem 1.1rem; border-bottom: 1px solid rgba(9, 45, 92, .1);
}
.f-summary h3 + dl { margin: 0; padding: .5rem 1.1rem 1rem; }
.f-summary dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: .1rem 1.2rem; }
.f-summary dt { font: 600 .84rem/1.5 var(--sans); color: var(--muted); padding: .42rem 0;
  border-top: 1px solid rgba(9, 45, 92, .07); }
.f-summary dd { margin: 0; font: 500 .89rem/1.5 var(--sans); color: var(--navy-900);
  padding: .42rem 0; border-top: 1px solid rgba(9, 45, 92, .07); }
.f-summary dl > dt:first-of-type, .f-summary dl > dt:first-of-type + dd { border-top: 0; }
.f-summary-meta { font-size: .82rem; color: var(--muted); padding: 0 1.1rem 1rem; margin: 0; }

.f-erase-row { margin-top: 1.6rem; }
.f-erase { background: none; border: 0; padding: 0; cursor: pointer;
  font: 600 .84rem/1 var(--sans); color: #7C2913; text-decoration: underline; }
.f-erase:focus-visible { outline: 2px solid #7C2913; outline-offset: 3px; }

/* ------------------------------ forms hub -------------------------------- */

.form-hub { padding-top: 3.2rem; }
.form-card-grid { max-width: 1060px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; }

.form-card {
  position: relative; display: flex; flex-direction: column; gap: .85rem;
  background: #fff; border: 1px solid rgba(9, 45, 92, .12); border-radius: var(--r-lg);
  padding: 2.1rem 2rem 1.9rem; overflow: hidden;
  box-shadow: 0 26px 50px -38px rgba(9, 45, 92, .5);
  transition: transform .38s var(--ease), border-color .38s, box-shadow .38s;
}
/* the gold hairline that reads as "premium" without shouting */
.form-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--gold), #F7DE8B 55%, transparent); }
.form-card:hover, .form-card:focus-within {
  transform: translateY(-5px); border-color: rgba(253, 201, 41, .75);
  box-shadow: 0 34px 60px -34px rgba(9, 45, 92, .55);
}

.form-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 16px; color: var(--navy-800);
  background: linear-gradient(150deg, rgba(253, 201, 41, .95), rgba(233, 196, 106, .6));
  box-shadow: 0 10px 20px -12px rgba(253, 201, 41, .95);
}
.form-card h2 { font-size: 1.62rem; margin: .2rem 0 0; line-height: 1.2; }
.form-card h2 a { color: var(--navy-900); text-decoration: none; }
/* the whole card is the click target, but only the heading is the real link */
.form-card h2 a::after { content: ""; position: absolute; inset: 0; }
.form-card h2 a:hover { color: var(--navy-800); }
.form-card h2 a:focus-visible { outline: 2px solid var(--navy-800); outline-offset: 4px; border-radius: 4px; }

.form-card-who { color: var(--muted); font-size: .93rem; margin: 0; }
.form-card-list { list-style: none; margin: .35rem 0 0; padding: 0;
  display: flex; flex-direction: column; gap: .5rem; }
.form-card-list li { position: relative; padding-left: 1.65rem;
  font-size: .89rem; color: #33465A; line-height: 1.5; }
.form-card-list li::before {
  content: ""; position: absolute; left: 0; top: .28rem; width: 15px; height: 15px;
  border-radius: 50%; background: rgba(253, 201, 41, .22);
  box-shadow: inset 0 0 0 1px rgba(160, 117, 20, .5);
}
.form-card-list li::after {
  content: ""; position: absolute; left: 4.4px; top: .5rem; width: 6px; height: 3.4px;
  border-left: 1.6px solid #74590A; border-bottom: 1.6px solid #74590A;
  transform: rotate(-45deg);
}

.form-card-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 0; }
.form-card-meta span {
  border: 1px solid rgba(9, 45, 92, .18); border-radius: 999px; padding: .32rem .8rem;
  font: 700 .68rem/1 var(--sans); letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted);
}
.form-card-go { margin-top: auto; padding-top: 1.5rem; }  /* pin the CTA so both cards line up */
.form-card-go .btn { pointer-events: none; }   /* decorative — the heading link owns the click */

/* --------------------------- how it works strip -------------------------- */

.form-steps-strip { list-style: none; max-width: 1060px; margin: 2.4rem auto 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.form-steps-strip li { display: flex; flex-direction: column; gap: .5rem;
  padding: 1.6rem 1.5rem; background: #fff; border-radius: var(--r-md);
  border: 1px solid rgba(9, 45, 92, .1); }
.fs-num { display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--navy-800); color: var(--gold);
  font: 800 .95rem/1 var(--sans); }
.form-steps-strip strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--navy-900); }
.form-steps-strip span:not(.fs-num) { font-size: .89rem; color: var(--muted); line-height: 1.55; }

/* ------------------------------ privacy panel ---------------------------- */

.privacy-panel { max-width: 1060px; margin: 0 auto; background: var(--navy-900);
  border-radius: var(--r-lg); padding: 2.4rem 2.4rem 2rem; color: #C9D6E4;
  border: 1px solid rgba(253, 201, 41, .2); }
.privacy-panel-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.9rem; }
.privacy-shield { flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: 18px; color: var(--gold);
  background: rgba(253, 201, 41, .12); border: 1px solid rgba(253, 201, 41, .3); }
.privacy-panel-head h2 { color: #fff; margin: .3rem 0 0; font-size: 1.85rem; }
.privacy-panel-head .eyebrow { color: var(--gold); }
.privacy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem 2.2rem; }
.privacy-grid strong { display: block; color: var(--gold); font: 800 .76rem/1.4 var(--sans);
  letter-spacing: .13em; text-transform: uppercase; margin-bottom: .4rem; }
.privacy-grid p { margin: 0; font-size: .91rem; line-height: 1.6; color: #B4C5D6; }
.privacy-foot { font-size: .88rem; color: #9FB2C6; margin: 2rem 0 0;
  padding-top: 1.4rem; border-top: 1px solid rgba(253, 201, 41, .16); }
.privacy-foot a { color: var(--gold); }

/* ------------------------------ responsive ------------------------------- */

@media (max-width: 1160px) {
  .form-shell { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .f-steps { position: static; }
  .f-steps ol { flex-direction: row; overflow-x: auto; gap: .4rem; padding-bottom: .4rem;
    scrollbar-width: thin; }
  .f-step { border-left: 0; border-bottom: 2px solid rgba(9, 45, 92, .12);
    white-space: nowrap; width: auto; padding: .5rem .7rem; }
  .f-step.is-current { border-left: 0; border-bottom-color: var(--gold); }
  /* position:relative so the absolutely-positioned name below is contained by the
     button and clipped with the rail — otherwise it escapes overflow:auto and
     stretches the document sideways (measured 572px on a 390px viewport) */
  .f-step { position: relative; }
  /* visually hidden, NOT display:none — the button needs its accessible name */
  .f-step-name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .f-step.is-current .f-step-name { position: static; width: auto; height: auto;
    margin: 0; overflow: visible; clip: auto; clip-path: none; }
}

@media (max-width: 900px) {
  .form-card-grid, .privacy-grid { grid-template-columns: minmax(0, 1fr); }
  .form-steps-strip { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .privacy-panel { padding: 1.8rem 1.4rem 1.5rem; }
  .privacy-panel-head { gap: .9rem; }
  .privacy-panel-head h2 { font-size: 1.5rem; }
  .form-card { padding: 1.8rem 1.5rem 1.6rem; }
  .f-fields { grid-template-columns: 1fr; }
  .f-fields > .f-half { grid-column: 1 / -1; }
  .f-yesno { grid-template-columns: 1fr; }
  .f-yesno .f-seg { grid-column: 1; grid-row: auto; justify-self: start; }
  .f-summary dl { grid-template-columns: 1fr; gap: 0; }
  .f-summary dt { padding-bottom: 0; border-top: 1px solid rgba(9, 45, 92, .07); }
  .f-summary dd { padding-top: .1rem; border-top: 0; }
  .f-summary dl > dt:first-of-type + dd { border-top: 0; }
  .f-nav .btn { flex: 1; min-width: 0; }
  .f-progress { order: 0; flex-basis: 100%; text-align: center; }
}

/* -------------------------------- print ---------------------------------- */
/* The summary is the deliverable — everything else comes off the page. */

@media print {
  .site-header, .site-footer, .page-hero, .f-steps, .f-done-actions, .f-erase-row,
  .mobile-call, .assist-launcher, .assist-panel, .skip-link, .f-privacy,
  .patient-form { display: none !important; }
  .form-shell { display: block; }
  .form-section { padding: 0; }
  .f-print-head { display: block; margin: 0 0 1rem; }
  .f-print-head img { height: 40px; width: auto; }
  .f-done > p { display: none; }
  .f-summary { border: 0; }
  .f-summary h3 { background: none; border-bottom: 1px solid #000; color: #000;
    padding: .5rem 0 .25rem; break-after: avoid; }
  .f-summary h3 + dl { padding: 0 0 .7rem; }
  .f-summary dt, .f-summary dd { color: #000; border-color: #999; break-inside: avoid; }
  .f-done > h2 { font-size: 1.4rem; }
  .f-summary-meta { padding: 0 0 .6rem; color: #000; }
}
