/* ==========================================================================
   Booking page (/book). Loaded on that page only.
   The brand gradient marks what the visitor has picked: the time on hover and
   the confirmed time at the end. The chosen day uses its light version.
   ========================================================================== */

/* The build can load this file before the site's CSS, so overrides need to win on specificity. */
.cta.book .cta-title { font-size: clamp(44px, 5.4vw, 76px); }
.book-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 430px); gap: 48px; align-items: end; margin-bottom: 36px; }
.book-head .lede { margin-top: 0; padding-bottom: 6px; }

.book-sample { display: flex; align-items: center; gap: 9px; width: fit-content; margin-bottom: 14px; padding: 8px 14px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; font-weight: 500; }
.book-sample[hidden] { display: none; }
.book-sample .i { width: 15px; height: 15px; }

.book-foot { margin-top: 22px; font-size: 15px; color: var(--muted); }
.book-foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.book-foot[hidden] { display: none; }

/* ---------- The card ---------- */
.book-card {
  position: relative; display: grid; grid-template-columns: 260px minmax(0, 1fr) 290px;
  border-radius: 30px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden;
}
.book-card[data-step="details"] { grid-template-columns: 260px minmax(0, 1fr); }
.book-card[data-step="done"] { grid-template-columns: minmax(0, 1fr); }
.book-card [hidden] { display: none !important; }
.book-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Rail: the meeting, then the time zone, or the chosen time once there is one */
.book-rail { display: flex; flex-direction: column; gap: 22px; padding: 32px 24px 28px 28px; background: var(--card-2); border-right: 1px solid var(--line); }
.book-card .book-meeting { font-size: 25px; letter-spacing: -.035em; line-height: 1.08; }
.book-facts { display: flex; flex-direction: column; gap: 9px; color: var(--ink-2); font-size: 15px; }
.book-facts li { display: flex; align-items: center; gap: 10px; }
.book-facts .i { width: 17px; height: 17px; color: var(--azure); }

.book-when { padding-top: 22px; border-top: 1px solid var(--line); }
.book-when-day { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.book-when-time { margin-top: 4px; font-size: 16px; color: var(--ink-2); }
.book-when-zone { margin-top: 2px; font-size: 14px; color: var(--muted); }
.book-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 14px; font-weight: 500; color: var(--azure); text-decoration: underline; text-underline-offset: 3px; }
.book-link:hover { color: var(--ink); }

/* Month */
.book-cal { display: flex; flex-direction: column; min-width: 0; padding: 30px 28px 22px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.book-card .cal-month { font-size: 25px; letter-spacing: -.035em; }
.cal-nav { display: flex; gap: 6px; }
.cal-arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); transition: border-color .2s, opacity .2s; }
.cal-arrow:hover:not(:disabled) { border-color: var(--ink); }
.cal-arrow:disabled { opacity: .35; cursor: default; }
.cal-arrow .i { width: 17px; height: 17px; }
.cal-prev .i, .book-back .i { transform: scaleX(-1); }

