/* =============================================================================
   PAGE — /book/  (in-page booking flow)
   ============================================================================= */

.book {
  max-width: 820px;
  margin-inline: auto;
}

/* --- Step indicator ------------------------------------------------------- */
.book__steps {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}
.book__steps li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step-small);
  color: var(--fg-soft);
  letter-spacing: 0.02em;
}
.book__steps li span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-gold);
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.book__steps li.is-active { color: var(--fg); }
.book__steps li.is-active span { background: var(--red); border-color: var(--red); color: var(--fg-on-red); }
.book__steps li.is-done span { background: var(--gold); border-color: var(--gold); color: #fff; }

/* --- Service picker (radio cards) ----------------------------------------- */
.picker { display: grid; gap: var(--space-sm); }

.pick {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.pick:hover { border-color: var(--line-gold); transform: translateY(-1px); }
.pick.is-selected {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), var(--shadow-md);
}

/* visually-hidden native radio (still focusable + keyboard-operable) */
.pick__input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
}
.pick__input:focus-visible ~ .pick__check,
.pick:has(.pick__input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }

.pick__num { font-family: var(--font-display); color: var(--gold); font-size: 1.05rem; }
.pick__body { display: grid; gap: 0.15rem; }
.pick__name { font-family: var(--font-display); font-size: var(--step-h4); line-height: 1.05; }
.pick__desc { font-size: var(--step-small); color: var(--fg-muted); }
.pick__meta { text-align: right; display: grid; gap: 0.1rem; }
.pick__price { font-family: var(--font-display); font-size: 1.3rem; color: var(--red); white-space: nowrap; }
.pick__price .from {
  display: block; font-family: var(--font-body); font-size: 0.6rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-soft); line-height: 1;
}
.pick__dur { font-size: var(--step-small); color: var(--gold); }
.pick__check {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  color: var(--red);
  opacity: 0; transform: scale(0.7);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.pick.is-selected .pick__check { opacity: 1; transform: scale(1); }

@media (max-width: 620px) {
  .pick {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "num name price" "num desc desc";
    row-gap: 0.35rem;
  }
  .pick__num { grid-area: num; align-self: start; }
  .pick__body { grid-area: name; }
  .pick__desc { grid-area: desc; }
  .pick__meta { grid-area: price; }
  .pick__check { display: none; }
}

/* --- Continue bar --------------------------------------------------------- */
.book__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line-gold);
}
.book__chosen { color: var(--fg-muted); font-size: var(--step-small); }
.book__chosen strong { color: var(--fg); font-family: var(--font-display); font-weight: 400; }

/* Continue is a JS enhancement; without JS the direct fallback is the path. */
.book__continue { display: none; }
.js .book__continue { display: inline-flex; }

@media (max-width: 620px) {
  /* sticky continue on mobile during selection */
  .js .book__bar {
    position: sticky;
    bottom: 0;
    background: color-mix(in srgb, var(--ivory) 94%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0));
    z-index: 5;
  }
  .book__continue { width: 100%; }
}

/* --- Connective animated path --------------------------------------------- */
.book__path {
  height: 70px;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.book__path svg { width: 120px; height: 70px; }
.book__path path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.book__path circle { opacity: 0; }
.book__path.is-drawn { opacity: 1; }
.book__path.is-drawn path {
  transition: stroke-dashoffset 900ms var(--ease-out);
  stroke-dashoffset: 0;
}
.book__path.is-drawn circle { transition: opacity var(--dur) var(--ease) 800ms; opacity: 1; }

/* --- Booking surface (step 2) --------------------------------------------- */
.book__panel--booking { margin-top: var(--space-xl); }
/* With JS, hide step 2 until the customer continues. Without JS it stays
   visible so the direct Booksy fallback is always reachable. */
.js .book__panel--booking:not(.is-open) { display: none; }

.book__handoff { text-align: center; display: grid; gap: 0.5rem; margin-bottom: var(--space-lg); }
.book__handoff h2 { font-size: var(--step-h3); }
.book__handoff .muted { max-width: 46ch; margin-inline: auto; }

.booksy-surface {
  min-height: 90px;
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
}
.booksy-surface__status {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--fg-muted);
  font-size: var(--step-small);
}
.booksy-surface__spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--line-gold);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: book-spin 0.8s linear infinite;
}
@keyframes book-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .booksy-surface__spinner { animation: none; }
  .book__path path { stroke-dashoffset: 0 !important; }
  .book__path, .book__path circle { opacity: 1 !important; }
}

/* --- Fallback ------------------------------------------------------------- */
.booksy-fallback {
  margin-top: var(--space-md);
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  text-align: center;
}
.booksy-fallback__msg { color: var(--fg-soft); font-size: var(--step-small); }
.booksy-fallback.is-prominent {
  padding: var(--space-md);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
}
