/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Gold pulled directly from Truly You's own wordmark/ginkgo-leaf asset
     (#E3B165) — their site uses this same gold for the nav "Book Now" pill
     and the hero accent text, paired with near-black body copy. */
  --gold:        #E3B165;
  --gold-dark:   #C8965A;
  --gold-light:  #FBF1E1;
  --text:        #171717;
  --muted:       #777674;
  --white:       #ffffff;
  --error:       #b3261e;
  --border:      #E8E1D3;
  --bg:          #FAF7F2;
  --shadow:      0 4px 24px rgba(23, 23, 23, 0.10);
  --shadow-sm:   0 2px 8px  rgba(23, 23, 23, 0.07);
  --radius:      14px;
  --radius-btn:  999px;
  --transition:  0.22s ease;
}

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: 'Prata', serif;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}

a { color: var(--gold-dark); }
a:hover { opacity: 0.8; }

/* ===== Container ===== */
.form-container {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  min-height: 400px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

/* ===== Progress bar ===== */
.progress-bar {
  height: 3px;
  background: var(--border);
  flex-shrink: 0;
}
.progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.4s ease;
}

/* Shown while a service/provider pick is fetching cart availability from
   Boulevard — the merged (guide-me) flow in particular can take a few
   seconds since it switches through every qualified provider in turn. */
.booking-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(1px);
}
.booking-loading-overlay.visible { display: flex; }
.booking-loading-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  animation: booking-loading-spin 0.7s linear infinite;
}
.booking-loading-text {
  font-size: 0.85rem;
  color: var(--muted);
}
@keyframes booking-loading-spin {
  to { transform: rotate(360deg); }
}

/* ===== Step wrapper ===== */
.steps-wrapper {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.step {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.step.active {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  opacity: 1;
  transform: translateX(0);
}
.step.slide-out-left  { transform: translateX(-100%); }
.step.slide-out-right { transform: translateX(100%); }
.step.slide-in-left   { transform: translateX(-100%); }
.step.slide-in-right  { transform: translateX(100%); }

/* ===== Step content ===== */
.step-content {
  padding: 48px 32px 32px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== Logo strip ===== */
/* White backdrop matches Truly You's own site nav bar (white, with the gold
   ginkgo-leaf mark) rather than a dark bar — their logo has no dark
   background of its own. */
.logo {
  background: var(--white);
  margin: -48px -32px 8px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-img {
  max-height: 48px;
  width: auto;
  display: block;
}

/* ===== Headings ===== */
.step-header { display: flex; flex-direction: column; gap: 6px; }
.step-header h2 { font-size: 1.4rem; }
.step-header p  { font-size: 0.875rem; color: var(--muted); line-height: 1.5; font-family: 'Poppins', system-ui, sans-serif; }

h1 { font-size: 1.5rem; }

/* ===== Path cards (3-up grid) ===== */
.path-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.path-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  width: 100%;
}
.path-card:hover, .path-card.selected {
  border-color: var(--gold);
  background: var(--gold-light);
  box-shadow: var(--shadow-sm);
}
.path-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold-dark);
}
.path-card.selected .path-card-icon { background: var(--gold); color: var(--white); }
.path-card-text { display: flex; flex-direction: column; gap: 2px; }
.path-card-title { font-family: 'Poppins', system-ui, sans-serif; font-weight: 400; font-size: 0.95rem; color: var(--text); }
.path-card-desc  { font-size: 0.8rem; color: var(--muted); }

/* ===== Location / category cards ===== */
.location-cards, .category-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.location-card, .category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
}
.location-card:hover, .location-card.selected,
.category-card:hover,  .category-card.selected {
  border-color: var(--gold);
  background: var(--gold-light);
}
.location-card-name, .category-card-name {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text);
}
.location-card-sub { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

/* ===== Guide list ===== */
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guide-item {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
}
.guide-item:hover, .guide-item.selected {
  border-color: var(--gold);
  background: var(--gold-light);
}

/* ===== Service list ===== */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
}
.service-card:hover, .service-card.selected {
  border-color: var(--gold);
  background: var(--gold-light);
}
.service-card-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.service-card-name {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--text);
}
.service-card-meta { font-size: 0.78rem; color: var(--muted); }

/* ===== Calendar ===== */
.datetime-picker { display: flex; flex-direction: column; gap: 16px; }

