/* Booking: the Book and Move pages (Book.dc.html, MobileBook.dc.html) and the slot picker the Welcome
   page embeds. Built from app.css tokens and classes only: no colors, shadows, radii or motion values of
   its own. Desktop first; under 768 px the week strip replaces the month grid and the confirm panel docks
   at the bottom of the screen. */

/* Page frame */

.book {
  display: flex;
  flex-direction: column;
}

.book > .notice {
  margin-top: 24px;
}

/* The sessions strip: '1 to book · Beginner · valid to 18 Feb 2027' and the tick bar. */

.book-strip {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  min-height: 64px;
  margin-top: 24px;
  padding-block: 12px;
}

.book-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink-700);
}

.book-current .book-count {
  font-size: 17px;
  line-height: 24px;
  font-weight: 500;
  color: var(--ink-900);
}

.book-refill {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.book-refill form {
  display: flex;
}

.book-chip {
  display: none;
}

/* Three columns: the month grid and the day's times in one card, the confirm panel beside it. */

.book-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  margin-top: 48px;
}

.book-choose {
  display: grid;
  grid-column: span 8;
  grid-template-columns: 372px 1px minmax(0, 1fr);
  column-gap: 48px;
}

.book-days,
.book-times {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.book-divider {
  background: var(--ink-200);
}

.book-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--target);
}

.book-nav-arrows {
  display: flex;
  gap: 4px;
}

.book-week {
  display: none;
}

.book-times > h2 {
  display: flex;
  align-items: center;
  min-height: var(--target);
}

.book-start {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-700);
}

.book-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.book-zone a,
.book-links a,
.book-start a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}

.slot-choice {
  display: block;
}

/* The confirm panel: what the slot is, its consequences, the one filled button. */

.book-confirm {
  grid-column: span 4;
}

.book-confirm-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.book-confirm-title {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 24px;
  font-weight: 500;
  color: var(--ink-900);
}

.book-when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 4px;
  color: var(--ink-900);
}

.book-when-main {
  color: var(--ink-900);
}

.book-rules {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-200);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-700);
}

/* Nothing chosen yet: no lines, so no divider either. */
.book-rules:not(:has(> p:not([hidden]))) {
  display: none;
}

.book-submit,
.book-done > .btn:last-child {
  margin-top: auto;
}

.book-done .book-when-main {
  font-size: 17px;
  line-height: 24px;
  font-weight: 500;
}

.book-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* '0 to book.' and 'Consultation held.': centered, one action. */
.book-finished {
  align-items: center;
  justify-content: center;
  padding-block: 40px;
  text-align: center;
}

.book-cancel {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.book-cancel form {
  display: flex;
}

/* The crossfade when the choice changes: booking.js adds is-changing for one frame (instant under
   reduced motion, where app.css turns transitions off). */
.xfade.is-changing {
  opacity: 0;
  transition: none;
}

/* The embedded picker (Welcome): days listed without JavaScript, tabs with it. */

.slot-picker {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.slot-picker-days {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slot-tabs {
  /* Many days (the whole booking horizon) scroll sideways; equal 1fr columns squeezed them under 56 px. */
  grid-auto-columns: 56px;
  overflow-x: auto;
  scrollbar-width: none;
}

.slot-tabs .day {
  min-width: 56px;
}

.slot-tabs .day[aria-pressed="true"] .micro {
  color: var(--ink-300);
}

.slot-day-label {
  margin-bottom: 8px;
}

/* Tablet: the panel goes under the card. */

@media (max-width: 1023px) {
  .book-choose,
  .book-confirm {
    grid-column: 1 / -1;
  }

  .book-choose {
    column-gap: 32px;
  }
}

/* Phone (MobileBook.dc.html): chip, week strip, times, and the panel docked above the tab bar. */

@media (max-width: 767px) {
  .book-strip {
    display: none;
  }

  .book-current {
    display: flex;
  }

  .book-chip {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 16px;
  }

  .book-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
  }

  .book-choose {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .book-month,
  .book-divider,
  .book-times > h2 {
    display: none;
  }

  .book-week {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .book-nav-arrows {
    margin-right: -12px;
  }

  .book-confirm.dock {
    gap: 12px;
    border-width: 1px 0 0;
    border-radius: 0;
  }

  .book-confirm [data-slot-field="session"],
  .book-topic {
    display: none;
  }

  .book-confirm .book-rules {
    padding-top: 0;
    border-top: 0;
  }

  .book-when {
    justify-content: space-between;
  }

  .book-when-main {
    font-family: var(--font-serif);
    font-size: 28px;
    line-height: 32px;
    letter-spacing: -0.01em;
    color: var(--navy-800);
    white-space: nowrap;
  }

  .book-when-zone {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
    color: var(--ink-500);
  }

  .book-finished {
    padding-block: 24px;
  }
}
