/*
 * book.css — Public booking pages (/book, the slot form, the code step,
 * the confirmation, the cancel flow)
 * ═══════════════════════════════════════════════════════════════════════
 * PATH: css/book.css
 * ROLE: Everything page-specific for the free-phone-consultation scheduler:
 *       the hero band photo (scoped by the layout's data-page="book"), the
 *       two-column frame (week grid beside a sticky "How it works" aside)
 *       and its narrow single-column variant for the steps after the grid,
 *       the panel/field/button idiom borrowed from css/contact.css so the
 *       two forms read as one site, and the public skin for the shared
 *       week grid. Tokens (--band, --teal, --line, --display, --serif…)
 *       come from css/site-shell.css.
 * USED BY: app/Views/public/book/{index,slot,verify,confirmation,cancel,
 *       cancelled}.php, loaded through the layout's 'head'
 *       section. On /book it loads AFTER css/booking-slot-grid.css, which
 *       is deliberate: the grid's structure is shared with the admin
 *       calendar and only its public skin is overridden here.
 * NOTE: No state lives in a class name — the layout width is
 *       .book-layout[data-layout="narrow"] and the grid's own states come
 *       from :hover / :focus-visible.
 * Last Modified: 2026-09-16 — email_confirmed page dropped; .book-captcha
 *       reserves the reCAPTCHA v2 widget's fixed height above the submit
 */

/* ── hero band photo ─────────────────────────────────────
   The layout stamps data-page="book" on .wrapper2; the tall variant
   (data-hero="tall" on .banner3, rules in main.css) grows the band so the
   photo reads. Same shot as /contact — this page is the same errand. */
.wrapper2[data-page="book"] {
  background-image: url(../images/home/hero-contact.jpg);
  background-attachment: scroll;   /* fixed would frame only the top edge in a 430px band */
  background-position: center 50%;
}

/* ── page frame ────────────────────────────────────────── */
.book-page {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
  overflow-x: clip;
}
.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 3rem;
  align-items: start;
}
/* the steps after the grid are one column of reading width, centred */
.book-layout[data-layout="narrow"] {
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
}
.book-main {
  min-width: 0;
}
.book-heading {
  margin: 0 0 .5rem;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -.01em;
  color: var(--ink);
}
.book-intro {
  margin: 0 0 1.75rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}
