/* ==========================================================================
   Pet Care by Ella — booking request flow (book.html only)
   Phone: one step per screen with a fixed Back / Continue bar (Rover-style).
   Desktop: steps on the left, a sticky request summary on the right.
   ========================================================================== */

.book-intro { padding-top: clamp(1.25rem, .8rem + 2vw, 3.25rem); padding-bottom: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); }
.book-intro__inner { display: grid; gap: .9rem; max-width: 44rem; }
.book-intro h1 { font-size: var(--step-4); }
/* Phones: a shorter intro, so all three services fit above the Continue bar */
@media (max-width: 479.98px) {
  .book-intro { padding-top: .9rem; padding-bottom: .75rem; }
  .book-intro__inner { gap: .5rem; }
  .book-intro h1 { font-size: var(--step-3); }
  .book-intro .lede { font-size: 1rem; line-height: 1.5; }
  .wizard__step[data-step="service"] > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Short phone screens (an iPhone SE, or any phone with the browser bars showing):
   tighter spacing, and the service cards lose their icons. */
@media (max-width: 479.98px) and (max-height: 760px) {
  .wizard { gap: 1rem; }
  .wizard__step[data-step="service"] .choice-list { gap: .5rem; }
  .wizard__step[data-step="service"] .choice { grid-template-columns: minmax(0, 1fr) auto; padding: .8rem 1rem; }
  .wizard__step[data-step="service"] .choice__icon { display: none; }
}

.book-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); align-items: start; }
@media (min-width: 960px) { .book-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 3rem; } }

.wizard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; min-width: 0; }
.wizard__progress { display: grid; gap: .6rem; }
.wizard__progress-text { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--text-2); }
.wizard__progress-text strong { color: var(--text); font-weight: 500; white-space: nowrap; }
.wizard__progress-text span { text-align: right; }
@media (max-width: 479.98px) {
  .wizard__progress-text span { display: none; }
  .wizard[data-at="service"] .wizard__progress-text span { display: inline; }
}
.progress { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--primary); border-radius: inherit; transition: width .35s var(--ease); }

.wizard__step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; min-width: 0; }
.wizard__step > h2 { font-size: var(--step-3); }
.wizard__step h2[tabindex="-1"]:focus, .wizard__step h2[tabindex="-1"]:focus-visible { outline: none; }
.wizard__group > .segmented { justify-self: start; }
@media (max-width: 559.98px) { .wizard__group > .segmented { justify-self: stretch; width: 100%; } }

/* Visit length: a main line and a price line in both options */
.segmented--sub label { grid-template-rows: auto auto; gap: .1rem; line-height: 1.2; padding-block: .5rem; }
.segmented--sub small { font-size: .78rem; font-weight: 400; color: var(--text-2); }
.segmented--sub label:has(input:checked) small { color: inherit; opacity: .8; }

/* "Have you booked with me before?": three answers stack on phones */
@media (max-width: 639.98px) {
  .wizard__group > .segmented--stack { grid-auto-flow: row; grid-auto-rows: auto; justify-self: stretch; width: 100%; border-radius: var(--r-md); }
  .segmented--stack label { border-radius: calc(var(--r-md) - 4px); }
}

