/* ============================================================================
   Damasio Academy — "find a teacher" surfaces.
   Layers on /css/tokens.css + /css/themes.css + /public/assets/site.css.

   The flow Todd specified: choose a TEACHER first, then see what that teacher
   offers, then the course, then how often you meet. So this file styles a
   guided, one-decision-at-a-time flow rather than a page of controls.

   House rules honoured here: no pill buttons, no floating buttons, no raw
   checkbox/radio inputs (the real input is visually hidden and the card is the
   control), prose boxes get room to write, feedback is inline not a toast.
============================================================================ */

/* ---- step scaffold ------------------------------------------------------ */
.f-step { margin-top: clamp(32px, 5vw, 56px); }
.f-step[hidden] { display: none !important; }
.f-step__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.f-step__n {
  font-family: var(--da-font-display); font-weight: 700; font-size: 1rem;
  color: var(--da-accent); letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap;
}
.f-step__head h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); }
.f-step__sub { color: var(--da-muted); margin: -8px 0 22px; max-width: 62ch; }

/* ---- teacher cards (step 1) --------------------------------------------- */
.f-teachers { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.f-teacher {
  display: flex; flex-direction: column; gap: 14px; text-align: left;
  padding: 26px; text-decoration: none; color: inherit;
  transition: transform .14s ease, box-shadow .2s ease, border-color .2s ease;
}
.f-teacher:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--da-shadow); border-color: var(--da-accent); }
.f-teacher__top { display: flex; align-items: center; gap: 16px; }
.f-teacher__av, .f-teacher__ph {
  width: 84px; height: 84px; border-radius: 50%; flex: none; object-fit: cover;
  box-shadow: var(--da-shadow-sm);
}
.f-teacher__ph {
  display: grid; place-items: center; color: #fff; font-weight: 700;
  font-family: var(--da-font-display); font-size: 1.9rem;
  background: linear-gradient(135deg, var(--da-accent), var(--da-highlight));
}
.f-teacher h3 { margin: 0 0 3px; font-size: 1.35rem; }
.f-teacher__role { color: var(--da-accent); font-weight: 600; font-size: .88rem; }
.f-teacher__bio { color: var(--da-muted); font-size: .94rem; margin: 0; }
.f-teacher__offers { border-top: 1px solid var(--da-line); padding-top: 14px; margin-top: auto; }
.f-teacher__offers li { color: var(--da-text); font-size: .92rem; padding: 3px 0; }
.f-teacher__offers ul { list-style: none; margin: 0 0 12px; padding: 0; }
.f-teacher__go { font-weight: 600; color: var(--da-accent); font-size: .94rem; }

/* ---- selectable cards (steps 2 + 3) ------------------------------------- */
/* The <input> is the accessible control and is visually hidden; the label IS
   the button. Never a bare browser radio (house rule 1.8). */
.f-choices { display: grid; gap: 16px; }
.f-choices--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.f-choice { position: relative; display: block; cursor: pointer; }
/* The real input carries the accessibility and the :checked state; the card is
   what you see and click. It is marked .ctl-raw so /css/controls.css leaves it
   alone — controls.css styles every other checkbox and radio in the product,
   and would otherwise size this one back up to a 20px box. */
