:root {
  --bg: #ffffff;
  --bg-page: #ffffff;
  --surface: #e5e7eb;
  --surface-hover: #d1d5db;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #070a0d;
  --text-2: #3c3e44;
  --muted: #6b7280;
  --muted-2: #9ca3b0;
  --selected: #292929;
  --danger: #dc2626;
  --radius: 8px;
  --radius-lg: 8px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg-page);
  color: var(--text-2);
  font-family: var(--font);
  height: auto;
  overflow-x: hidden;
  overflow-y: hidden;
}
body { -webkit-font-smoothing: antialiased; }
button, input { font-family: inherit; }
.hidden { display: none !important; }

.shell {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

.booker {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  min-height: 490px;
  align-items: stretch;
}

.booker[data-view="calendar"] {
  grid-template-columns: 280px minmax(280px, 1fr) 280px;
}

.booker[data-view="form"],
.booker[data-view="success"] {
  grid-template-columns: 280px minmax(360px, 1fr);
  min-height: 0;
}

.event-pane,
.calendar-pane,
.slots-pane,
.form-pane {
  padding: 24px 20px;
}

.form-pane {
  overflow: visible;
}

.calendar-pane,
.slots-pane,
.form-pane {
  border-left: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.logo-mark {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  display: block;
  flex: 0 0 24px;
}

.event-title {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-2);
  margin-bottom: 10px;
}

.event-desc {
  color: var(--text-2);
  font-size: 14px;
  line-height: 20px;
  margin-bottom: 22px;
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.meta-row svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 2px;
  color: var(--text-2);
}

.tz-btn {
  background: none;
  border: 0;
  color: var(--text-2);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
}

.tz-btn:hover { color: var(--text); }

.tz-wrap { position: relative; flex: 1; }
.tz-pop {
  position: absolute;
  left: -26px;
  top: 28px;
  z-index: 20;
  width: 300px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
  padding: 8px;
}
.tz-pop input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
  margin-bottom: 6px;
}
.tz-list {
  max-height: 220px;
  overflow: auto;
}
.tz-item {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text-2);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.tz-item:hover, .tz-item.is-active { background: #f3f4f6; color: var(--text); }

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  min-height: 36px;
}
.month-label {
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
}
.month-name { font-weight: 600; }
.month-year { font-weight: 500; color: var(--muted); }
.nav {
  display: flex;
  gap: 0;
}
.nav button,
.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.7;
}
.nav button:hover { background: #f3f4f6; color: var(--text); opacity: 1; }

.dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-align: center;
  line-height: 16px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.day {
  height: 52px;
  border: 2px solid transparent;
  background: transparent;
  color: var(--text-2);
  border-radius: 8px;
  cursor: default;
  font-size: 14px;
  font-weight: 300;
  line-height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.day-month {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 2px;
}
.day.is-available {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}
.day.is-available:hover { background: var(--surface-hover); }
.day.is-selected {
  background: var(--selected);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
}
.day.is-selected .day-month { color: #fff; }
.day.is-selected::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
}
.day.is-muted { color: var(--text-2); font-weight: 300; }
.day:disabled { color: var(--text-2); background: transparent; cursor: default; }

.slots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  min-height: 32px;
}
.slots-date {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--text-2);
}
.slots-wd { font-size: 16px; font-weight: 600; line-height: 24px; }
.slots-day { font-size: 14px; font-weight: 500; line-height: 20px; }
.fmt {
  display: flex;
  background: rgba(17, 17, 17, 0.04);
  border-radius: 10px;
  padding: 2px;
}
.fmt button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: 10px;
  cursor: pointer;
  min-width: 36px;
  line-height: 14px;
}
.fmt button.is-on {
  background: #fff;
  color: var(--text-2);
  border-color: var(--border);
  box-shadow: 0 2px 3px rgba(0,0,0,.03), 0 2px 2px -1px rgba(0,0,0,.03);
}

.slot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow: auto;
  padding-right: 2px;
}
.slot {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text-2);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 14px;
  box-shadow: 0 2px 3px rgba(0,0,0,.03), 0 2px 2px -1px rgba(0,0,0,.03);
}
.slot:hover { border-color: #9ca3af; }
.slot.is-selected {
  background: var(--selected);
  color: #fff;
  border-color: var(--selected);
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  cursor: default;
}
.next-btn {
  width: 100%;
  background: var(--selected);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 8px;
  font-weight: 600;
  cursor: pointer;
}

.form-pane h2 { font-size: 18px; margin-bottom: 18px; color: var(--text); }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}
.req { color: #e11d48; }
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
.field input:focus { border-color: var(--text); }
.radios { display: flex; flex-direction: column; gap: 10px; }
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
}
.radio input { accent-color: var(--selected); }
.guests-link {
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -4px 0 16px;
}
.guests-link:hover { opacity: 0.75; }
.legal {
  color: var(--muted);
  font-size: 12px;
  margin-top: 18px;
}
.legal a { color: var(--text-2); }
.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.back {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}
.confirm {
  background: var(--selected);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
}
.confirm:disabled { opacity: 0.55; cursor: wait; }
.error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
}
.empty-slots {
  color: var(--muted);
  font-size: 14px;
  padding: 20px 0;
}
.success {
  text-align: left;
}
.success h2 { font-size: 22px; margin-bottom: 8px; color: var(--text); }
.success p { color: var(--muted); }

.cal-credit {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 12px;
  text-decoration: none;
}

@media (max-width: 900px) {
  .booker[data-view="calendar"] {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .calendar-pane, .slots-pane, .form-pane { border-left: 0; border-top: 1px solid var(--border); }
  .booker[data-view="form"],
  .booker[data-view="success"] { grid-template-columns: 1fr; }
  .slot-list { max-height: none; }
  .field-row { grid-template-columns: 1fr; }
  .day { height: 44px; }
}