/* Start times: one small card per picked day (chips styled in availability.css) */
.time-days { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.time-day { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; padding: .8rem .85rem .9rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.time-day__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.time-day__title { font-family: var(--font-body); font-size: .95rem; font-weight: 500; line-height: 1.3; letter-spacing: 0; }
.time-day > .link-btn { justify-self: start; }

/* "Welcome back": a slim bar above the progress line */
.returning { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; padding: .6rem .9rem; border-radius: var(--r-sm); background: var(--surface-2); font-size: .9rem; color: var(--text-2); }
.returning strong { color: var(--text); font-weight: 500; }
.returning .link-btn { font-size: .85rem; }

/* Status messages stay in the page (for screen readers) but take no space while empty */
.inline-warn:empty, .stay-note:empty, .live-slot:has(> [hidden]:only-child) { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wizard__panel .cal-msg { margin-top: 1rem; }
.wizard__intro { color: var(--text-2); margin-top: -.6rem; max-width: 38rem; }
.wizard__group { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; min-width: 0; }
.wizard__group > .label, .wizard__group > legend { font-size: 1rem; font-weight: 500; }
.wizard__group legend { margin-bottom: .8rem; }
.wizard__panel { padding: clamp(1rem, .7rem + 1.2vw, 1.5rem); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }

.date-readout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.date-readout__item { display: grid; align-content: start; gap: .1rem; padding: .75rem .9rem; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); min-width: 0; }
.date-readout__item small { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.date-readout__item strong { font-weight: 500; font-size: 1rem; }
.date-readout__item[data-empty] strong { color: var(--text-3); font-weight: 400; }
/* The number of nights, under the last day */
.date-readout__note { font-size: .82rem; color: var(--text-2); }
.date-readout__note:empty { display: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--text); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; font-size: .9rem; }

/* Pets */
.pet-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.pet-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: clamp(1rem, .8rem + 1vw, 1.4rem); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.pet-card__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
/* .pet-card .pet-card__title, so the About page's .pet-card rules never restyle it */
.pet-card .pet-card__title { display: flex; align-items: center; gap: .7rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; line-height: 1.1; color: var(--text); min-width: 0; }
.pet-card__title .avatar { --size: 40px; font-size: 1.1rem; }
.pet-card__title span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-card .segmented { width: 100%; }
.pet-card--muted { background: transparent; border-style: dashed; }
.add-pet { justify-self: start; }

/* Review */
.summary-list { display: grid; gap: 0; margin: 0; }
.summary-list > div { display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.summary-list > div:last-child { border-bottom: 0; }
.summary-list dt { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding-top: .15rem; }
.summary-list dd { margin: 0; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.summary-list dd button { margin-top: .25rem; }
@media (max-width: 559.98px) {
  .summary-list > div { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .summary-list dt { padding-top: 0; font-size: .74rem; }
}
.estimate { display: grid; gap: .1rem; }
.estimate__row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-size: .93rem; color: var(--text-2); font-variant-numeric: tabular-nums lining-nums; }
.estimate__row span:last-child { color: var(--text); white-space: nowrap; }
.estimate__total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: .8rem; margin-top: .4rem; border-top: 1px solid var(--line); }
.estimate__total span:first-child { font-weight: 500; }
.estimate__total strong { font-family: var(--font-display); font-size: 2rem; font-weight: 500; line-height: 1; }
.estimate__note { font-size: .82rem; color: var(--text-3); margin-top: .35rem; }

/* Desktop summary card */
.book-summary { display: none; }
@media (min-width: 960px) {
  .book-summary { display: grid; gap: 1rem; position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 24px); padding: 1.5rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
  .book-summary h2 { font-size: 1.7rem; }
  .book-summary__empty { color: var(--text-3); font-size: .95rem; }
}

/* Navigation: fixed bar on phones, inline on desktop */
.wizard__nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .6rem;
  padding: 12px var(--gutter-r) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 34px rgb(51 35 26 / .09);
}
.wizard__nav-est { display: grid; gap: .05rem; min-width: 0; line-height: 1.2; }
/* Wraps rather than cutting off "Drop-In Visits · from $30" on narrow phones */
.wizard__nav-est small { font-size: .74rem; color: var(--text-2); }
.wizard__nav-est strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; }
.wizard__nav .btn { min-height: 50px; padding-inline: 1.25rem; }
.wizard__nav .btn--ghost { padding-inline: 1rem; }
body.has-wizard { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 960px) {
  body.has-wizard { padding-bottom: 0; }
  .wizard__nav { position: static; padding: 1.25rem 0 0; border-radius: 0; border-top: 1px solid var(--line); box-shadow: none; background: transparent; grid-template-columns: auto minmax(0, 1fr) auto; }
  .wizard__nav-est { display: none; }
  .wizard__nav [data-back] { grid-column: 1; }
  .wizard__nav [data-next] { grid-column: 3; }
}

/* Success */
.done { display: grid; gap: 1.25rem; justify-items: start; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.done__mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: var(--on-primary); }
.done__mark .icon { width: 30px; height: 30px; stroke-width: 2; }
.done h2 { font-size: var(--step-3); outline: none; }

/* Time To Pet hub (shown instead of the form once portal links are set) */
.portal-hub { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
.hub-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 900px) { .hub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
.hub-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-content: start; padding: clamp(1.4rem, 1rem + 1.5vw, 2rem); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.hub-card h2 { font-size: var(--step-3); }
.hub-card > p:not(.eyebrow) { color: var(--text-2); }
.hub-card .btn { justify-self: start; margin-top: .25rem; }
.hub-card .link-arrow { justify-self: start; }
.hub-card--rover { background: var(--surface-2); border-color: transparent; }
.hub-foot a { color: var(--text); }

.error-summary ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.error-summary a { color: inherit; }
.inline-warn { font-size: .86rem; color: var(--text-2); padding: .65rem .85rem; border-radius: var(--r-sm); background: var(--surface-2); }
