/* ===== Skills in Bloom — booking widget =====
   Theme tokens come from the site's styles.css (--sib-*). Every use below carries
   a fallback so the widget renders correctly on its own (setup page, manage pages
   or a bare test harness). Mobile-first: single column by default, two columns
   from 680px. */
.booking,
.booking-unavailable {
  --bk-purple: var(--sib-purple, #7B5EA7);
  --bk-purple-dark: var(--sib-purple-dark, #5E4589);
  --bk-pink: var(--sib-pink, #EE4B8A);
  --bk-pink-soft: var(--sib-pink-soft, #FDE9EE);
  --bk-yellow: var(--sib-yellow, #F5C242);
  --bk-green: var(--sib-green, #8DBB5A);
  --bk-blue: var(--sib-blue, #5B8DD6);
  --bk-cream: var(--sib-cream, #FFF8EE);
  --bk-lavender: var(--sib-lavender, #EDE6F7);
  --bk-ink: var(--sib-ink, #3B3350);
  --bk-muted: var(--sib-muted, #6F6885);
  --bk-radius: var(--sib-radius, 18px);
  --bk-font: var(--sib-font, 'Nunito', system-ui, sans-serif);
  --bk-font-display: var(--sib-font-display, 'Quicksand', 'Nunito', system-ui, sans-serif);
  --bk-line: var(--sib-lavender, #EDE6F7);
  --bk-shadow: 0 18px 48px -24px rgba(94, 69, 137, .35), 0 2px 8px -2px rgba(94, 69, 137, .08);
  --bk-focus: 0 0 0 4px rgba(238, 75, 138, .18);
}

.book {
  padding: 64px 0;
  background: linear-gradient(180deg, var(--sib-lavender, #EDE6F7), var(--sib-cream, #FFF8EE));
}

.booking {
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--bk-line);
  border-radius: var(--bk-radius);
  box-shadow: var(--bk-shadow);
  overflow: hidden;
  width: 100%;
  min-width: 0;
  font-family: var(--bk-font);
  color: var(--bk-ink);
}
.booking * { box-sizing: border-box; }

.booking-step { padding: 22px 18px; border-bottom: 1px solid var(--bk-line); }
.booking-step:last-child { border-bottom: 0; }
.booking-step h3 {
  font-family: var(--bk-font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--bk-purple-dark);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bk-purple);
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
  flex: none;
}

/* intro card (single service) */
.booking-intro {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 18px;
  background: var(--bk-lavender);
  border-bottom: 1px solid var(--bk-line);
}
.booking-intro-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--bk-pink);
  color: #fff;
  display: grid;
  place-items: center;
}
.booking-intro-icon svg { width: 22px; height: 22px; }
.booking-intro-title {
  font-family: var(--bk-font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--bk-purple-dark);
}
.booking-intro-sub { color: var(--bk-muted); font-size: .93rem; margin-top: 4px; line-height: 1.5; }

/* service cards (only rendered when more than one service exists) */
.svc-options { display: grid; grid-template-columns: 1fr; gap: 12px; }
.svc-option {
  text-align: left;
  background: var(--bk-cream);
  border: 2px solid var(--bk-line);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: .18s;
  font-family: inherit;
  color: var(--bk-ink);
}
.svc-option:hover { border-color: var(--bk-purple); }
.svc-option.selected { border-color: var(--bk-pink); background: var(--bk-pink-soft); box-shadow: var(--bk-focus); }
.svc-option .svc-name { display: block; font-family: var(--bk-font-display); font-weight: 700; color: var(--bk-purple-dark); font-size: 1.05rem; }
.svc-option .svc-dur { display: block; color: var(--bk-muted); font-size: .9rem; margin-top: 4px; }

/* day chips */
.day-chips {
  display: flex;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.day-chip {
  flex: none;
  min-width: 68px;
  padding: 9px 10px;
  border: 1.5px solid var(--bk-line);
  border-radius: 14px;
  background: #fff;
  color: var(--bk-ink);
  font-family: inherit;
  cursor: pointer;
  transition: .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.day-chip-wd { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--bk-muted); }
.day-chip-d { font-family: var(--bk-font-display); font-weight: 700; font-size: .95rem; }
.day-chip:hover { border-color: var(--bk-pink); }
.day-chip.selected { background: var(--bk-pink); border-color: var(--bk-pink); color: #fff; }
.day-chip.selected .day-chip-wd { color: rgba(255, 255, 255, .85); }

/* date + slots */
.book-date { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 6px; }
.book-date label { font-weight: 700; color: var(--bk-purple-dark); font-size: .9rem; }
.book-date input[type=date] {
  padding: 11px 14px;
  border: 1.5px solid var(--bk-line);
  border-radius: 12px;
  font: inherit;
  background: var(--bk-cream);
  color: var(--bk-ink);
  min-height: 44px;
}
.book-date input[type=date]:focus { outline: none; border-color: var(--bk-pink); box-shadow: var(--bk-focus); }
.book-tz { color: var(--bk-muted); font-size: .85rem; width: 100%; }

.slots { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot {
  padding: 11px 6px;
  min-height: 44px;
  border: 1.5px solid var(--bk-line);
  border-radius: 12px;
  background: #fff;
  font-family: var(--bk-font-display);
  font-weight: 700;
  color: var(--bk-purple-dark);
  cursor: pointer;
  transition: .15s;
  font-size: .92rem;
}
.slot:hover { border-color: var(--bk-pink); color: var(--bk-pink); }
.slot.selected { background: var(--bk-pink); border-color: var(--bk-pink); color: #fff; }
.slots-msg { color: var(--bk-muted); font-size: .95rem; padding: 8px 0 0; }
.slots-msg:empty { padding: 0; }
.slots-msg.error { color: #C0392B; }

/* details */
.book-fields { display: grid; grid-template-columns: 1fr; gap: 12px; }
.book-fields .field { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.book-fields .field.full { grid-column: 1 / -1; }
.book-fields label { font-weight: 700; font-size: .88rem; color: var(--bk-purple-dark); }
.book-fields label .opt { font-weight: 600; color: var(--bk-muted); }
.book-fields input,
.book-fields textarea {
  width: 100%;
  padding: 12px 14px;
  min-height: 46px;
  border: 1.5px solid var(--bk-line);
  border-radius: 12px;
  font: inherit;
  font-size: 1rem; /* ≥16px keeps iOS Safari from zooming on focus */
  background: var(--bk-cream);
  color: var(--bk-ink);
}
.book-fields textarea { resize: vertical; line-height: 1.45; }
.book-fields input::placeholder,
.book-fields textarea::placeholder { color: #A59FB5; }
.book-fields input:focus,
.book-fields textarea:focus { outline: none; border-color: var(--bk-pink); background: #fff; box-shadow: var(--bk-focus); }

.booking-footer {
  padding: 18px;
  background: var(--bk-cream);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.booking-summary { font-size: .95rem; color: var(--bk-ink); }
.booking-summary strong { color: var(--bk-purple-dark); }
.bk-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 15px 26px;
  background: var(--bk-pink);
  color: #fff;
  font-family: var(--bk-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(238, 75, 138, .7);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.bk-btn:hover { background: #E13A7B; transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(238, 75, 138, .8); }
.bk-btn:focus-visible { outline: none; box-shadow: var(--bk-focus); }
.booking-footer .bk-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* confirmation */
.booking-done { padding: 40px 20px; text-align: center; }
.booking-done .check {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--bk-green);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  box-shadow: 0 0 0 10px rgba(141, 187, 90, .18);
}
.booking-done .check svg { width: 34px; height: 34px; }
.booking-done h3 { font-family: var(--bk-font-display); font-weight: 700; font-size: 1.7rem; color: var(--bk-purple-dark); margin: 0 0 10px; }
.booking-done p { color: var(--bk-muted); max-width: 480px; margin: 0 auto 10px; line-height: 1.55; }
.booking-done p strong { color: var(--bk-ink); }
.booking-done .when { font-family: var(--bk-font-display); font-weight: 700; color: var(--bk-pink); font-size: 1.15rem; margin-bottom: 4px; }
.booking-done a { color: var(--bk-purple); font-weight: 700; }

.booking-unavailable { padding: 28px 20px; color: var(--bk-muted); font-family: var(--bk-font); line-height: 1.55; }
.booking-unavailable a { color: var(--bk-purple); font-weight: 700; }

@media (min-width: 680px) {
  .book { padding: 90px 0; }
  .booking-step { padding: 30px 32px; }
  .booking-intro { padding: 24px 32px; }
  .svc-options { grid-template-columns: 1fr 1fr; }
  .book-fields { grid-template-columns: 1fr 1fr; }
  .book-tz { width: auto; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
  .booking-footer { flex-direction: row; align-items: center; justify-content: space-between; padding: 24px 32px; }
  .bk-btn { width: auto; }
  .booking-done { padding: 48px 32px; }
}

/* Email-list opt-in on the booking form */
.bk-optin label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.bk-optin input[type="checkbox"] { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--sib-pink, #EE4B8A); flex: 0 0 18px; }
