/* ── Booking form — Booksy-style ──────────────────────────────────────── */

/* Outer wrapper — single column, max-width, centered */
.bk-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 100px; /* space for sticky bar */
  min-height: 100vh;
  background: var(--card);
  position: relative;
}

/* ── Header ── */
.bk-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.bk-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  flex-shrink: 0;
  transition: background .12s;
}
.bk-back:hover { background: var(--neutral); }
.bk-back .material-symbols-outlined { font-size: 20px; }

.bk-header-title {
  font-weight: 700;
  font-size: 16px;
  flex: 1;
  text-align: center;
}

.bk-header-spacer { width: 38px; flex-shrink: 0; }

/* ── Step indicator ── */
.bk-steps {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}
.bk-step {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  opacity: .45;
  white-space: nowrap;
  transition: color .15s, opacity .15s;
}
.bk-step--active {
  color: var(--primary);
  opacity: 1;
  font-weight: 700;
}
.bk-step--done {
  color: var(--primary);
  opacity: .55;
}
.bk-step-sep {
  width: 18px;
  height: 1px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

/* ── Provider card ── */
.bk-provider {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.bk-provider-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.bk-provider-icon .material-symbols-outlined { font-size: 26px; }
.bk-provider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.bk-provider-info { flex: 1; min-width: 0; }
.bk-provider-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  margin-bottom: 4px;
}
.bk-provider-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.bk-provider-meta span::before { content: '· '; }
.bk-provider-meta span:first-child::before { content: ''; }

.bk-provider-price {
  font-weight: 800;
  font-size: 20px;
  color: var(--primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  text-align: right;
}
.bk-provider-price span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

/* ── Alert ── */
.bk-alert {
  margin: 12px 20px 0;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #b91c1c;
}

/* ── Section ── */
.bk-section {
  padding: 20px 20px 0;
}

.bk-section-label {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 14px;
}

.bk-section-label--sub {
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.bk-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Calendar ── */
.bk-cal {
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
}

.bk-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.bk-cal-month {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.bk-cal-arrow {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: background .1s, color .1s;
  padding: 0;
}
.bk-cal-arrow:hover:not(:disabled) { background: var(--primary); color: #fff; border-color: var(--primary); }
.bk-cal-arrow:disabled { opacity: .35; cursor: default; }
.bk-cal-arrow .material-symbols-outlined { font-size: 20px; }

.bk-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  padding: 10px 8px 14px;
}

.bk-cal-dname {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 2px;
}

.bk-cal-cell {
  text-align: center;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  border-radius: 50%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto;
  width: 44px;
  height: 44px;
  cursor: default;
  user-select: none;
  transition: background .1s, color .1s;
}

.bk-cal-cell--off {
  color: var(--muted);
  opacity: .35;
}

.bk-cal-cell--on {
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.bk-cal-cell--on:hover {
  background: var(--bg-soft);
}

.bk-cal-cell--today {
  color: var(--primary);
  font-weight: 800;
}

.bk-cal-cell--sel {
  background: var(--primary) !important;
  color: #fff !important;
  font-weight: 700;
}

/* ── Time chips ── */
.bk-chips-section {
  margin-top: 20px;
}

/* Mobile-first: horizontal scroll strip */
.bk-chips-scroll-wrap {
  position: relative;
}
.bk-chips-scroll-wrap::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 32px;
  background: linear-gradient(to right, transparent, var(--card));
  pointer-events: none;
  border-radius: 0 14px 14px 0;
}
.bk-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 4px 10px;
  margin: 0 -4px;
}
.bk-chips::-webkit-scrollbar { display: none; }
.bk-chip { scroll-snap-align: start; flex-shrink: 0; }

/* Desktop: revert to wrap */
@media (min-width: 540px) {
  .bk-chips { flex-wrap: wrap; overflow-x: visible; scroll-snap-type: none; padding: 4px 0 4px; margin: 0; }
  .bk-chips-scroll-wrap::after { display: none; }
}

.bk-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: border-color .1s, background .1s, color .1s;
  font-family: inherit;
  gap: 1px;
  min-width: 96px;
  width: 96px;
}
.bk-chip:hover { border-color: var(--primary); background: rgba(var(--accentRgb),.06); }

.bk-chip--sel {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.bk-chip--sel:hover { background: var(--accentHover); }

/* Already booked by this client (for themselves) */
.bk-chip--mine {
  border-color: rgba(var(--accentRgb),.35);
  background: rgba(var(--accentRgb),.06);
}
.bk-chip--disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
.bk-chip-mine-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary);
  line-height: 1;
  margin-top: 1px;
  min-height: 10px; /* always reserves space so all chips are same height */
}

.bk-chip-time {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.bk-chip-end {
  font-size: 11px;
  opacity: .7;
  line-height: 1;
}

/* ── Selected slots ── */
.bk-selected-section {
  padding: 20px 20px 0;
}

.bk-sel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-md);
  background: rgba(var(--accentRgb),.05);
  margin-bottom: 8px;
}

