/* ═══════════════════════════════════════════════════════════
   APPOINTMENT PAGE — Booking Wizard
   Fully self-contained styles for appointment.html
   Tokens inherited from tokens.css (loaded in <head>)
═══════════════════════════════════════════════════════════ */

/* ── Page layout ─────────────────────────────────────────── */
.booking-page {
  background-color: var(--color-surface);
  min-height: calc(100vh - var(--header-height, 80px));
}

/* ── Page Hero Strip ──────────────────────────────────────── */
.booking-hero {
  background-color: var(--color-primary);
  color: var(--color-text);
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 5rem);
  /* Ensure text column starts after the dropped logo on tablet+ */
  position: relative;
  overflow: hidden;
}

.booking-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  pointer-events: none;
}

.booking-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 5%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}

.booking-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-nav);
  color: var(--color-white);
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 9999px;
  margin-top: 20px;
  margin-bottom: 1.25rem;
}

.booking-hero__title {
  font-size: clamp(2rem, 5vw, 3.0625rem);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.booking-hero__sub {
  font-size: var(--text-body-lg);
  color: var(--color-text);
  line-height: var(--leading-normal);
  max-width: 500px;
}


/* ── Main booking layout ──────────────────────────────────── */
.booking-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2rem;
  align-items: start;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

@media (max-width: 960px) {
  .booking-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Left sidebar info cards ─────────────────────────────── */
.booking-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  /* Top offset must be large enough to clear the 80px header AND the 86px hanging logo = ~170px */
  top: calc(var(--header-height, 80px) + 6.5rem);
}

@media (min-width: 961px) {
  .booking-sidebar {
    /* Push the sidebar content down in normal flow so it doesn't start under the hanging logo */
    margin-top: 5rem;
  }
}

@media (max-width: 960px) {
  .booking-sidebar {
    position: static;
    order: 2; /* appear below form on mobile */
  }
}

.booking-sidebar__headline {
  font-size: var(--text-body-lg);
  font-weight: var(--weight-black);
  color: var(--color-contrast);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.booking-sidebar__tagline {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: var(--weight-black);
  color: var(--color-text);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.booking-info-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
  text-decoration: none;
  color: inherit;
}

.booking-info-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.booking-info-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-contrast);
}

.booking-info-card__icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-contrast);
}



.booking-info-card__label {
  font-size: 11px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-contrast);
  margin-bottom: 0.2rem;
}

.booking-info-card__value {
  font-size: var(--text-body-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text);
}


/* ── Form panel ───────────────────────────────────────────── */
.booking-form-panel {
  background: var(--color-white);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  height: 540px;
  display: flex;
  flex-direction: column;
}

[data-booking-form] {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

@media (max-width: 960px) {
  .booking-form-panel {
    height: auto;
    overflow: visible;
  }
  [data-booking-form] {
    overflow: visible;
  }
}

/* ── Tab navigation ──────────────────────────────────────── */
.booking-tabs {
  display: flex;
  background: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0; /* Prevent the tabs from collapsing when content is large */
}

.booking-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: #aaa;
  cursor: default;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.tab-btn.unlocked {
  color: var(--color-text);
  cursor: pointer;
}

.tab-btn.unlocked:hover {
  color: var(--color-nav);
}

.tab-btn.active {
  color: var(--color-nav);
  border-bottom-color: var(--color-nav);
  font-weight: var(--weight-bold);
}

.tab-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-border);
  color: #888;
  font-size: 11px;
  font-weight: var(--weight-bold);
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.tab-btn.unlocked .tab-num {
  background: var(--color-secondary);
  color: var(--color-text);
}

.tab-btn.active .tab-num {
  background: var(--color-nav);
  color: var(--color-white);
}

.tab-text {
  display: none;
}

@media (min-width: 500px) {
  .tab-text {
    display: inline;
  }
}

/* ── Step panels ─────────────────────────────────────────── */
.booking-step {
  display: none;
  padding: 2rem;
  animation: stepFadeIn 0.3s var(--ease-out) both;
  flex: 1;
}

.booking-step.active {
  display: flex;
  flex-direction: column;
}

.step-navigation {
  margin-top: auto; /* Push buttons to the very bottom of the fixed container */
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 540px) {
  .booking-step {
    padding: 1.5rem 1.25rem;
  }
}

/* Step title */
.step-title {
  font-size: 1.125rem; /* Reduced from h3 (22px) to 18px */
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.step-info {
  font-size: var(--text-body);
  color: #888;
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
}

/* ── Form fields ─────────────────────────────────────────── */
.booking-field {
  margin-bottom: 1.25rem;
}

.booking-field label {
  display: block;
  font-size: 12px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 0.4rem;
}

.booking-field input[type="text"],
.booking-field input[type="email"],
.booking-field input[type="tel"],
.booking-field textarea {
  width: 100%;
  padding: 0.8125rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 0.625rem;
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-white);
  outline: none;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}

.booking-field input:focus,
.booking-field textarea:focus {
  border-color: var(--color-nav);
  box-shadow: 0 0 0 3px rgba(75, 124, 249, 0.12);
}

.booking-field input.is-error,
.booking-field textarea.is-error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.10);
}

.booking-field .field-error {
  display: none;
  font-size: 12px;
  color: #e53e3e;
  margin-top: 0.4rem;
  font-weight: var(--weight-medium);
}

.booking-field .field-error.is-visible {
  display: block;
}

.booking-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: var(--leading-normal);
}

/* ── 3-col grid ─────────────────────────────────────────── */
.booking-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 540px) {
  .booking-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ── Checkboxes / terms ──────────────────────────────────── */
.booking-terms {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.booking-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.booking-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-white);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}

