/* booking-agent. Brand colors and the font come from CSS variables set per
   brand in the page <head> (src/pages.tsx → themeCss). */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--hl);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- frame */
.brandbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
}
.brand-mark svg {
  width: 28px;
  height: 28px;
  display: block;
}
.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 64px;
}
.shell-wide {
  max-width: 1080px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.05);
}
.narrow {
  padding: 32px;
}
.center {
  text-align: center;
}
.center p {
  margin-top: 12px;
}
.muted {
  color: var(--muted);
}
.notice {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hl) 10%, var(--surface));
}
.error {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdecec;
  color: #8a1c1c;
}
.check {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--hl);
  color: #fff;
  font-size: 26px;
}

/* ---------------------------------------------------------------- host + home */
.host {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.host-name {
  display: block;
  font-weight: 600;
}
.host-title {
  display: block;
  color: var(--muted);
  font-size: 14px;
}
.home h1 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
}
.lede {
  color: var(--muted);
  margin-top: 6px;
}
.types {
  list-style: none;
  padding: 0;
  margin-top: 28px;
  display: grid;
  gap: 12px;
}
.type {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 20px 48px 20px 20px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.type:hover {
  border-color: var(--hl);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.07);
  transform: translateY(-1px);
}
.type-title {
  font-weight: 600;
  font-size: 18px;
}
.type-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}
.type-meta svg {
  vertical-align: -3px;
}
.type-desc {
  color: var(--muted);
}
.type-go {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hl);
  font-size: 20px;
}