.bk-sel-icon {
  font-size: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

.bk-sel-text { flex: 1; min-width: 0; }
.bk-sel-date { font-weight: 700; font-size: 13px; }
.bk-sel-time { font-size: 12px; color: var(--muted); margin-top: 1px; }

.bk-sel-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  transition: background .1s, color .1s;
  flex-shrink: 0;
}
.bk-sel-remove:hover { background: var(--bg-soft); color: #ef4444; }
.bk-sel-remove .material-symbols-outlined { font-size: 18px; }

.bk-add-more {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  font-family: inherit;
  transition: background .1s;
}
.bk-add-more:hover { background: rgba(var(--accentRgb),.06); }
.bk-add-more .material-symbols-outlined { font-size: 18px; }

/* ── Info section ── */
.bk-info-section { padding-top: 20px; }

.bk-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.bk-label {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.bk-optional {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
  font-size: 11px;
}

.bk-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--fieldBorder, var(--border));
  background: var(--fieldBg, var(--bg-soft));
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  box-shadow: var(--fieldShadow, none);
  transition: border-color .12s, box-shadow .12s;
  -webkit-appearance: none;
  appearance: none;
}
.bk-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--accentRgb),.15);
}
.bk-input:read-only { opacity: .65; cursor: default; }
.bk-textarea { min-height: 72px; resize: vertical; }
.bk-select { padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23888'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

/* ── Recurrence ── */
.bk-recur {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--bg-soft);
}

.bk-recur-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.bk-recur-toggle input { display: none; }

.bk-recur-ui {
  width: 42px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background .15s;
}
.bk-recur-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.bk-recur-toggle input:checked ~ .bk-recur-ui { background: var(--primary); }
.bk-recur-toggle input:checked ~ .bk-recur-ui::after { transform: translateX(18px); }

.bk-recur-label { font-weight: 600; font-size: 14px; }

.bk-recur-options {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bk-recur-options .bk-input { width: auto; min-height: 40px; font-size: 14px; }

/* ── Attendees ── */
.bk-att-slot {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.bk-att-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.bk-att-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  font-size: 14px;
  cursor: pointer;
}

/* ── Payment row ── */
.bk-payment-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  padding: 12px 0 20px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ── Disabled overlay ── */
.bk-disabled {
  margin: 20px;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.bk-disabled .material-symbols-outlined { font-size: 22px; flex-shrink: 0; }

/* ── Sticky bottom bar ── */
.bk-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--dark-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(0,0,0,.18);
  transition: transform .2s ease, opacity .2s ease;
}
.bk-bar--hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.bk-bar-left { display: flex; flex-direction: column; gap: 2px; }

.bk-bar-total {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.bk-bar-meta {
  font-size: 12px;
  opacity: .65;
  font-weight: 500;
}

.bk-bar-cta {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, transform .1s;
  font-family: inherit;
}
.bk-bar-cta:hover:not(:disabled) { background: var(--accentHover); }
.bk-bar-cta:active:not(:disabled) { transform: scale(.97); }
.bk-bar-cta:disabled {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.45);
  cursor: default;
}

/* ── Responsive: on wide screens, center the bar over the form ── */
@media (min-width: 540px) {
  .bk-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 480px;
    border-radius: 18px 18px 0 0;
  }
}


/* ── Service cards ── */
.bk-services-section { padding: 20px 20px 8px; }

.bk-service-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.bk-service-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, box-shadow .15s;
  font-family: inherit;
  width: 100%;
}
.bk-service-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--accentRgb),.10);
}
.bk-service-card--selected {
  border-color: var(--primary);
  background: rgba(var(--accentRgb),.06);
  box-shadow: 0 0 0 3px rgba(var(--accentRgb),.12);
}
.bk-service-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.bk-service-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.bk-service-card-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
}
.bk-service-card-price span {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}

/* When only 1 service, make it non-interactive visually */
.bk-services-section:has(.bk-service-cards > .bk-service-card:only-child) .bk-service-card {
  cursor: default;
  pointer-events: none;
}

/* ── Chips header (label + timezone badge) ── */
.bk-chips-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.bk-chips-header .bk-section-label { margin-bottom: 0; }
.bk-tz-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Chip availability badges ── */
.bk-chip-spaces {
  display: block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 5px;
  margin-top: 3px;
  letter-spacing: .02em;
}
.bk-chip-spaces--last {
  background: rgba(239,68,68,.12);
  color: #dc2626;
}
.bk-chip-spaces--few {
  background: rgba(217,119,6,.10);
  color: #b45309;
}

/* ── Login prompt ── */
.bk-login-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
}
.bk-login-prompt .material-symbols-outlined { font-size: 17px; flex-shrink: 0; }
.bk-login-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.bk-login-link:hover { text-decoration: underline; }

/* ── Order summary ── */
.bk-order-summary {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--bg-soft);
}
.bk-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.bk-order-row:last-child { border-bottom: 0; }
.bk-order-row-label { color: var(--muted); }
.bk-order-row-price { font-weight: 600; }
.bk-order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid var(--border);
}

/* ── Info block (instructions / policy) ── */
.bk-info-block {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.bk-info-block .material-symbols-outlined {
  font-size: 18px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}
.bk-info-block--policy .material-symbols-outlined { color: var(--muted); }
.bk-info-block-title { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 3px; }
.bk-info-block-body { color: var(--text); }

