/* Calendly-like booking page. Light theme only, like the product it mirrors. */
:root {
  --blue: #006bff;
  --blue-dark: #0053cc;
  --blue-tint: rgba(0, 107, 255, 0.1);
  --blue-tint-hover: rgba(0, 107, 255, 0.2);
  --ink: #1a1a1a;
  --muted: #5c6168;
  --line: #e6e8eb;
  --faint: #b5b9be;
  --danger: #c4361f;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.45 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 16px;
}

h1, h2, h3, p { margin: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
s { color: var(--muted); }
.muted { color: var(--muted); }
.center { text-align: center; }
.error { color: var(--danger); margin: 12px 0; font-size: 0.95rem; }
.icon { display: block; flex: none; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* --- shell: info panel + picker ------------------------------------------------------------ */
.cal {
  width: 100%;
  max-width: 1060px;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  background: #fff;
  min-height: 580px;
}

.info {
  flex: 0 0 320px;
  padding: 28px 32px 32px;
  border-right: 1px solid var(--line);
}
.info-top { height: 44px; margin-bottom: 4px; }
.host { color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.info h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 700; margin-bottom: 20px; }

.meta { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; color: var(--muted); }
.meta li { display: flex; gap: 10px; align-items: flex-start; }
.meta .icon { margin-top: 2px; }
.meta:empty { display: none; }
#chosen { color: var(--ink); font-weight: 600; margin-top: 16px; }
#chosen .icon { color: var(--muted); }

.back {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.back:hover { background: var(--blue-tint); }
.ico { display: contents; }

.main { flex: 1; padding: 28px 32px 32px; min-width: 0; }
.main h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; }

/* --- date + time picking ------------------------------------------------------------------- */
.pick { display: flex; gap: 32px; align-items: flex-start; }
.pick-left { flex: 0 0 360px; max-width: 100%; }

.cal-head { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; }
.month { font-size: 1.05rem; font-weight: 500; min-width: 170px; text-align: center; }
.nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--blue);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.nav:hover:not(:disabled) { background: var(--blue-tint); }
.nav:disabled { color: var(--faint); cursor: default; }

.weekdays, .days { display: grid; grid-template-columns: repeat(7, 1fr); justify-items: center; }
.weekdays { margin-bottom: 8px; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.days { row-gap: 6px; }

.day {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--faint);
  cursor: default;
}
.day.blank { pointer-events: none; }
.day.open { background: var(--blue-tint); color: var(--blue); font-weight: 700; cursor: pointer; }
.day.open:hover { background: var(--blue-tint-hover); }
.day.on, .day.on:hover { background: var(--blue); color: #fff; }
.day.today::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: currentColor;
}

.tz { margin-top: 28px; }
.tz-label { margin-bottom: 6px; font-size: 0.95rem; }
.tz-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 0;
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.95rem;
  max-width: 100%;
}
.tz-box:hover { background: #f4f5f6; }
.tz-box .icon { color: var(--muted); width: 18px; height: 18px; }
.tz-select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }

.times { flex: 0 0 210px; }
.times h3 { font-size: 1rem; font-weight: 500; margin: 8px 0 16px; }
.time-list { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding: 2px 6px 2px 2px; margin: 0 -6px 0 -2px; }
.time-chip, .time-next {
  font: inherit;
  font-weight: 700;
  height: 52px;
  border-radius: 8px;
  cursor: pointer;
}
.time-chip { width: 100%; border: 1px solid var(--blue); background: #fff; color: var(--blue); }
.time-chip:hover:not(.on) { border-width: 2px; }
.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.time-chip.on { display: grid; place-items: center; background: #4d5055; border-color: #4d5055; color: #fff; cursor: default; }
.time-next { border: 0; background: var(--blue); color: #fff; }
.time-next:hover { background: var(--blue-dark); }

/* --- details form -------------------------------------------------------------------------- */
.details { max-width: 440px; }
.field { display: grid; gap: 6px; margin: 0 0 20px; }
label { font-weight: 600; font-size: 0.95rem; }
input, textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9cdd2;
  border-radius: 8px;
  padding: 11px 12px;
  width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
textarea { resize: vertical; }

.btn {
  font: inherit;
  font-weight: 700;
  border-radius: 40px;
  padding: 13px 24px;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-block;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--blue); color: #fff; margin-top: 4px; }
.btn.primary:hover:not(:disabled) { background: var(--blue-dark); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn:disabled { opacity: 0.6; cursor: progress; }

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

/* --- single-column pages (confirmation, cancel, errors) ------------------------------------- */
.panel {
  width: 100%;
  max-width: 640px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}
.panel-inner { padding: 40px 36px; display: grid; gap: 16px; }
.panel h1 { font-size: 1.6rem; font-weight: 700; }
.ok { color: #0a8a4a; display: grid; place-items: center; }
.box { border: 1px solid var(--line); border-radius: 8px; padding: 20px 24px; }
.box h2 { font-size: 1.05rem; margin-bottom: 14px; }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.manage { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- narrow screens -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .pick.with-times { flex-direction: column; gap: 8px; }
  .pick-left { flex-basis: auto; width: 100%; }
  .times { flex-basis: auto; width: 100%; }
  .time-list { max-height: none; }
}

@media (max-width: 720px) {
  body { padding: 0; }
  .cal { flex-direction: column; border: 0; border-radius: 0; box-shadow: none; min-height: 100vh; }
  .info { flex: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 20px 16px; }
  .info-top { height: auto; }
  .info-top:has(#back:empty) { display: none; }
  .info h1 { font-size: 1.4rem; margin-bottom: 12px; }
  .main { padding: 20px; }
  .day { width: 40px; height: 40px; }
  .panel { border: 0; box-shadow: none; }
  .panel-inner { padding: 28px 20px; }
}

/* --- event description + public profile ------------------------------------------------------ */
.about { color: var(--muted); margin: 8px 0 16px; white-space: pre-line; }
.profile { width: 100%; max-width: 760px; }
.profile header { text-align: center; margin-bottom: 32px; }
.profile h1 { font-size: 1.9rem; font-weight: 700; margin-bottom: 6px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.type-card {
  display: block;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--c, var(--blue));
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
a.type-card:hover { text-decoration: none; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12); }
.type-card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.type-card p { margin-top: 6px; }

/* colors, as classes because the CSP forbids inline styles */
.color-006bff { --c: #006bff; }
.color-0a8a4a { --c: #0a8a4a; }
.color-8247f5 { --c: #8247f5; }
.color-e8590c { --c: #e8590c; }
.color-d6336c { --c: #d6336c; }
.color-1a1a1a { --c: #1a1a1a; }

.legal h2 { font-size: 1.05rem; margin: 8px 0 4px; }
.legal p { color: var(--muted); }
.foot { position: fixed; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 0.8rem; margin: 0; }
.foot a { color: var(--muted); }

/* step 2: morning / afternoon */
.step-label { font-size: 0.9rem; color: var(--muted); margin: 0 0 8px; }
.periods { display: grid; gap: 8px; margin-bottom: 18px; }
.period { display: flex; justify-content: space-between; align-items: center; font: inherit; padding: 12px 14px; border: 1px solid var(--blue); border-radius: 8px; background: #fff; color: var(--blue); cursor: pointer; }
.period span { font-size: 0.85rem; opacity: 0.8; }
.period:hover:not(:disabled):not(.on) { background: var(--blue-tint); }
.period.on { background: var(--blue); color: #fff; }
.period:disabled { border-color: var(--line); color: var(--faint); cursor: default; }