.book-body {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.book-foot-note {
  margin: 1.5rem 0 0;
  font-family: var(--serif);
  font-size: .95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ── week navigation ───────────────────────────────────── */
.book-week-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem 1.25rem;
  margin-bottom: 1rem;
}
.book-week-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.book-week-nav-off {
  font-family: var(--serif);
  font-size: .95rem;
  color: var(--line);
}

/* ── the week grid, public skin ────────────────────────────
   Structure comes from css/booking-slot-grid.css (shared with the admin
   calendar); these rules only restyle it for the site shell, scoped to
   .book-grid-frame so the admin pages are untouched. */
.book-grid-frame {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: clamp(.9rem, 2vw, 1.5rem);
}
.book-grid-frame .slot-grid-day {
  border: 0;
  border-radius: 0;
  padding: 0 4px;
  background: transparent;
}
.book-grid-frame .slot-grid-day + .slot-grid-day {
  border-left: 1px solid var(--line);
}
.book-grid-frame .slot-grid-day-name,
.book-grid-frame .slot-grid-day-date {
  font-family: var(--display);
}
.book-grid-frame .slot-grid-day-date {
  font-weight: 700;
}
.book-grid-frame .slot-grid-empty {
  font-family: var(--serif);
  font-size: .85rem;
  color: var(--muted);
}
/* outlined pill that fills teal on hover/focus — the site's button idiom */
.book-grid-frame .slot-grid-button {
  border-radius: 999px;
  border-color: var(--line);
  background: transparent;
  color: var(--teal-deep);
  font-family: var(--display);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .04em;
  padding: .45rem .3rem;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.book-grid-frame .slot-grid-button:hover,
.book-grid-frame .slot-grid-button:focus-visible {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--band);
  text-decoration: none;
}

/* ── panels ────────────────────────────────────────────── */
.book-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.book-panel-title {
  margin: 0 0 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--teal);
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  letter-spacing: -.01em;
  color: var(--ink);
}
.book-chosen {
  margin: 0 0 .3rem;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--teal-deep);
}
.book-chosen-note {
  margin: 0 0 1.75rem;
  font-family: var(--serif);
  font-size: .95rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ── notices ───────────────────────────────────────────── */
.book-alert {
  margin: 0 0 1.5rem;
  padding: .9rem 1.1rem;
  border: 1px solid #f0c2c7;
  border-left: 4px solid #b02a37;
  border-radius: 8px;
  background: #fdf2f3;
  font-family: var(--serif);
  font-size: .97rem;
  line-height: 1.55;
  color: #8a222c;
}
.book-notice {
  margin: 0 0 1.5rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--teal-tint);
  font-family: var(--serif);
  font-size: .97rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ── fields (the /contact idiom) ───────────────────────── */
.book-form {
  margin: 0;
}
.book-field {
  display: grid;
  gap: .3rem;
  margin-bottom: 1.35rem;
}
.book-field label {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.book-required {
  color: #b02a37;
}
.book-input {
  width: 100%;
  margin: 0;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ground);
  box-shadow: none;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea.book-input {
  resize: vertical;
}
.book-input:focus {
  outline: none;
  border-color: var(--teal-deep);
  box-shadow: 0 0 0 3px var(--teal-tint);
}
/* the code fields are short, spaced and read back aloud over the phone */
.book-code-input {
  max-width: 13rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.book-hint {
  margin: 0;
  font-family: var(--serif);
  font-size: .88rem;
  line-height: 1.45;
  color: var(--muted);
}
.book-consent {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: 1.5rem 0 .6rem;
  font-family: var(--serif);
  font-size: .97rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.book-consent input {
  width: auto;
  margin: .25rem 0 0;
  flex: 0 0 auto;
}
.book-consent label {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  color: inherit;
}
/* honeypot — off screen rather than display:none, which bots skip */
.book-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
}

/* ── buttons ───────────────────────────────────────────── */
/* ── reCAPTCHA v2 checkbox ───────────────────────────────
   The widget is a fixed 304x78 iframe Google injects; reserving its height
   stops the submit row jumping when it arrives. */
.book-captcha {
  min-height: 78px;
  margin: 0 0 1rem;
}

.book-captcha-note {
  margin-top: -.5rem;
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.5rem;
}
.book-btn,
.book-btn-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: .76rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.book-btn {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--band);
}
/* main.css paints bare links white and blue on hover — restate both states
   so an <a class="book-btn"> reads the same as a <button> */
.book-page .book-btn:hover,
.book-page .book-btn:focus-visible {
  background: var(--teal-bright);
  border-color: var(--teal-bright);
  color: var(--band);
  text-decoration: none;
}
.book-btn-alt {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
}
.book-page .book-btn-alt:hover,
.book-page .book-btn-alt:focus-visible {
  border-color: var(--teal-deep);
  background: transparent;
  color: var(--teal-deep);
  text-decoration: none;
}

/* ── the resend / wrong-number block ───────────────────── */
.book-resend {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* ── confirmation ──────────────────────────────────────── */
.book-done {
  text-align: center;
}
.book-done .book-panel-title {
  border-bottom: 0;
  padding-bottom: 0;
}
.book-done-mark {
  width: 64px;
  height: 64px;
  margin-bottom: .75rem;
  color: var(--teal);
}
.book-done .book-actions {
  justify-content: center;
}
.book-summary {
  margin: 1.5rem 0;
  padding: .35rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ground);
  text-align: left;
}
.book-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
}
.book-summary-row:last-child {
  border-bottom: 0;
}
.book-summary dt {
  flex: 0 0 160px;
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.book-summary dd {
  flex: 1 1 200px;
  min-width: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: .99rem;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: break-word;
}
.book-code-value {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 6px;
  background: var(--teal-tint);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .22em;
  color: var(--teal-deep);
}

/* ── aside ─────────────────────────────────────────────── */
.book-side {
  position: sticky;
  top: calc(62px + 1.25rem);       /* the shrunken header height + air */
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.book-box {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.book-box-title {
  margin: 0;
  padding: .9rem 1.25rem;
  background: var(--band);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.book-details {
  list-style: none;
  margin: 0;
  padding: 0;
}
.book-details li {
  padding: .8rem 1.25rem;
  font-family: var(--serif);
  font-size: .97rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.book-details li + li {
  border-top: 1px solid var(--line);
}
.book-details a,
.book-details a:hover,
.book-details a:focus {
  color: var(--teal-deep);
  text-decoration: underline;
  text-decoration-color: rgba(42, 139, 130, .35);
  text-underline-offset: 3px;
  overflow-wrap: break-word;
}
/* numbered steps: the counter circle and ONE content wrapper, so the copy
   never lands in the 32px counter column (same idiom as .contact-next) */
.book-steps {
  list-style: none;
  counter-reset: book-step;
  margin: 0;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.book-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: .85rem;
  font-family: var(--serif);
  font-size: .95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.book-steps li::before {
  counter-increment: book-step;
  content: counter(book-step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--band);
  font-family: var(--display);
  font-weight: 800;
  font-size: .85rem;
}
.book-steps strong {
  display: block;
  margin-bottom: .1rem;
  font-family: var(--display);
  font-size: .98rem;
  color: var(--ink);
}
.book-credentials {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 1000px) {
  .book-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* the aside follows the grid in source order, so it simply drops below */
  .book-side {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 1rem;
  }
  .book-credentials {
    grid-column: 1 / -1;
  }
}
@media (max-width: 768px) {
  /* the shared sheet drops the grid to two columns here; the day divider
     only makes sense in the 7-across row */
  .book-grid-frame .slot-grid-day + .slot-grid-day {
    border-left: 0;
  }
  .book-grid-frame .slot-grid-day {
    padding: .5rem 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 560px) {
  .book-side {
    grid-template-columns: 1fr;
  }
  .book-week-nav {
    justify-content: center;
  }
  .book-summary dt {
    flex: 1 1 100%;
  }
  .book-actions .book-btn,
  .book-actions .book-btn-alt {
    flex: 1 1 100%;
  }
}
