/* ── Page hero ── */
.booking-hero {
  text-align: center;
  padding: 80px 0 36px;
  max-width: 760px;
  margin: 0 auto;
}
.booking-hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}
.booking-hero p {
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ── Outer centering wrapper ── */
.booking-center {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 0 48px;
}

/* ── Unified booking card ── */
.booking-card {
  background: var(--card-bg);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 14px;
  overflow: hidden;
}

/* ── Step header bar ── */
.booking-step-header {
  display: flex;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(15,23,42,0.06);
  background: transparent;
  gap: 0;
}
.bsh-step {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.bsh-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bsh-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.bsh-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  display: none; /* shown only for active step via JS */
}
.bsh-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 16px;
  transition: background 0.25s;
}
.bsh-line.done { background: var(--green); }

/* ── Card body ── */
.booking-card-body {
  display: flex;
  flex-direction: column;
}

/* ── Step panels ── */
.step-panel {
  flex: 1;
  padding: 24px 28px;
  box-sizing: border-box;
}

/* Step 1: no extra visual chrome — calendar floats on the card */
#step-datetime {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
}
.booking-calendar {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 0;     /* reset stale global .booking-calendar card styling */
  box-shadow: none;     /* so the calendar floats flat on the card, not as a nested box */
  padding: 0;
}

/* Step 2: flex so footer pins to bottom */
#step-details {
  display: flex;
  flex-direction: column;
}
#step-details form {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.form-body {
  flex: 1;
  overflow-y: visible;
  min-height: 0;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.form-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

/* Step 3: scrollable if needed */
#step-confirm {
  overflow-y: auto;
}

/* ── Week calendar ── */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cal-month {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-body);
}
#tz-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.45;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.week-col { display: flex; flex-direction: column; }

/* Day header */
.week-day-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 6px;
  border-radius: 8px 8px 0 0;
  border: 1.5px solid var(--border);
  border-bottom: none;
  background: var(--bg);
  gap: 1px;
  transition: border-color 0.15s, background 0.15s;
}
.week-day-header.past-header { opacity: 0.38; }
.week-day-header.today {
  border-color: rgba(255,105,0,0.5);
  background: rgba(255,105,0,0.04);
}
.week-day-header.today .week-day-num { color: var(--orange); font-weight: 800; }
.week-day-header.has-selection {
  border-color: var(--blue);
  background: var(--blue-glow);
}
.week-day-name  { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.week-day-num   { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); line-height: 1.1; position: relative; display: flex; align-items: center; gap: 3px; }
.week-day-month { font-size: 0.6rem; color: var(--text-muted); }
.today-pip {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  margin-bottom: 2px;
}

/* Slots container */
.week-day-slots {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 5px;
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: var(--card-bg);
  min-height: 200px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,0.2) transparent;
}
.week-day-slots::-webkit-scrollbar { width: 3px; }
.week-day-slots::-webkit-scrollbar-track { background: transparent; }
.week-day-slots::-webkit-scrollbar-thumb { background: rgba(37,99,235,0.22); border-radius: 2px; }
.week-day-slots.past-slots { opacity: 0.35; pointer-events: none; }

/* Empty / booked day */
.slots-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 24px 0;
}

/* Slot button */
.week-slot-btn {
  width: 100%;
  padding: 8px 6px 7px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s, transform 0.1s;
  font-family: inherit;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.slot-sast {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}
.slot-sub {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1;
}
.slot-check { font-size: 0.75rem; }
.week-slot-btn:hover:not(:disabled) {
  background: var(--blue-glow);
  border-color: rgba(37,99,235,0.4);
  color: var(--blue);
  box-shadow: 0 2px 10px rgba(37,99,235,0.1);
  transform: translateY(-1px);
}
.week-slot-btn:hover:not(:disabled) .slot-sub { color: var(--blue); opacity: 0.7; }
.week-slot-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.week-slot-btn.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 3px 12px rgba(37,99,235,0.35);
}
.week-slot-btn.selected .slot-sub { color: rgba(255,255,255,0.75); }
.week-slot-btn.selected .slot-check { color: #fff; }
.week-slot-btn.unavailable {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
}

/* Selected time banner */
#selected-info {
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: rgba(16,185,129,0.07);
  border: 1.5px solid rgba(16,185,129,0.35);
  border-radius: 10px;
  padding: 13px 18px;
  margin-top: 18px;
}
#selected-info.visible { display: flex; }
.sel-icon { color: #10B981; font-size: 1.15rem; flex-shrink: 0; }
.sel-text { line-height: 1.5; }
.sel-local { color: var(--text-muted); font-size: 0.82rem; }

/* Loading / error */
@keyframes cal-spin { to { transform: rotate(360deg); } }
.cal-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  min-height: 200px;
}
.cal-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: cal-spin 0.7s linear infinite;
}
.cal-status-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.55;
  margin: 0;
}

/* Disabled continue button */
.btn-muted, #next-to-details:disabled {
  background: var(--border) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