.calendar {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--text);
  color: var(--white);
}
.calendar-header h3 { font-family: 'Poppins', system-ui, sans-serif; font-size: 0.9rem; font-weight: 400; }
.cal-nav {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 1rem;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.cal-nav:hover:not(:disabled) { opacity: 1; }
.cal-nav:disabled { opacity: 0.3; cursor: not-allowed; }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--gold-light);
  border-bottom: 1px solid var(--border);
}
.calendar-weekdays span {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 6px;
  gap: 2px;
}
.cal-day {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.cal-day:hover:not(.disabled):not(.selected) { background: var(--gold-light); color: var(--gold-dark); }
.cal-day.today { font-weight: 700; color: var(--gold-dark); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.cal-day.selected { background: var(--gold); color: var(--text); font-weight: 600; }
.cal-day.disabled { color: var(--border); cursor: default; }
.cal-day.empty { pointer-events: none; }

.time-slots { display: none; margin-top: 12px; }
.time-slots.visible { display: block; }
.time-slots h3 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 8px;
}
.time-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.time-slot {
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.time-slot:hover { border-color: var(--gold); color: var(--gold-dark); }
.time-slot.selected { background: var(--gold); border-color: var(--gold); color: var(--text); }
.time-slot-placeholder { font-size: 0.8rem; color: var(--muted); padding: 8px 0; }

/* ===== Forms ===== */
.input-group { display: flex; flex-direction: column; gap: 14px; }

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(227, 177, 101, 0.25);
}
.field input::placeholder { color: #b8ada6; }

.field-error {
  display: none;
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 4px;
}
.field-error.visible { display: block; }

.field-row {
  display: flex;
  gap: 10px;
}
.field-row .field { flex: 1; min-width: 0; }

/* ===== Payment section (confirm step, only shown when Boulevard requires a card) ===== */
.payment-section {
  width: 100%;
  margin: 18px 0 4px;
  padding: 16px 16px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: left;
}
.payment-heading {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}
.payment-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 14px;
}
.payment-disclosure {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
  margin-top: -8px;
  margin-bottom: 14px;
}
.payment-section .input-group { gap: 10px; }
.payment-section .field-label {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

/* ===== Buttons ===== */
.btn {
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-btn);
  border: none;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition), transform var(--transition);
  letter-spacing: 0.03em;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Gold pill + dark text mirrors Truly You's own "Book Now" nav button. */
.btn-primary {
  background: var(--gold);
  color: var(--text);
}
.btn-primary:hover:not(:disabled) { background: var(--gold-dark); color: var(--white); }

.btn-secondary {
  background: var(--gold-light);
  color: var(--gold-dark);
}

.btn-cherry {
  background: #00C37D;
  color: var(--white);
}
.btn-cherry:hover:not(:disabled) { background: #00a869; }

.btn-external {
  background: var(--text);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn-external:hover { opacity: 0.85; }

/* ===== Back button ===== */
.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 4px;
  transition: color var(--transition);
}
.back-btn:hover { color: var(--text); }

/* ===== Summary / confirm ===== */
.summary {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  /* .step-content is a column flex container; an overflow:hidden flex item
     defaults to an automatic minimum size of 0, so without flex-shrink:0 the
     flexbox layout can squeeze this element below its content height and
     clip rows off the bottom when the step's total content exceeds the
     available height. */
  flex-shrink: 0;
}
.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.summary-item:last-child { border-bottom: none; }
.summary-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0; }
.summary-value { font-size: 0.88rem; color: var(--text); text-align: right; }
.edit-link { font-size: 0.75rem; color: var(--gold-dark); cursor: pointer; text-decoration: underline; flex-shrink: 0; margin-left: 8px; }

/* ===== Checkmark / confirmation ===== */
.checkmark-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dark);
  margin: 0 auto 4px;
  flex-shrink: 0;
}
.confirmation-step { text-align: center; align-items: center; }
.confirm-message { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }

/* ===== Cherry prompt ===== */
.cherry-prompt {
  width: 100%;
  border: 1.5px solid #d4f5e9;
  border-radius: var(--radius);
  padding: 20px;
  background: #f0fdf8;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}
.cherry-logo-img { height: 22px; width: auto; }
.cherry-title { font-family: 'Prata', serif; font-weight: 400; font-size: 1rem; color: var(--text); }
.cherry-desc { font-size: 0.85rem; color: var(--muted); }
.btn-cherry-apply {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.cherry-apply-icon { flex-shrink: 0; }

/* ===== Consent / legal copy ===== */
.consent-text {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
}
.consent-text a { color: var(--muted); }

.privacy-link {
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}
.privacy-link a { color: var(--muted); }

.cherry-info-box {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: center;
  width: 100%;
  margin: 16px auto 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f9fafb;
}
.cherry-info-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}
.cherry-info-text {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
  text-align: left;
}

/* ===== Microcopy ===== */
.microcopy-bottom {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

/* ===== Loading state ===== */
.loading-text {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  padding: 20px 0;
}

/* ===== Cherry iframe step ===== */
.cherry-step {
  padding: 0;
}
#cherryIframe {
  width: 100%;
  flex: 1;
  border: none;
  min-height: 560px;
}

/* ===== Returning location screen ===== */
.return-location-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== Visit-status cards ===== */
.visit-status-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

[data-step="visit-status"] .step-header {
  text-align: center;
  align-items: center;
}

/* ===== Mobile ===== */
@media (max-width: 520px) {
  body { padding: 0; align-items: flex-start; }
  .form-container {
    border-radius: 0;
    box-shadow: none;
    min-height: 100dvh;
    max-height: 100dvh;
  }
  .step-content { padding: 40px 20px 28px; }
  .logo { margin: -40px -20px 8px; padding: 16px 20px; }
  .time-grid { grid-template-columns: repeat(2, 1fr); }
}
