/* Booking page (agendar.html / book.html). Loaded after legal.css, which gives the header, footer, page head,
   eyebrow and the brand tokens; this file adds the calendar, the form and the confirmation. */
:root {
  --navy-hover: #24334A;
  --gold-strong: #9E7C49;
  --gold-frame: rgba(182, 146, 94, 0.5);
  --line-strong: #C3CAD5;
  --day: #E8EDF5;
  --error: #A3352B;
  --success: #2F6B4F;
  --on-navy: #F0F4FF;
}

.nw { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font-family: inherit; }

/* ---------- Page head: steps ---------- */
.book-head .wrap { gap: 16px; }
.book-head .summary { font-size: 1.08rem; }
.steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 36px; }
.steps li { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 0.98rem; }
.steps .n {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-strong); font-size: 0.82rem; font-weight: 500; background: var(--paper);
}
.steps .n svg { width: 14px; height: 14px; }
.steps li[aria-current="step"] { color: var(--ink); font-weight: 500; }
.steps li[aria-current="step"] .n { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.steps li.is-done .n { border-color: var(--gold); color: var(--gold-text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 14px 24px;
  font: 500 0.82rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  border: 1px solid transparent; border-radius: 2px; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-navy { background: var(--navy); color: var(--on-navy); }
.btn-navy:hover { background: var(--navy-hover); }
.btn-outline { border-color: rgba(22, 32, 44, 0.28); color: var(--ink); background: var(--paper); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-text); }
.btn[aria-disabled="true"] { opacity: 0.42; cursor: not-allowed; }
.btn-navy[aria-disabled="true"]:hover { background: var(--navy); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.link-back {
  padding: 4px 0 2px; border: 0; border-bottom: 1px solid var(--gold); background: none; cursor: pointer; text-decoration: none;
  font: 500 0.78rem/1.4 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
}
.link-back:hover { color: var(--gold-text); }

/* ---------- Step panels ---------- */
.book .wrap { padding-top: 48px; padding-top: clamp(40px, 6vw, 72px); padding-bottom: 72px; padding-bottom: clamp(56px, 8vw, 96px); }
.step-panel { display: grid; gap: 48px; scroll-margin-top: 16px; }
.step-panel h2, .step-panel h3 { font-family: var(--display); }
h2:focus, h3:focus { outline: none; }
.kicker { margin: 0; font: 500 0.75rem/1.3 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-text); }

/* ---------- Step 1: the booking card ---------- */
.book-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr) minmax(0, 1.05fr);
  background: var(--paper); border: 1px solid var(--line); border-top: 3px double var(--gold);
  box-shadow: 0 18px 48px rgba(22, 32, 44, 0.08);
}
.book-card > * { min-width: 0; padding: 32px 28px; display: grid; gap: 18px; align-content: start; }
.book-info { background: #FBFBFD; border-right: 1px solid var(--line); }
.book-info img { width: 40px; height: auto; }
.book-info .title { display: grid; gap: 4px; }
.book-info h2 { margin: 0; font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-size: 0.97rem; line-height: 1.45; }
.facts li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; }
.facts svg { width: 20px; height: 20px; margin-top: 1px; color: var(--gold-text); }
.facts small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 0.88rem; }

