/* ==========================================================
   TOPHAM & CO — BOOKING PICKER
   Shared by /book and the "You're in" screen on /apply.

   The picker owns no colours of its own. Every page maps its
   palette onto these six properties, which is what lets the
   same markup sit on the rust/paper system and the black one
   without either of them leaking into the other.
   ========================================================== */

.pk{
  --pk-bg:#ffffff;
  --pk-ink:#111111;
  --pk-muted:#6a6a72;
  --pk-line:rgba(0,0,0,.14);
  --pk-accent:#5b30d6;
  --pk-on-accent:#ffffff;
  --pk-radius:24px;
  --pk-ease:cubic-bezier(.23,1,.32,1);
  --pk-sans:inherit;
  --pk-nums:inherit;

  color:var(--pk-ink);
  font-family:var(--pk-sans);
}

.pk *,.pk *::before,.pk *::after{ box-sizing:border-box; }
.pk button{ font-family:inherit; }

/* ---------------------------------------------------- layout */
.pk-grid{ display:grid; grid-template-columns:minmax(260px,400px) minmax(0,1fr); gap:clamp(28px,4vw,64px); align-items:start; }
@media (max-width:820px){ .pk-grid{ grid-template-columns:1fr; gap:36px; } }

.pk-head{ display:flex; align-items:center; gap:16px; min-height:40px; margin-bottom:24px; }
.pk-mth{ font-size:1.35rem; font-weight:500; letter-spacing:-.02em; margin:0 auto 0 0; font-variant-numeric:tabular-nums; }