.cal-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; margin: 0 -4px; width: calc(100% + 8px); }
.cal-grid th { padding: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); text-align: center; }
.cal-grid td { padding: 0; height: 56px; }
.cal-day {
  position: relative; display: block; width: 100%; height: 56px; border-radius: 14px;
  font-family: var(--font-display); font-size: 16px; font-weight: 500; color: var(--faint); cursor: default;
}
.cal-day.is-open { background: var(--info-bg); color: var(--ink); font-weight: 600; cursor: pointer; transition: background-color .2s, transform .2s var(--ease); }
.cal-day.is-open:hover { background: #D0DFFB; }
.cal-day.is-open:active { transform: scale(.96); }
.cal-day.is-open.is-picked {
  border: 1.5px solid transparent; color: var(--ink);
  background: linear-gradient(100deg, rgba(134, 174, 255, .2), rgba(111, 209, 124, .2)) padding-box, linear-gradient(#fff, #fff) padding-box, var(--gradient-light) border-box;
}
.cal-day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 7px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }

.book-zone { display: flex; flex-direction: column; gap: 9px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.book-zone label { display: inline-flex; align-items: center; gap: 8px; }
.book-zone label .i { width: 16px; height: 16px; }
.book-zone-pick { position: relative; display: flex; align-items: center; min-width: 0; }
.book-zone-pick select {
  appearance: none; -webkit-appearance: none; width: 100%; height: 40px; padding: 0 28px 0 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--card);
  font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color .2s;
}
.book-zone-pick select:hover { border-color: var(--ink); }
.book-zone-pick .i { position: absolute; right: 9px; width: 14px; height: 14px; pointer-events: none; color: var(--ink); }

/* Times */
.book-times { min-width: 0; padding: 30px 26px 26px; border-left: 1px solid var(--line); }
.book-card .book-times-title { min-height: 40px; display: flex; align-items: center; margin-bottom: 18px; font-size: 18px; letter-spacing: -.02em; line-height: 1.15; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot {
  height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card);
  font-size: 14.5px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .2s var(--ease);
}
.slot:hover, .slot:focus-visible { background: var(--gradient); border-color: transparent; color: #fff; }
.slot:active { transform: scale(.97); }
.slot-in { animation: slotIn .42s var(--ease) both; animation-delay: calc(var(--i) * 14ms); }
@keyframes slotIn { from { opacity: 0; transform: translateY(8px); } }
.slot-skel { height: 46px; border-radius: 12px; background: linear-gradient(100deg, var(--paper) 30%, var(--card-2) 50%, var(--paper) 70%); background-size: 240% 100%; animation: slotShimmer 1.3s linear infinite; }
@keyframes slotShimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.book-empty { margin-bottom: 14px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.book-empty a, .book-done-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.book-notice { margin-bottom: 14px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; font-weight: 500; line-height: 1.35; }

/* Details */
.book-details { min-width: 0; padding: 26px 40px 36px; animation: stepIn .45s var(--ease) both; }
.book-back { margin: 0 0 14px; }
.book-card .book-details-title { margin-bottom: 22px; font-size: 25px; letter-spacing: -.035em; outline: none; }
#book-submit:disabled { opacity: .7; cursor: progress; }
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } }

/* Confirmed: the one big moment in the flow */
.book-done { display: flex; flex-direction: column; align-items: center; padding: 64px 28px 68px; text-align: center; outline: none; }
.book-card .book-done-title { margin-top: 22px; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.04em; }
.book-done-time {
  margin-top: 14px; padding: 0 .06em .08em; font-family: var(--font-serif); font-style: italic;
  font-size: clamp(50px, 8.6vw, 116px); line-height: 1.02; letter-spacing: -.02em;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: stepIn .7s var(--ease) .1s both;
}
.book-done-day { margin-top: 8px; font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-2); }
.book-done-note { max-width: 480px; margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; line-height: 1.55; }
.book-done-note b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .book-head { grid-template-columns: 1fr; gap: 16px; }
  .book-card, .book-card[data-step="details"] { grid-template-columns: minmax(0, 1fr) 270px; }
  .book-rail { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 12px 28px; padding: 26px 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .book-meeting, .book-facts { grid-column: 1; }
  .book-zone, .book-when { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; padding-top: 0; border-top: 0; }
  .book-card[data-step="details"] .book-details { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .book-card, .book-card[data-step="details"] { grid-template-columns: minmax(0, 1fr); border-radius: 24px; }
  .book-rail { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; gap: 16px; }
  .book-zone, .book-when { grid-column: 1; grid-row: auto; padding-top: 16px; border-top: 1px solid var(--line); }
  .book-cal { padding: 22px 16px 18px; }
  .cal-grid { border-spacing: 2px; margin: 0 -2px; width: calc(100% + 4px); }
  .cal-grid td, .cal-day { height: 46px; }
  .cal-day { border-radius: 12px; }
  .book-times { padding: 22px 20px 24px; border-left: 0; border-top: 1px solid var(--line); }
  .book-card .book-times-title { min-height: 0; margin-bottom: 14px; }
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slot { font-size: 14px; }
  .book-details { padding: 20px 20px 26px; }
  .book-done { padding: 48px 20px 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .slot-in, .book-details, .book-done-time { animation: none; }
  .slot-skel { animation: none; }
  .cal-day.is-open:active, .slot:active { transform: none; }
}