/* ── Form ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.form-grid.full { grid-template-columns: 1fr; }
.field-error { font-size: 0.78rem; color: #EF4444; margin-top: 5px; display: none; }
.form-input.invalid, .form-select.invalid { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }

.summary-box {
  background: var(--blue-glow);
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--blue);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.summary-box strong { color: var(--blue-dark); }

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

/* ── Confirmation ── */
#step-confirm {
  display: flex;
  flex-direction: column;
}
.confirm-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.confirm-icon-sm {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(16,185,129,0.15);
  border: 2px solid rgba(16,185,129,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: #10B981;
  flex-shrink: 0;
}
.confirm-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.1;
}
.confirm-desc {
  font-size: 0.85rem;
  color: var(--text-body);
  margin: 0;
  line-height: 1.4;
}
/* Two-column details grid */
.confirm-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.confirm-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.confirm-label { color: var(--text-muted); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.confirm-value { color: var(--text-primary); font-weight: 500; word-break: break-word; }
.timezone-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}
.confirm-footer {
  margin-top: auto;
}
.confirm-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.confirm-contact {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}
.confirm-contact a { color: var(--blue); }

/* ── Info row below card ── */
.booking-info-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}
.booking-info-card {
  background: var(--card-bg);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 14px;
  padding: 26px 24px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.booking-info-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15,23,42,0.1);
  box-shadow: 0 4px 16px rgba(15,23,42,0.04), 0 12px 32px rgba(15,23,42,0.04);
}
.what-to-expect {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.what-to-expect li {
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-body);
  line-height: 1.5;
}
.what-to-expect .num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--blue-glow);
  border: 1px solid rgba(37,99,235,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700;
  color: #93C5FD;
  flex-shrink: 0;
  margin-top: 2px;
}
.sidebar-meta { display: flex; flex-direction: column; gap: 10px; }
.sidebar-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-body);
}
.sidebar-meta-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--blue-glow);
  border: 1px solid rgba(37,99,235,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .booking-info-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .booking-hero { padding: 72px 0 20px; }
  .booking-step-header { padding: 16px 20px; gap: 0; }
  .bsh-name { font-size: 0.8rem; }
  .bsh-sub { font-size: 0.7rem; }
  .bsh-line { margin: 0 10px; }
  .step-panel { padding: 20px; }
  #step-details { max-height: none; }
  .booking-info-row { grid-template-columns: 1fr; }
  /* Hide step labels for inactive steps — only show for the active step */
  .bsh-step:not(.active) .bsh-info { display: none; }
}
@media (max-width: 640px) {
  .booking-hero { padding: 64px 0 16px; }
  /* Mobile: drop the multi-step indicator so the calendar sits directly in the card */
  .booking-step-header { display: none; }
  .bsh-sub { white-space: normal; }
  .form-grid { grid-template-columns: 1fr; }
  .step-panel { padding: 16px; min-height: 0; }
  .booking-card-body { min-height: 0; }
  .booking-info-row { grid-template-columns: 1fr; }

  /* Mobile calendar: hide desktop elements */
  #tz-note { display: none; }
  #selected-info { display: none !important; }
  #next-btn-wrap { display: none !important; } /* override inline style; mobile auto-advances on time pick */

  .cal-month { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
  .booking-calendar[data-mob-view="timelist"] .cal-header { display: none; }

  /* Mobile month grid */
  .mob-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 4px 0 0;
  }
  .mob-cal-select-heading {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 8px 0 16px;
  }
  .mob-cal-dow {
    text-align: center;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 8px 0 10px;
  }
  .mob-cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    transition: background 0.12s;
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
  }
  .mob-cal-day.avail {
    background: rgba(37,99,235,0.1);
    color: var(--blue);
    font-weight: 700;
    cursor: pointer;
  }
  .mob-cal-day.avail:active { background: rgba(37,99,235,0.22); }
  .mob-cal-day.mob-today { font-weight: 800; }
  .mob-cal-day.mob-today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--blue);
  }
  .mob-cal-day.mob-selected { background: var(--blue) !important; color: #fff !important; }
  .mob-cal-day.mob-selected::after { background: rgba(255,255,255,0.7); }
  .mob-cal-tz {
    grid-column: 1 / -1;
    text-align: left;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 0 4px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
  }

  /* Mobile time list */
  .mob-tl-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 4px 0 16px;
  }
  .mob-back-btn {
    position: absolute;
    left: 0; top: 4px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.15s;
  }
  .mob-back-btn:active { background: var(--bg); }
  .mob-tl-day { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
  .mob-tl-date { font-size: 0.85rem; color: var(--text-muted); }
  .mob-tl-tz-wrap { margin-bottom: 14px; }
  .mob-tl-tz-label {
    display: block;
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted); margin-bottom: 3px;
  }
  .mob-tl-tz-val { font-size: 0.82rem; color: var(--text-body); display: flex; align-items: center; gap: 5px; }
  .mob-tl-divider { height: 1px; background: var(--border); margin: 0 -16px 18px; }
  .mob-tl-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); text-align: center; margin-bottom: 4px; }
  .mob-tl-duration { font-size: 0.82rem; color: var(--text-muted); text-align: center; margin-bottom: 16px; }
  .mob-time-btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    border: 1.5px solid var(--blue);
    border-radius: 8px;
    background: transparent;
    color: var(--blue);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    margin-bottom: 8px;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
  }
  .mob-time-btn:active, .mob-time-btn.selected { background: var(--blue); color: #fff; }
  .mob-no-slots {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 28px 0;
    line-height: 1.5;
  }
}
