/* Booking page (/calendar). Palette and theme rules follow the homepage: saved "theme" wins, otherwise the device setting. */
/* Palette tokens. Imported here too so pages that link only this file (the Google connect result page) stay themed. */
@import url(/shared/theme.css?v=2026-12-04.1);
@font-face {
  font-family: "Geist";
  src: url(/fonts/geist-var.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Colours come from /shared/theme.css (linked before this file): plain white light, near-black dark, one blue accent.
   Only booking-page tokens live here. */
:root {
  --soft: rgba(11, 92, 194, .08);
  --soft-2: rgba(11, 92, 194, .16);
  --ok: #0d6e3c;
  --ok-bg: rgba(13, 110, 60, .10);
  --err: #8a1f3d;
  --err-bg: #f7e1e4;
  --note-bg: #f6ecd2;
  --note-ink: #7a4a00;
  --r: 18px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme=dark] {
  --soft: rgba(143, 195, 255, .10);
  --soft-2: rgba(143, 195, 255, .18);
  --ok: #4ade80;
  --ok-bg: rgba(74, 222, 128, .14);
  --err: #ffb4c4;
  --err-bg: rgba(255, 99, 132, .14);
  --note-bg: rgba(251, 191, 36, .12);
  --note-ink: #fcd98a;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh;
  font: 400 16px/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3 { font-weight: 650; letter-spacing: -.03em; line-height: 1.12; text-wrap: balance; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 50; background: var(--btn); color: var(--on-btn); padding: .6rem 1rem; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 1rem; }
.muted { color: var(--text-2); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 60px; padding: 0 clamp(10px, 3vw, 32px);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 var(--hair);
}
.back-home {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px 0 6px;
  border-radius: 12px; font-size: 14px; font-weight: 550; text-decoration: none; color: var(--text-2);
}
.back-home svg { width: 18px; height: 18px; }
.back-home .short { display: none; }
@media (max-width: 420px) { .back-home .short { display: inline; } }
.back-home:hover { color: var(--text); background: var(--soft); }
.brand {
  display: flex; align-items: center; gap: 9px; min-height: 44px;
  font-weight: 650; font-size: 17px; letter-spacing: -.03em; text-decoration: none;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.brand img { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--gold); object-fit: cover; }
.brand b { color: var(--gold); }
.theme-btn {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  color: var(--text-2); box-shadow: inset 0 0 0 1px var(--hair-2);
}
.theme-btn:hover { color: var(--text); background: var(--soft); }
.theme-btn svg { width: 20px; height: 20px; grid-area: 1 / 1; }
:root[data-theme=light] .theme-btn .sun, :root:not([data-theme=light]) .theme-btn .moon { display: none; }

/* Layout */
.shell { width: min(1040px, 100% - 20px); margin: 18px auto 48px; }
.booking {
  display: grid; grid-template-columns: 1fr;
  background: var(--card); border-radius: 26px;
  box-shadow: inset 0 0 0 1px var(--card-border), var(--sh-float);
}
.host { min-width: 0; padding: 22px 18px 18px; border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; gap: 8px; }
.host-top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.host-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--gold); }
.host-name { font-weight: 650; }
.host-role { font-size: 14px; color: var(--text-2); }
.title { font-size: clamp(24px, 5vw, 30px); }
.desc { color: var(--text-2); font-size: 15px; }
.desc:empty { display: none; }
.meta { display: grid; gap: 8px; margin-top: 6px; font-size: 14px; font-weight: 550; color: var(--text-2); }
.meta li { display: flex; align-items: center; gap: 10px; }
.meta svg { width: 18px; height: 18px; flex: none; color: var(--gold); }
.tz { display: grid; gap: 6px; margin-top: 10px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.tz select {
  font-size: 15px; font-weight: 550; text-transform: none; letter-spacing: 0; color: var(--text);
  min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--hair-2); background: var(--card-2);
  width: 100%; min-width: 0;
}
.step-back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px 0 6px; margin-top: 4px;
  border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--accent);
}
.step-back svg { width: 18px; height: 18px; }
.step-back:hover { background: var(--soft); }

.main { min-width: 0; padding: 22px 16px 26px; }
.step-title { font-size: 21px; margin-bottom: 16px; }
.step-title:focus { outline: none; }

/* Step 1: types */
.types { display: grid; gap: 12px; }
.type {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 14px; row-gap: 4px;
  min-height: 72px; padding: 16px 18px; border-radius: var(--r); text-decoration: none;
  background: var(--card-2); box-shadow: inset 0 0 0 1px var(--card-border);
  transition: transform .2s ease, box-shadow .2s ease;
}
.type:hover, .type:focus-visible { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--gold), 0 14px 30px -18px rgba(11, 92, 194, .35); outline: none; }
.type-name { grid-column: 1; font-weight: 650; font-size: 17px; }
.type-desc { grid-column: 1; color: var(--text-2); font-size: 14.5px; }
.chip {
  grid-column: 2; grid-row: 1 / span 2; padding: 6px 11px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; font-weight: 650; color: var(--accent); background: var(--soft); box-shadow: inset 0 0 0 1px var(--soft-2);
}
.fine { margin-top: 16px; font-size: 13.5px; color: var(--text-3); }