.f-choice input.ctl-raw,
.f-choice input {
  position: absolute; width: 1px; height: 1px; min-width: 0; opacity: 0;
  margin: 0; padding: 0; border: 0; pointer-events: none; appearance: none;
}
.f-choice__body {
  position: relative;
  background: var(--da-surface); border: 1.5px solid var(--da-line);
  border-radius: var(--da-radius); padding: 22px 24px;
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  transition: border-color .16s ease, box-shadow .2s ease, transform .14s ease;
}
.f-choice:hover .f-choice__body { border-color: color-mix(in srgb, var(--da-accent) 55%, var(--da-line)); transform: translateY(-1px); }
.f-choice input:focus-visible + .f-choice__body {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--da-accent) 30%, transparent);
}
.f-choice input:checked + .f-choice__body {
  border-color: var(--da-accent); border-width: 2px; padding: 21px 23px;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--da-accent) 16%, transparent);
}
/* the drawn tick — appears only when chosen */
.f-choice__body::after {
  content: ""; position: absolute; top: 16px; right: 18px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--da-line); background: var(--da-surface);
  transition: background .16s ease, border-color .16s ease;
}
.f-choice input:checked + .f-choice__body::after {
  background: var(--da-accent); border-color: var(--da-accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 13l4 4L19 7'/></svg>");
  background-size: 15px 15px; background-repeat: no-repeat; background-position: center;
}
.f-choice h3 { margin: 0 4px 0 0; padding-right: 34px; font-size: 1.2rem; }
.f-choice__meta { color: var(--da-muted); font-size: .9rem; }
.f-choice__price { font-family: var(--da-font-serif); font-weight: 600; font-size: 1.75rem; color: var(--da-heading); line-height: 1.1; }
.f-choice__unit { color: var(--da-muted); font-size: .84rem; }
.f-choice__blurb { color: var(--da-muted); font-size: .93rem; margin: 4px 0 0; }
.f-choice__flag {
  font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--da-accent);
}
.f-choice__each { font-size: .84rem; color: var(--da-muted); }

/* ---- prose field (the ✦ control itself is injected by /js/polish.js) ---- */
.f-field { display: grid; gap: 7px; }
.f-field > label { font-weight: 600; font-size: .92rem; color: var(--da-heading); }
.f-field .f-hint { font-size: .85rem; color: var(--da-muted); margin: -2px 0 2px; }
.f-field input, .f-field textarea, .f-field select {
  font-family: var(--da-font-body); font-size: 1rem; color: var(--da-text);
  background: var(--da-surface); border: 1.5px solid var(--da-line);
  border-radius: var(--da-radius-sm); padding: .72em .9em; width: 100%;
}
.f-field textarea { min-height: 220px; resize: vertical; line-height: 1.55; }
.f-field input:focus, .f-field textarea:focus, .f-field select:focus {
  outline: none; border-color: var(--da-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--da-accent) 22%, transparent);
}
/* ---- inline feedback (never a toast) ----------------------------------- */
.f-msg { font-size: .95rem; padding: 8px 0; min-height: 1.4em; }
.f-msg.ok { color: var(--da-accent); font-weight: 600; }
.f-msg.err { color: #b0392c; font-weight: 600; }
.f-note {
  background: var(--da-cream-2); border: 1px solid var(--da-line);
  border-radius: var(--da-radius-sm); padding: 14px 16px; color: var(--da-text);
  font-size: .94rem;
}

/* ---- teacher profile header -------------------------------------------- */
.f-hero { display: grid; grid-template-columns: 200px 1fr; gap: clamp(22px, 4vw, 44px); align-items: center; }
.f-hero img, .f-hero .f-teacher__ph { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; box-shadow: var(--da-shadow); font-size: 3.4rem; }
.f-hero h1 { color: #f7f1e5; margin-bottom: .2em; }
.f-hero p { color: #ece4d3; font-family: var(--da-font-serif); font-size: clamp(1.05rem, 2.2vw, 1.35rem); max-width: 58ch; }
.f-hero__role { color: var(--da-highlight); font-weight: 600; font-size: .95rem; letter-spacing: .04em; margin-bottom: 8px; }

/* ---- summary rail on the request step ---------------------------------- */
.f-summary { display: grid; gap: 10px; }
.f-summary__row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--da-line); }
.f-summary__row:last-child { border-bottom: 0; }
.f-summary__k { color: var(--da-muted); font-size: .9rem; }
.f-summary__v { font-weight: 600; text-align: right; }
.f-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(22px, 4vw, 40px); align-items: start; }

.f-back { background: none; border: 0; color: var(--da-muted); font-weight: 600; cursor: pointer; padding: 0; font-family: var(--da-font-body); font-size: .9rem; }
.f-back:hover { color: var(--da-accent); }

@media (max-width: 860px) {
  .f-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .f-hero p { margin-left: auto; margin-right: auto; }
  .f-cols { grid-template-columns: 1fr; }
}