.book-cal h2, .book-times h2 { margin: 0; font-size: 1.6rem; font-weight: 600; line-height: 1.15; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cal-month { margin: 0; font-weight: 500; letter-spacing: 0.03em; text-transform: capitalize; }
.icon-sq {
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 2px; background: var(--paper); color: var(--ink);
}
.icon-sq svg { width: 16px; height: 16px; }
.icon-sq:hover:not([disabled]) { border-color: var(--gold); color: var(--gold-text); }
.icon-sq[disabled] { color: var(--line-strong); border-color: var(--line); cursor: default; }
.cal-week, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-week span { text-align: center; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.cal-days { min-height: 270px; align-content: start; }
.cal-days > * { justify-self: center; }
.day {
  width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  font-size: 0.98rem; font-weight: 500; font-variant-numeric: tabular-nums; background: transparent; color: #A7AFBB;
}
button.day { background: var(--day); color: var(--ink); cursor: pointer; transition: background-color .15s; }
button.day:hover { background: #D7DFEC; }
button.day[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--gold); }
.cal-status { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.cal-status:empty { display: none; }
.cal-status[data-tone="error"] { color: var(--error); }
.cal-status .btn { margin-top: 10px; }
.note { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

.book-times { border-left: 1px solid var(--line); }
.day-title { margin: 0; font-weight: 500; }
.slots { display: grid; gap: 10px; }
.slot {
  height: 48px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--paper); color: var(--ink);
  font-size: 1rem; font-weight: 500; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.slot:hover { border-color: var(--navy); }
.slot[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.slots-empty { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.pick { display: grid; gap: 12px; margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--line); }
.pick-label { margin: 0; font: 500 0.72rem/1.2 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.pick-value { margin: 0; font-family: var(--display); font-size: 1.4rem; font-weight: 600; line-height: 1.2; }
.pick-value small { display: block; margin-top: 2px; font-family: var(--body); font-size: 0.95rem; font-weight: 400; color: var(--ink-soft); }
.pick-value.is-empty { font-family: var(--body); font-size: 0.98rem; font-weight: 400; color: var(--ink-soft); }
.pick .btn { width: 100%; }
.pick-hint { margin: 0; font-size: 0.9rem; color: var(--error); }
.pick-hint:empty { display: none; }

.book-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.book-notes > div { display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 1px solid var(--gold); }
.book-notes h3 { margin: 0; font-size: 1.4rem; font-weight: 600; line-height: 1.2; }
.book-notes p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.book-notes a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

/* ---------- Step 2: form ---------- */
.form-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.book-form {
  flex: 999 1 560px; min-width: 0; display: grid; gap: 22px; position: relative;
  background: var(--paper); border: 1px solid var(--line); border-top: 3px double var(--gold); padding: 24px; padding: clamp(22px, 3.5vw, 36px);
}
.form-head { display: grid; gap: 6px; }
.form-head h2 { margin: 0; font-size: 1.9rem; font-weight: 600; line-height: 1.15; }
.form-head p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.req { color: var(--gold-text); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .group-label {
  font: 500 0.72rem/1.35 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; font: 400 1rem/1.5 var(--body); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 2px; padding: 11px 12px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(182, 146, 94, 0.28); }
.field [aria-invalid="true"], .choices[aria-invalid="true"] .choice { border-color: var(--error); }
.field-note { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

.phone-row { display: flex; }
.phone-row input { flex: 1 1 auto; min-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cc {
  position: relative; flex: none; display: flex; align-items: center; gap: 7px; padding: 0 30px 0 11px;
  background: var(--mist); color: var(--ink); border: 1px solid var(--line-strong); border-right: 0; border-radius: 2px 0 0 2px;
  font-size: 0.95rem; font-variant-numeric: tabular-nums;
}
.cc-flag { font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 1.25rem; line-height: 1; }
.cc svg { position: absolute; right: 11px; top: 50%; width: 10px; height: 6px; margin-top: -3px; color: var(--ink-soft); }
.field .cc select { position: absolute; top: 0; left: 0; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; font-size: 16px; border: 0; }
.cc:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(182, 146, 94, 0.28); z-index: 1; }

fieldset.choices-set { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }
fieldset.choices-set legend { padding: 0; margin-bottom: 10px; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 2px; background: var(--paper); transition: border-color .15s, background-color .15s;
}
.choice input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--navy); }
.choice strong { display: block; font-weight: 500; }
.choice span span { display: block; font-size: 0.9rem; color: var(--ink-soft); }
.choice.is-on { border-color: var(--navy); background: #F7F8FB; }

.invoice { display: grid; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.invoice h3 { margin: 0; font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.invoice > p { margin: -10px 0 0; color: var(--ink-soft); font-size: 0.95rem; }

.consent { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 0.92rem; line-height: 1.55; color: var(--ink-soft); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); }
.consent input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.consent a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding-top: 4px; }
.form-status { margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--ink-soft); }
.form-status:empty { display: none; }
.form-status[data-tone="error"] { color: var(--error); }
.form-status a { color: inherit; }

.book-aside {
  flex: 1 1 300px; min-width: 0; display: grid; gap: 18px; padding: 28px;
  background: var(--mist); border: 1px solid var(--line);
}
.book-aside h2 { margin: 0; font-size: 1.75rem; font-weight: 600; line-height: 1.15; }
.book-aside .link-back { justify-self: start; }
.after { display: grid; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.after p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }
.after p.lead-in { color: var(--ink); font-weight: 500; }

/* ---------- Step 3: request received ---------- */
.done { max-width: 760px; margin-left: auto; margin-right: auto; gap: 28px; }
.done-head { display: grid; justify-items: center; gap: 16px; text-align: center; }
.done-mark { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold); background: var(--paper); color: var(--gold-text); }
.done-mark svg { width: 28px; height: 28px; }
.done-head .eyebrow::before { display: none; }
.done-head h2 { margin: 0; font-size: 2.3rem; font-size: clamp(2.1rem, 1.6rem + 2vw, 3rem); font-weight: 500; line-height: 1.08; }
.done-head > p:last-child { margin: 0; max-width: 52ch; font-size: 1.08rem; color: var(--ink-soft); }
.done-card { display: grid; gap: 22px; padding: 28px 32px; background: var(--paper); border: 1px solid var(--line); border-top: 3px double var(--gold); }
.done-card dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.done-card dt { font: 500 0.72rem/1.3 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-text); }
.done-card dd { margin: 2px 0 0; font-size: 1.06rem; }
.pay-box { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 18px; background: #FBF7F0; border: 1px solid #E4D3B5; }
.pay-box svg { width: 20px; height: 20px; margin-top: 2px; color: var(--gold-text); }
.pay-box p { margin: 0; font-size: 0.97rem; line-height: 1.55; }
.pay-box strong { font-weight: 500; }
.pay-box > p > span { color: var(--ink-soft); }
.done-card dd small { font-size: 0.86rem; color: var(--ink-soft); }
.done-head strong { font-weight: 500; color: var(--ink); }
.next-wrap { display: grid; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.next-wrap h3 { margin: 0; font-size: 1.6rem; font-weight: 600; }
.next { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: n; }
.next li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start; counter-increment: n; }
.next li::before {
  content: counter(n); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold-text); font-size: 0.82rem; font-weight: 500;
}
.next strong { font-weight: 500; }
.next li > span > span { display: block; color: var(--ink-soft); font-size: 0.96rem; }
.next li > span > span span { display: inline; }
.done-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.done-foot p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.done-foot a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .book-card { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .book-info { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 16px; }
  .book-info .facts { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}
@media (max-width: 760px) {
  .book-card { grid-template-columns: minmax(0, 1fr); }
  .book-card > * { padding: 24px 18px; }
  .book-times { border-left: 0; border-top: 1px solid var(--line); }
  .book-info .facts { grid-template-columns: minmax(0, 1fr); }
  .book-notes { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .row2, .choices, .done-card dl { grid-template-columns: minmax(0, 1fr); }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-days { min-height: 0; gap: 4px; }
  .cal-week { gap: 4px; }
  .day { width: 42px; height: 42px; }
  .done-card { padding: 22px 18px; }
  .book-form .btn, .done-foot .btn { width: 100%; }
}
@media (max-width: 380px) {
  .day { width: 38px; height: 38px; font-size: 0.92rem; }
  .steps { gap: 10px 20px; }
}

@supports not (inset: 0) {
  .steps > * { margin: 0 24px 10px 0; }
  .form-foot > *, .done-foot > *, .form-layout > * { margin: 0 16px 16px 0; }
}
