:root {
  --booking-paper: var(--brand-paper, #f5efe4);
  --booking-ink: var(--brand-ink, #1a1a1a);
  --booking-wine: var(--brand-wine, #aa3a3a);
  --booking-rose: var(--brand-rose, #eeb8b8);
  --booking-yellow: var(--brand-yellow, #ffecb8);
  --booking-ochre: var(--color-ocre-dourado, #e08e00);
  --booking-white: #fffdf9;
  --booking-whatsapp: #25d366;
  --booking-radius: 18px;
  --booking-shadow: 0 18px 50px rgba(75, 38, 30, .10);
  --booking-error: #9c2525;
}

html { scroll-behavior: smooth; }
body { background: var(--booking-paper); color: var(--booking-ink); }

.appointment-header-cta,
.mobile-appointment-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .7rem 1.1rem;
  border-radius: 999px;
  background: var(--booking-wine);
  color: #fff !important;
  font-family: var(--font-body, Quicksand, Arial, sans-serif);
  font-weight: 700;
  text-decoration: none;
}

.booking-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 122px 0 72px;
}

.booking-crumbs {
  display: flex;
  gap: .65rem;
  align-items: center;
  margin-bottom: 2rem;
  color: rgba(26, 26, 26, .72);
  font-size: .92rem;
}
.booking-crumbs a { color: var(--booking-wine); }

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(520px, 1.18fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.booking-intro { position: sticky; top: 126px; }
.booking-eyebrow {
  margin: 0 0 .75rem;
  color: var(--booking-wine);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.booking-intro h1,
.form-heading h2,
.booking-result h2 {
  margin: 0;
  color: var(--booking-wine);
  font-family: var(--font-title, 'Josefin Sans', Arial, sans-serif);
  letter-spacing: 0;
}
.booking-intro h1 { font-size: clamp(2.65rem, 5vw, 4.8rem); line-height: 1.02; }
.booking-lead { margin: 1.4rem 0 0; max-width: 34rem; font-size: 1.16rem; line-height: 1.72; }
.booking-illustration { margin: 1.75rem 0 0; overflow: hidden; border-radius: var(--booking-radius); background: var(--booking-yellow); }
.booking-illustration img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.booking-path { margin: 2.4rem 0; border-top: 1px solid rgba(170, 58, 58, .26); }
.booking-path > div {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: .85rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(170, 58, 58, .26);
}
.booking-path span { color: var(--booking-wine); font-family: var(--font-title, 'Josefin Sans', Arial, sans-serif); font-weight: 700; }
.booking-path p { margin: 0; line-height: 1.45; }

.booking-assurance {
  display: grid;
  gap: .3rem;
  padding: 1.25rem 1.35rem;
  border-left: 4px solid var(--booking-ochre);
  border-radius: 0 var(--booking-radius) var(--booking-radius) 0;
  background: var(--booking-yellow);
}
.booking-assurance strong { color: var(--booking-wine); }

.booking-form-card {
  overflow: hidden;
  border: 1px solid rgba(170, 58, 58, .18);
  border-radius: 26px;
  background: var(--booking-white);
  box-shadow: var(--booking-shadow);
}
.form-heading { padding: 2.3rem 2.5rem 1.6rem; background: linear-gradient(135deg, var(--booking-yellow), #fff6dc); }
.form-heading h2, .booking-result h2 { font-size: clamp(1.9rem, 3vw, 2.55rem); line-height: 1.12; }
.form-heading > p:last-child { margin: .8rem 0 0; line-height: 1.55; }

#booking-form { display: grid; gap: 1.45rem; padding: 2rem 2.5rem 2.5rem; }
.booking-step { display: grid; gap: 1.45rem; min-width: 0; }
.booking-step[hidden], .booking-step-actions [hidden] { display: none; }
.booking-progress { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; list-style: none; padding: 0; font-size: .85rem; }
.booking-progress li { padding: .65rem .35rem; border-bottom: 3px solid var(--booking-rose); }
.booking-progress li[aria-current] { color: var(--booking-wine); border-color: var(--booking-wine); font-weight: 700; }
.booking-step-actions { display: flex; align-items: center; gap: 1rem; }
.booking-step-actions .booking-edit { margin: 0; flex: 0 0 auto; }
.booking-data-notice { display: grid; gap: 1rem; font-size: .9rem; line-height: 1.6; }
.booking-data-notice a { color: var(--booking-wine); text-decoration: underline; }
.period-options { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-field > input { width: 100%; min-height: 50px; padding: .75rem .9rem; border: 1.5px solid rgba(26,26,26,.32); border-radius: 12px; background: var(--booking-white); color: var(--booking-ink); font: inherit; }
.form-field { display: grid; gap: .55rem; margin: 0; padding: 0; border: 0; }
.form-field > label,
.form-field legend,
.label-row label { color: var(--booking-ink); font-weight: 700; }
.form-field legend { margin-bottom: .55rem; }
.form-field legend span,
.label-row label span { color: rgba(26, 26, 26, .68); font-weight: 400; }
.form-field small { color: rgba(26, 26, 26, .72); line-height: 1.45; }

select,
textarea {
  width: 100%;
  border: 1.5px solid rgba(26, 26, 26, .32);
  border-radius: 12px;
  background: #fff;
  color: var(--booking-ink);
  font: inherit;
  font-size: 1rem;
}
select { min-height: 50px; padding: .75rem 2.7rem .75rem .9rem; }
textarea { min-height: 142px; padding: .9rem; resize: vertical; line-height: 1.55; }
select:focus-visible,
textarea:focus-visible,
input:focus-visible,
.booking-submit:focus-visible,
.booking-edit:focus-visible,
.booking-whatsapp:focus-visible,
.appointment-header-cta:focus-visible { outline: 3px solid var(--booking-wine); outline-offset: 3px; }

.option-group { grid-template-columns: 1fr; }
.option-group label,
.confirmation-field {
  display: grid;
  grid-template-columns: 1.2rem 1fr;
  gap: .7rem;
  align-items: start;
  cursor: pointer;
}
.option-group label {
  padding: .85rem .95rem;
  border: 1px solid rgba(170, 58, 58, .22);
  border-radius: 12px;
  background: var(--booking-paper);
}
.option-group input,
.confirmation-field input { width: 1.1rem; height: 1.1rem; margin: .18rem 0 0; accent-color: var(--booking-wine); }

.day-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: .55rem; }
.day-options label { position: relative; cursor: pointer; }
.day-options input { position: absolute; opacity: 0; pointer-events: none; }
.day-options span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(170, 58, 58, .28);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
}
.day-options input:checked + span { border-color: var(--booking-wine); background: var(--booking-rose); }
.day-options input:focus-visible + span { outline: 3px solid var(--booking-wine); outline-offset: 3px; }

.label-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
#message-count { flex: 0 0 auto; color: var(--booking-wine); font-weight: 700; }
.confirmation-field { padding: 1rem; border-radius: 12px; background: var(--booking-yellow); line-height: 1.5; }
.confirmation-field .terms-link { color: var(--booking-wine); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.has-error { outline: 2px solid var(--booking-error); outline-offset: 5px; border-radius: 12px; }
.field-error { margin: .3rem 0 0; color: var(--booking-error); font-size: .85rem; font-weight: 700; line-height: 1.45; }
.confirmation-field .field-error { grid-column: 1 / -1; }
.booking-submit,
.booking-whatsapp {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.booking-submit { background: var(--booking-wine); color: #fff; }
.booking-submit:hover { filter: brightness(.94); }
.form-privacy { margin: 0; color: rgba(26, 26, 26, .72); font-size: .88rem; line-height: 1.55; }
.form-privacy a { color: var(--booking-wine); font-weight: 700; text-decoration: underline; text-underline-offset: .18em; }
.form-error { margin: 0; padding: .8rem 1rem; border-left: 4px solid var(--booking-wine); background: #ffe8e4; color: #6f2020; }

.booking-result { padding: 2.5rem; border-top: 1px solid rgba(170, 58, 58, .18); }
.booking-result[hidden] { display: none; }
.booking-result > p:not(.booking-eyebrow) { line-height: 1.6; }
.booking-result pre {
  max-height: 18rem;
  overflow: auto;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid rgba(170, 58, 58, .22);
  border-radius: 12px;
  background: var(--booking-paper);
  color: var(--booking-ink);
  font-family: var(--font-body, Quicksand, Arial, sans-serif);
  font-size: .96rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.booking-whatsapp { background: var(--booking-whatsapp); color: var(--booking-ink) !important; }
.booking-edit { display: block; margin: 1rem auto 0; border: 0; background: transparent; color: var(--booking-wine); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

.booking-emergency { margin-top: 2rem; padding: 1.15rem 1.3rem; border-left: 5px solid var(--booking-ochre); border-radius: 12px; background: var(--booking-yellow); line-height: 1.55; }
.booking-emergency strong { color: var(--booking-wine); }
.booking-footer-grid { grid-template-columns: 1.3fr .7fr .8fr; }
.booking-footer-grid .footer-links a,
.booking-footer-grid .footer-lgpd-text,
.booking-footer-grid .footer-lgpd-text a { color: var(--booking-ink); }
.booking-footer-grid .footer-links a,
.booking-footer-grid .footer-lgpd-text a { text-decoration: underline; text-underline-offset: .18em; }

@media (max-width: 1050px) {
  .appointment-header-cta { display: none; }
  .booking-layout { grid-template-columns: 1fr; }
  .booking-intro { position: static; }
  .booking-lead { max-width: 48rem; }
}

@media (max-width: 720px) {
  .booking-shell { width: min(100% - 32px, 700px); padding: 96px 0 44px; }
  .booking-crumbs { margin-bottom: 1.25rem; }
  .booking-layout { gap: 2rem; }
  .booking-intro h1 { font-size: clamp(2.25rem, 12vw, 3.25rem); }
  .booking-lead { font-size: 1rem; }
  .form-heading, #booking-form, .booking-result { padding: 1.5rem; }
  .booking-form-card { border-radius: 18px; }
  .day-options { grid-template-columns: repeat(3, 1fr); }
  .label-row { display: grid; gap: .25rem; }
  .booking-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .booking-shell { width: min(100% - 24px, 360px); }
  .form-heading, #booking-form, .booking-result { padding: 1.25rem; }
  .day-options { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