.booking-check input[type="checkbox"]:checked {
  background: var(--color-nav);
  border-color: var(--color-nav);
}

.booking-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(40deg);
}

.booking-check span {
  font-size: 13px;
  color: #666;
  line-height: 1.55;
}

/* ── Radio blocks (last cleaned) ─────────────────────────── */
.radio-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.radio-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 9999px;
  background: var(--color-white);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
  user-select: none;
}

.radio-block:hover {
  border-color: var(--color-nav);
  box-shadow: 0 2px 6px rgba(75, 124, 249, 0.12);
}

.radio-block input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-block.is-selected {
  border-color: var(--color-nav);
  background: var(--color-nav);
}

.radio-block span {
  font-size: 13px;
  color: var(--color-text);
  font-weight: var(--weight-medium);
  transition: color 0.2s;
}

.radio-block.is-selected span {
  color: var(--color-white);
}

/* ── Services checkbox grid ──────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 400px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-check-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--card-radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  background: var(--color-white);
  user-select: none;
}

.service-check-card:hover {
  border-color: var(--color-nav);
  box-shadow: 0 4px 12px rgba(75,124,249,0.12);
  transform: translateY(-2px);
}

.service-check-card.is-checked {
  border-color: var(--color-nav);
  background: rgba(75, 124, 249, 0.06);
  box-shadow: 0 0 0 3px rgba(75, 124, 249, 0.15);
}

.service-check-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.service-check-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.2s;
}

.service-check-card.is-checked .service-check-card__icon {
  background: var(--color-nav);
  color: var(--color-white);
}

.service-check-card__label {
  font-size: 12px;
  font-weight: var(--weight-medium);
  color: var(--color-text);
  line-height: 1.3;
}

.service-check-card__check {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-nav);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.service-check-card.is-checked .service-check-card__check {
  opacity: 1;
}

.service-check-card__check svg {
  width: 10px;
  height: 10px;
  stroke: #fff;
  fill: none;
}

/* ── Range sliders ───────────────────────────────────────── */
.slider-group {
  margin-bottom: 1rem;
}

.slider-group:last-of-type {
  margin-bottom: 0;
}

.range-container {
  position: relative;
  padding-top: 2.5rem;
}

.range-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--color-nav);
  color: var(--color-white);
  font-size: 12px;
  font-weight: var(--weight-bold);
  padding: 4px 10px;
  border-radius: 9999px;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: left 0.05s;
  pointer-events: none;
}

.range-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-nav);
}

/* Range input — cross-browser */
.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--color-border);
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
  background-image: linear-gradient(var(--color-nav), var(--color-nav));
  background-size: 0% 100%;
  background-repeat: no-repeat;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-nav);
  border: 3px solid var(--color-white);
  box-shadow: 0 2px 6px rgba(75,124,249,0.4);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.custom-range::-webkit-slider-thumb:hover,
.custom-range:focus::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(75,124,249,0.5);
}

.custom-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-nav);
  border: 3px solid var(--color-white);
  box-shadow: 0 2px 6px rgba(75,124,249,0.4);
  cursor: pointer;
}

.custom-range:focus-visible {
  outline: 3px solid rgba(75,124,249,0.35);
  outline-offset: 2px;
  border-radius: 9999px;
}

/* ── Navigation buttons ──────────────────────────────────── */
.step-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  margin-top: auto; /* Push to bottom of fixed container */
  gap: 1rem;
}

.step-navigation.single-btn {
  justify-content: flex-end;
}

@media (max-width: 480px) {
  .step-navigation {
    flex-direction: column-reverse; /* Puts Next/Confirm on top, Back on bottom */
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .step-navigation .btn-premium,
  .step-navigation .btn-premium-outline,
  .step-navigation .btn-premium-submit {
    width: 100%;
    justify-content: center;
  }
}

.btn-premium {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--color-cta);
  color: var(--color-text);
  border: none;
  border-radius: 9999px;
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), filter 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-premium::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.5) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-25deg);
  transition: left 0.6s ease-out;
}

.btn-premium:hover::after {
  left: 125%;
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 213, 50, 0.45);
}

.btn-premium:active {
  transform: translateY(0);
}

.btn-premium-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
  border-radius: 9999px;
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-premium-outline:hover {
  border-color: var(--color-text);
  color: var(--color-text);
  background: rgba(0,0,0,0.04);
}

.btn-premium-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: var(--color-nav);
  color: var(--color-white);
  border: none;
  border-radius: 9999px;
  font-family: var(--font-base);
  font-size: var(--text-body-lg);
  font-weight: var(--weight-bold);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  letter-spacing: 0.02em;
}

.btn-premium-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(75, 124, 249, 0.4);
}

/* ── Success state ───────────────────────────────────────── */
.booking-success {
  display: none;
  padding: 3rem 2rem;
  text-align: center;
  animation: stepFadeIn 0.5s var(--ease-out) both;
}

.booking-success.is-visible {
  display: block;
}

.booking-success__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.booking-success__icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--color-white);
  stroke-width: 2.5;
}

.booking-success__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: var(--weight-black);
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.booking-success__body {
  font-size: var(--text-body-lg);
  color: #666;
  max-width: 420px;
  margin: 0 auto 2rem;
  line-height: var(--leading-normal);
}

/* ── mt utilities (form-only) ────────────────────────────── */
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.5rem; }

/* ── Scroll reveal for sidebar cards ─────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration-slow, 400ms) var(--ease-out, cubic-bezier(0.16,1,0.3,1)),
    transform var(--duration-slow, 400ms) var(--ease-out, cubic-bezier(0.16,1,0.3,1));
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .booking-step { animation: none; }
  .btn-premium::after { display: none; }
}