/* ---------------------------------------------------------------- booking page */
.booking {
  display: grid;
  overflow: hidden;
}
.summary {
  padding: 28px;
  border-bottom: 1px solid var(--border);
}
.summary h1 {
  font-size: 26px;
  line-height: 1.25;
}
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.back-link:hover {
  color: var(--text);
}
.facts {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
}
.facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.desc {
  color: var(--muted);
}
.tz {
  margin-top: 20px;
}
.tz label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.tz select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.picker {
  padding: 24px 28px 28px;
  min-height: 420px;
}
.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding: 40px 0;
  justify-content: center;
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--hl);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pick {
  display: grid;
  gap: 28px;
}
.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.month-head h2 {
  font-size: 18px;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 18px;
  line-height: 1;
}
.icon-btn:hover:not(:disabled) {
  border-color: var(--hl);
  color: var(--hl);
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.dow {
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.day {
  position: relative;
  aspect-ratio: 1;
  max-width: 48px;
  width: 100%;
  margin: 0 auto;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.day[disabled] {
  cursor: default;
  opacity: 0.55;
}
.day.open {
  background: color-mix(in srgb, var(--hl) 12%, transparent);
  color: var(--hl);
  font-weight: 700;
}
.day.open:hover {
  background: color-mix(in srgb, var(--hl) 22%, transparent);
}
.day.selected {
  background: var(--hl);
  color: #fff;
}
.day.today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: currentColor;
}

.times h2 {
  font-size: 16px;
  margin-bottom: 4px;
}
.times .count {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}
.group {
  margin-top: 14px;
}
.group h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.slot {
  height: 44px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--hl) 55%, var(--border));
  background: var(--surface);
  color: var(--hl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.12s, color 0.12s;
}
.slot:hover {
  background: var(--hl);
  color: #fff;
}
.empty {
  color: var(--muted);
  padding: 24px 0;
}
.next-open {
  margin-top: 10px;
}

/* ---------------------------------------------------------------- details + done */
.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--hl);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.chosen {
  margin: 14px 0 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--hl) 9%, var(--surface));
}
.chosen strong {
  display: block;
  font-size: 18px;
}
.chosen span {
  color: var(--muted);
  font-size: 14px;
}
.who {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  margin-bottom: 16px;
}
.form {
  display: grid;
  gap: 14px;
  max-width: 520px;
}
.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.field .opt {
  font-weight: 400;
  color: var(--muted);
}
.field input,
.field textarea,
.field select,
.cancel textarea {
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.field textarea,
.cancel textarea {
  min-height: 88px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--hl);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl) 25%, transparent);
}
.field.invalid input,
.field.invalid textarea,
.field.invalid select {
  border-color: #b42318;
}
.field-error {
  color: #b42318;
  font-size: 14px;
  margin-top: 4px;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
}
.button:hover {
  border-color: var(--text);
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.button.primary:hover {
  filter: brightness(1.12);
}
.button.danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
  margin-top: 10px;
}
.button[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.submit {
  width: 100%;
  max-width: 520px;
  font-size: 17px;
}
.fineprint {
  font-size: 13px;
  color: var(--muted);
  max-width: 520px;
}

.done {
  text-align: center;
  padding: 24px 0;
  max-width: 520px;
  margin: 0 auto;
}
.done h2 {
  font-size: 24px;
}
.done .when {
  font-size: 18px;
  margin: 10px 0 6px;
}
.done .actions {
  justify-content: center;
}
.join {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
  font-size: 15px;
}
.join div + div {
  margin-top: 4px;
}

.when {
  font-size: 18px;
  margin: 6px 0 18px;
}
.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin-bottom: 24px;
}
.details dt {
  color: var(--muted);
}
.details dd {
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.cancel {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.cancel summary {
  cursor: pointer;
  color: var(--muted);
}
.cancel form {
  margin-top: 12px;
}
.cancel label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

/* ---------------------------------------------------------------- wider screens */
@media (min-width: 720px) {
  .pick {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 32px;
  }
  .times {
    max-height: 470px;
    overflow-y: auto;
    padding-right: 4px;
  }
  .slots {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 980px) {
  .booking {
    grid-template-columns: 320px minmax(0, 1fr);
  }
  .summary {
    border-bottom: 0;
    border-right: 1px solid var(--border);
    padding: 32px;
  }
  .picker {
    padding: 32px;
  }
}
@media (max-width: 719px) {
  .summary {
    padding: 20px;
  }
  .summary h1 {
    font-size: 22px;
  }
  .picker {
    padding: 20px;
  }
  .narrow {
    padding: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}
.turnstile {
  padding: 0 28px 20px;
}
.narrow h1 {
  font-size: clamp(22px, 5vw, 28px);
  line-height: 1.25;
}
.narrow h2 {
  font-size: 18px;
  margin: 20px 0 8px;
}
.quote {
  margin: 14px 0;
  padding-left: 14px;
  border-left: 3px solid var(--border);
  font-style: italic;
}
.options {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}
.button.option {
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  font-weight: 600;
}
.button.option .muted {
  font-weight: 400;
  font-size: 14px;
}
.button.option:hover {
  border-color: var(--hl);
  color: var(--hl);
}
.admin {
  max-width: 900px;
}
.shell:has(.admin) {
  max-width: 940px;
}
.plain {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}
.small {
  font-size: 13px;
  margin-top: 6px;
}
.funnel {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.funnel th,
.funnel td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.funnel th {
  color: var(--muted);
  font-weight: 600;
}
.suggest {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 15px;
}
.step-title {
  font-size: 20px;
  margin: 14px 0 4px;
}
.step > .muted {
  margin-bottom: 18px;
}
fieldset.propose {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
fieldset.propose legend {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  padding: 0;
}
.propose-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.propose-n {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--hl) 12%, transparent);
  color: var(--hl);
  font-size: 13px;
  font-weight: 700;
}
.propose-row input {
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.propose-row input:focus {
  outline: none;
  border-color: var(--hl);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl) 25%, transparent);
}
.done .plain {
  list-style: none;
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 4px;
}
output.notice {
  display: block;
}
@media (max-width: 719px) {
  .propose-row {
    grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }
  .propose-row input {
    padding: 8px 6px;
    font-size: 15px;
  }
}