/* Step 2: month + times */
.picker { display: grid; grid-template-columns: 1fr; gap: 22px; }
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.month-label { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.month-nav { display: flex; gap: 6px; }
.month-nav button {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--text);
}
.month-nav button svg { width: 18px; height: 18px; }
.month-nav button:hover:not(:disabled) { background: var(--soft); }
.month-nav button:disabled { opacity: .3; cursor: default; }
.weekdays, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.weekdays span { text-align: center; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding-bottom: 6px; }
.day {
  aspect-ratio: 1; min-height: 44px; display: grid; place-items: center; border-radius: 12px;
  font-size: 15px; font-weight: 600; color: var(--text-3); opacity: .55; cursor: default;
  font-variant-numeric: tabular-nums;
}
.day.open { opacity: 1; color: var(--accent); background: var(--soft); box-shadow: inset 0 0 0 1px var(--soft-2); cursor: pointer; }
.day.open:hover { background: var(--soft-2); }
.day.selected, .day.selected:hover { background: var(--btn); color: var(--on-btn); box-shadow: none; }
.day.today { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.days.loading { opacity: .5; }
.times-label { font-size: 16px; margin-bottom: 10px; min-height: 22px; }
.time-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.time {
  min-height: 48px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--soft-2); background: transparent; font-variant-numeric: tabular-nums;
  transition: background .15s ease, color .15s ease;
}
.time:hover, .time:focus-visible { background: var(--btn); color: var(--on-btn); box-shadow: none; }
.empty { grid-column: 1 / -1; font-size: 14.5px; color: var(--text-2); }
.note { margin-top: 16px; font-size: 13.5px; font-weight: 550; color: var(--note-ink); padding: 10px 14px; border-radius: 12px; background: var(--note-bg); }
.time-list .error { grid-column: 1 / -1; }

/* Step 3: details */
.form { display: grid; gap: 6px; max-width: 520px; }
.form label { font-size: 14px; font-weight: 600; margin-top: 8px; }
.form .req { color: var(--gold); }
.form .opt { font-weight: 450; color: var(--text-3); }
.form input, .form textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; font-size: 16px;
  border: 1px solid var(--hair-2); background: var(--card-2); color: var(--text);
}
.form textarea { resize: vertical; min-height: 92px; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
.form .btn { justify-self: stretch; margin-top: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { padding: 10px 14px; border-radius: 12px; background: var(--err-bg); color: var(--err); font-size: 14px; font-weight: 600; margin-top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--btn); color: var(--on-btn); font-size: 15px; font-weight: 650; text-decoration: none;
  transition: transform .2s ease, filter .2s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--hair-2); }

/* Step 4: confirmation */
.done { display: grid; justify-items: start; gap: 6px; }
.check { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); margin-bottom: 8px; }
.check svg { width: 30px; height: 30px; }
.done .step-title { margin-bottom: 0; }
.summary {
  display: grid; grid-template-columns: 64px 1fr; gap: 10px 14px; width: 100%; max-width: 560px;
  margin: 14px 0 18px; padding: 16px 18px; border-radius: var(--r); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--card-border);
}
.summary dt { font-size: 12px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding-top: 3px; }
.summary dd { font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.again { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-size: 14.5px; font-weight: 600; color: var(--accent); }
.redirect { margin-top: 4px; font-size: 13.5px; color: var(--text-3); }

/* Plain pages (connect / callback) */
.cal-plain .shell { max-width: 560px; margin-top: 10vh; }
.card { background: var(--card); border-radius: 26px; box-shadow: inset 0 0 0 1px var(--card-border), var(--sh-float); }
.notice-card { padding: 28px 24px; display: grid; gap: 12px; justify-items: start; }

@media (min-width: 560px) {
  .shell { width: min(1040px, 100% - 40px); margin-top: 28px; }
  .host { padding: 28px 28px 22px; }
  .main { padding: 28px 28px 32px; }
  .weekdays, .days { gap: 6px; }
  .form .btn { justify-self: start; }
}
@media (min-width: 900px) {
  .booking { grid-template-columns: 300px 1fr; }
  .host { border-bottom: 0; border-right: 1px solid var(--hair); padding: 34px 28px; }
  .step-back { margin-top: auto; }
  .main { padding: 34px 36px 40px; min-height: 520px; }
  .picker { grid-template-columns: 1fr 220px; gap: 28px; }
  .time-list { grid-template-columns: 1fr; max-height: 420px; overflow-y: auto; padding: 2px 4px 2px 2px; align-content: start; }
}
@media (max-width: 420px) {
  .back-home .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
/* Phones: after step 1 the host panel only keeps what the guest needs (title, length, time, zone). */
@media (max-width: 899px) {
  .booking:has(.main:not([data-step=types])) .desc,
  .booking:has(.main:not([data-step=types])) .host-role { display: none; }
  .booking:has(.main:not([data-step=types])) .host-avatar { width: 44px; height: 44px; }
}
