/* ============ SOCIAL FIX: BOOK A CALL ============ */
/* The #book section on the home page (book.js) and the manage-my-call page (book/manage.html).
   Builds on styles.css. Chips use the budget-chip look: a hairline box that turns orange when chosen. */

.book [hidden], .manage [hidden] { display: none !important; }

/* ---------- Section ---------- */
.book { padding-block: clamp(70px, 9vw, 120px); border-top: 1px solid var(--line); }
.book .section-head { margin-bottom: clamp(32px, 4vw, 52px); }
.book h2 { font-size: clamp(40px, 6.4vw, 88px); }

/* Picker on the left, details on the right, with the site's shared hairline between them. */
.book-panel { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.book-panel.closed { grid-template-columns: minmax(0, 1fr); }
.book-pick { background: var(--bg); padding: clamp(22px, 3vw, 40px); }
.book-side { background: var(--card); padding: clamp(22px, 3vw, 40px); }
/* Gaps rather than margins, so a hidden step leaves no hole. */
.book-pick, .book-slots, .manage-move { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: clamp(26px, 3vw, 36px); }
.book-label { display: flex; align-items: baseline; gap: 12px; font: 700 13px/1.2 var(--display); letter-spacing: .14em; margin-bottom: 14px; }
.book-label span { font-size: 12px; letter-spacing: .1em; color: var(--accent); }
.book-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.book-row .book-label { margin-bottom: 0; }

/* ---------- Chips ---------- */
.book-type, .book-day, .book-time {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--fg);
  transition: border-color .2s, background .2s, color .2s;
}
.book-type:hover, .book-day:enabled:hover, .book-time:enabled:hover { border-color: var(--accent); }
.book-type[aria-pressed="true"], .book-day[aria-pressed="true"], .book-time[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.book-type:focus-visible, .book-day:focus-visible, .book-time:focus-visible,
.book-arrows button:focus-visible, .book-copy:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.book-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.book-type { display: grid; align-content: start; gap: 6px; padding: 16px 18px 18px; text-align: left; }
.book-type b { font: 700 17px/1.2 var(--display); letter-spacing: -.01em; }
.book-type small { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.book-type span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.book-type[aria-pressed="true"] small, .book-type[aria-pressed="true"] span { color: var(--accent-ink); }

/* Day strip: scrolls sideways; open days carry an orange tick. */
.book-arrows { display: flex; gap: 6px; }
.book-arrows button { width: 44px; height: 44px; border: 1px solid var(--line); font-size: 18px; transition: background .2s, color .2s, border-color .2s; }
.book-arrows button:enabled:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.book-arrows button:disabled { opacity: .3; cursor: default; }
.book-days {
  position: relative; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 3px;
  scrollbar-width: none; padding: 3px; margin: -3px;
}
.book-days::-webkit-scrollbar { display: none; }
.book-day { position: relative; flex: 0 0 66px; height: 88px; scroll-snap-align: start; display: grid; align-content: center; justify-items: center; gap: 5px; }
.book-day small { font-size: 10.5px; line-height: 1; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.book-day b { font: 800 24px/1 var(--display); letter-spacing: -.02em; }
.book-day:enabled::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 7px; height: 3px; border-radius: 2px; background: var(--accent); }
.book-day[aria-pressed="true"] small { color: var(--accent-ink); }
.book-day[aria-pressed="true"]::after { background: var(--accent-ink); }
.book-day:disabled { opacity: .35; background: transparent; cursor: default; }

.book-zone { font-size: 14px; color: var(--muted); margin: -4px 0 16px; }
.book-note { margin-bottom: 16px; padding: 12px 14px; font-weight: 600; border-left: 3px solid var(--accent); background: color-mix(in oklch, var(--accent) 12%, transparent); }
.book-note:empty { display: none; }
.book-note a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.book-note a:hover { color: var(--accent); }
.book-times { display: grid; gap: 10px; }
.book-part { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
.book-part:not(:first-child) { margin-top: 8px; }
.book-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.book-time { min-height: 52px; display: grid; align-content: center; justify-items: center; gap: 5px; padding: 8px 6px; }
.book-time b { font: 700 15px/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.book-time span { font-size: 11.5px; line-height: 1; color: var(--muted); white-space: nowrap; }
.book-time[aria-pressed="true"] span { color: var(--accent-ink); }
.book-time:disabled { opacity: .35; cursor: not-allowed; }

/* Loading */
.book-skel {
  border-color: transparent; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, .04) 30%, rgba(255, 255, 255, .1) 50%, rgba(255, 255, 255, .04) 70%) 0 0 / 300% 100%;
  animation: book-shimmer 1.4s linear infinite;
}
@keyframes book-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* No open times, or booking is down */
.book-closed { display: grid; justify-items: start; gap: 20px; }
.book-closed-msg { font: 700 clamp(18px, 2vw, 22px)/1.3 var(--display); }
.book-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Details ---------- */
.contact-form.book-form { margin-top: 0; position: sticky; top: 100px; }
.book-summary { display: grid; gap: 4px; padding: 14px 16px; border: 1px dashed rgba(255, 255, 255, .22); color: var(--muted); font-size: 15px; }
.book-summary.set { border: 1px solid var(--accent); background: color-mix(in oklch, var(--accent) 10%, transparent); }
.book-summary b { font: 700 17px/1.3 var(--display); color: var(--fg); }
.book-summary span { font-size: 14px; }
.book-status { min-height: 1.4em; text-align: center; font-weight: 600; }
.book-status.ok { color: var(--accent); }
.book-status a { display: block; margin-top: 8px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.book-status a:hover { color: var(--fg); }

/* ---------- Booked ---------- */
.book-done {
  display: grid; justify-items: start; gap: 10px; padding: clamp(28px, 5vw, 64px); outline: none;
  border: 1px solid var(--accent); background: linear-gradient(135deg, color-mix(in oklch, var(--accent) 16%, transparent), transparent 60%);
}
.book-done .eyebrow { margin-bottom: 6px; }
.book-done h3 { font-size: clamp(40px, 6vw, 80px); margin-bottom: 12px; }
.book-done-when { font: 700 clamp(20px, 2.4vw, 30px)/1.25 var(--display); letter-spacing: -.01em; }
.book-done-zone, .book-done-how { color: var(--muted); }
.book-done-how a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.book-done-how a:hover { color: var(--accent); }
.book-done .book-actions { margin: 14px 0 4px; }
.book-done-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; font-size: 14px; color: var(--dim); }
.book-copy { min-height: 44px; font: 700 12px/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.book-copy:hover { color: var(--accent); }

/* After the contact form goes through: offer a call time straight away. */
.book-nudge {
  margin-top: 28px; padding: 24px 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
  text-align: left; border: 1px solid var(--accent); background: color-mix(in oklch, var(--accent) 14%, var(--bg));
  animation: rise .6s ease both;
}
.book-nudge p { flex: 1 1 260px; font-size: 15px; color: var(--muted); }
.book-nudge b { display: block; margin-bottom: 6px; font: 800 clamp(20px, 2.4vw, 26px)/1.1 var(--display); letter-spacing: -.02em; text-transform: uppercase; color: var(--fg); }

/* ---------- Manage my call (book/manage.html) ---------- */
.manage { max-width: 920px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--pad) clamp(80px, 10vw, 140px); }
.manage h1 { font-size: clamp(44px, 7vw, 84px); }
.manage-status { margin-top: 22px; min-height: 1.5em; font-weight: 600; color: var(--muted); }
.manage-status.ok { color: var(--accent); }
.manage-status.err { color: var(--fg); }
.manage-lost { margin-top: 22px; }
.manage-card {
  margin-top: 26px; display: grid; justify-items: start; gap: 10px; padding: clamp(24px, 4vw, 48px); outline: none;
  border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in oklch, var(--accent) 10%, transparent), transparent 55%);
}
.manage-type { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.manage-state { font: 700 11px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; }
.manage-when { font-size: clamp(30px, 4.6vw, 56px); line-height: 1; margin: 4px 0 6px; }
.manage-card.cancelled .manage-when { color: var(--dim); text-decoration: line-through; text-decoration-thickness: 3px; }
.manage-zone, .manage-how, .manage-who { color: var(--muted); }
.manage-how a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.manage-how a:hover { color: var(--accent); }
.manage-card .book-actions, .manage-card > .btn { margin-top: 14px; }
.manage-sure { width: 100%; margin-top: 6px; padding: 18px 20px; display: grid; gap: 14px; border-left: 3px solid var(--accent); background: color-mix(in oklch, var(--accent) 12%, transparent); }
.manage-sure p { font: 700 17px/1.35 var(--display); }
.manage-move { margin-top: 26px; padding: clamp(22px, 3vw, 40px); border: 1px solid var(--line); }
.manage-bar { padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.manage-bar p { flex: 1 1 100%; font: 700 17px/1.35 var(--display); }
.manage-bar .btn:disabled { opacity: .4; cursor: default; transform: none; }
.manage-card.sending .btn, .manage-move.sending .btn { pointer-events: none; opacity: .5; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .book-panel { grid-template-columns: minmax(0, 1fr); }
  .contact-form.book-form { position: static; }
}
/* On short laptop screens the whole form doesn't fit below the sticky offset, so it scrolls with the page
   (book.js brings it into view when they pick a time, as on phones). Keep in step with showPick in book.js. */
@media (max-height: 760px) {
  .contact-form.book-form { position: static; }
}
@media (max-width: 520px) {
  .book-actions .btn, .book-nudge .btn, .manage-bar .btn { width: 100%; justify-content: center; }
  .book-day { flex-basis: 60px; }
  .book-day:enabled::after { left: 21px; right: 21px; }
}