.pk-nav{ display:flex; gap:4px; }
.pk-arrow{ width:38px; height:38px; display:grid; place-items:center; border:0; border-radius:50%; background:transparent; color:var(--pk-ink); cursor:pointer; transition:background-color .18s var(--pk-ease),color .18s var(--pk-ease); }
.pk-arrow svg{ width:16px; height:16px; stroke:currentColor; stroke-width:1.7; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.pk-arrow:hover:not([disabled]){ background:color-mix(in srgb,var(--pk-ink) 8%,transparent); color:var(--pk-accent); }
.pk-arrow[disabled]{ opacity:.28; cursor:not-allowed; }

/* ------------------------------------------------ month grid */
.pk-dow{ display:grid; grid-template-columns:repeat(7,1fr); gap:4px; margin-bottom:10px; }
.pk-dow span{ text-align:center; font-size:.7rem; font-weight:600; letter-spacing:.35px; text-transform:uppercase; color:var(--pk-muted); }

.pk-days{ display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.pk-cell{ aspect-ratio:1; display:grid; place-items:center; }

.pk-day{
  position:relative; width:min(100%,54px); height:min(100%,54px);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
  border:0; border-radius:50%; background:transparent;
  font-size:1rem; font-weight:400; font-variant-numeric:tabular-nums;
  color:var(--pk-ink); cursor:pointer;
  transition:background-color .18s var(--pk-ease),color .18s var(--pk-ease),transform .12s var(--pk-ease);
}
.pk-day:active{ transform:scale(.94); }
.pk-day:not([disabled]):not([aria-pressed="true"]):hover{ background:color-mix(in srgb,var(--pk-ink) 8%,transparent); }
.pk-day[aria-pressed="true"]{ background:var(--pk-accent); color:var(--pk-on-accent); font-weight:500; }
.pk-day[disabled]{ color:color-mix(in srgb,var(--pk-ink) 26%,transparent); cursor:default; }

/* One isometric cube per day that has time in it, sized by how much, so the
   month reads as density before you have read a single number. The cube is
   the brand unit; nothing else is the pattern. */
.pk-has{ display:flex; align-items:center; justify-content:center; height:11px; }
.pk-cube{ display:block; overflow:visible; }
.pk-day[disabled] .pk-has{ display:none; }

.pk-today{ position:absolute; bottom:6px; left:50%; transform:translateX(-50%); width:12px; height:1px; background:var(--pk-muted); }
.pk-day[aria-pressed="true"] .pk-today{ background:var(--pk-on-accent); }

/* -------------------------------------------------- time rail */
.pk-railhead{ font-size:1.35rem; font-weight:500; letter-spacing:-.02em; margin:0; }
.pk-railzone{ display:block; margin-top:5px; font-size:.7rem; font-weight:600; letter-spacing:.35px; text-transform:uppercase; color:var(--pk-muted); }

/* No container. A hairline baseline and a lot of air. */
.pk-rail{ list-style:none; margin:24px 0 0; padding:0; max-width:400px; }
.pk-slot{
  position:relative; display:flex; align-items:center; width:100%;
  padding:16px 0; border:0; background:transparent;
  font-family:var(--pk-nums); font-size:1.35rem; font-weight:400; letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;
  color:var(--pk-ink); text-align:left; cursor:pointer;
  transition:color .18s var(--pk-ease),padding-left .26s var(--pk-ease);
}
.pk-slot::before{ content:''; position:absolute; left:0; right:0; bottom:0; height:1px; background:var(--pk-line); }
.pk-slot::after{ content:''; position:absolute; left:0; right:0; bottom:0; height:1px; background:var(--pk-accent); transform:scaleX(0); transform-origin:right center; transition:transform .32s var(--pk-ease); }
.pk-slot:hover{ color:var(--pk-accent); }
.pk-slot:hover::after{ transform:scaleX(1); transform-origin:left center; }
.pk-mer{ font-size:.8em; color:var(--pk-muted); margin-left:5px; }
.pk-slot:hover .pk-mer{ color:var(--pk-accent); }

/* Selecting a time slides the next action in beside it, so the
   commitment happens in place rather than at the foot of the page. */
.pk-go{
  margin-left:auto; display:inline-flex; align-items:center; gap:6px;
  font-family:var(--pk-sans); font-size:.8rem; font-weight:600; letter-spacing:.35px; text-transform:uppercase;
  color:var(--pk-accent); opacity:0; transform:translateX(-8px);
  transition:opacity .26s var(--pk-ease),transform .26s var(--pk-ease);
  pointer-events:none;
}
.pk-go svg{ width:14px; height:14px; stroke:currentColor; stroke-width:1.8; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.pk-slot[aria-pressed="true"]{ color:var(--pk-accent); padding-left:14px; }
.pk-slot[aria-pressed="true"]::after{ transform:scaleX(1); transform-origin:left center; }
.pk-slot[aria-pressed="true"] .pk-mer{ color:var(--pk-accent); }
.pk-slot[aria-pressed="true"] .pk-go{ opacity:1; transform:none; }

.pk-note{ margin:24px 0 0; color:var(--pk-muted); max-width:34ch; font-size:.95rem; }
.pk-note a{ color:var(--pk-accent); }

/* The resting state. The handoff calls the cube a field, a mark, a
   background and a loading state; this is it holding the column
   before a day has been chosen. */
.pk-rest{ display:flex; justify-content:center; padding:8px 0 4px; }
.pk-restcube{ opacity:.9; animation:pk-hover 6s ease-in-out infinite; }
.pk-restcube svg{ display:block; overflow:visible; }
@keyframes pk-hover{ 0%,100%{ transform:translateY(-4px); } 50%{ transform:translateY(4px); } }

/* Loading is the same unit, faded, stepping across the grid. */
.pk-sk-cube{ display:grid; place-items:center; opacity:.16; animation:pk-pulse 1.5s ease-in-out infinite; }
.pk-sk-cube svg{ display:block; overflow:visible; }
@keyframes pk-pulse{ 0%,100%{ opacity:.1; } 50%{ opacity:.42; } }

/* Skeleton rows, so the first paint has the shape of the answer
   instead of a spinner that says nothing. */
.pk-sk{ height:14px; border-radius:7px;
  background:linear-gradient(90deg,
    color-mix(in srgb,var(--pk-ink) 5%,transparent),
    color-mix(in srgb,var(--pk-ink) 13%,transparent),
    color-mix(in srgb,var(--pk-ink) 5%,transparent));
  background-size:200% 100%; animation:pk-sheen 1.4s linear infinite; }
@keyframes pk-sheen{ to{ background-position:-200% 0; } }
.pk-sk-day{ border-radius:50%; aspect-ratio:1; height:auto; width:100%; max-width:54px; }
.pk-sk-row{ margin:24px 0; }

/* ----------------------------------------------- timezone bar */
.pk-tz{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:40px; padding-top:20px; border-top:1px solid var(--pk-line); font-size:.75rem; color:var(--pk-muted); }
.pk-tz svg{ width:15px; height:15px; flex:none; stroke:currentColor; stroke-width:1.5; fill:none; }
.pk-tzwrap{ position:relative; display:inline-flex; align-items:center; }
.pk-tzsel{
  appearance:none; -webkit-appearance:none; font-family:inherit;
  font-size:.8rem; font-weight:600; letter-spacing:.2px; color:var(--pk-ink);
  background:transparent; border:0; border-bottom:1px solid var(--pk-line);
  padding:3px 20px 4px 0; cursor:pointer; max-width:min(58vw,300px); text-overflow:ellipsis;
  transition:border-color .18s var(--pk-ease),color .18s var(--pk-ease);
}
.pk-tzsel:hover{ color:var(--pk-accent); border-bottom-color:var(--pk-accent); }
.pk-tzwrap::after{ content:''; position:absolute; right:5px; top:50%; width:6px; height:6px; margin-top:-5px; border-right:1px solid currentColor; border-bottom:1px solid currentColor; transform:rotate(45deg); pointer-events:none; color:var(--pk-muted); }
.pk-now{ font-variant-numeric:tabular-nums; }

/* --------------------------------------------- confirm panel */
/* Shown instead of the full form when the page already collected
   who they are. Asking a second time after a nine question form
   is how you lose someone at the last step. */
.pk-confirm{ max-width:520px; }
.pk-confirm-when{ font-size:1.6rem; font-weight:500; letter-spacing:-.02em; line-height:1.2; margin:10px 0 0; }
.pk-confirm-zone{ margin:8px 0 0; font-size:.8rem; color:var(--pk-muted); }
.pk-confirm-lab{ font-size:.7rem; font-weight:600; letter-spacing:.35px; text-transform:uppercase; color:var(--pk-muted); }
.pk-extra{ margin-top:28px; }
.pk-extra label{ display:block; font-size:.7rem; font-weight:600; letter-spacing:.35px; text-transform:uppercase; color:var(--pk-muted); margin-bottom:10px; }
.pk-ta{ width:100%; min-height:88px; resize:vertical; line-height:1.6; font-family:inherit; font-size:1rem; color:var(--pk-ink); background:transparent; border:0; border-bottom:1px solid var(--pk-line); padding:0 0 10px; border-radius:0; transition:border-color .18s var(--pk-ease); }
.pk-ta:focus{ outline:0; border-bottom-color:var(--pk-accent); }
.pk-actions{ display:flex; flex-wrap:wrap; align-items:center; gap:20px; margin-top:28px; }
.pk-back{ background:none; border:0; padding:0; font-size:.8rem; font-weight:600; letter-spacing:.35px; text-transform:uppercase; color:var(--pk-muted); cursor:pointer; text-decoration:underline; text-underline-offset:4px; }
.pk-back:hover{ color:var(--pk-accent); }
.pk-err{ margin:16px 0 0; color:#c02718; max-width:44ch; }
.pk-err:empty{ margin:0; }

.pk-hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

@media (prefers-reduced-motion:reduce){
  .pk-sk,.pk-sk-cube,.pk-restcube{ animation:none; }
  .pk-sk-cube{ opacity:.24; }
  .pk-slot,.pk-slot::after,.pk-go{ transition:none; }
  .pk-day:active{ transform:none; }
}
