/* Native scheduler, matching Atrae's hours-left / month-right card. */
[data-scheduler] {
  --booking-paper: #f6f6f7;
  --booking-paper-deep: #eceef1;
  --booking-ink: #16181b;
  --booking-ink-soft: #4b5058;
  --booking-muted: #6f757d;
  --booking-faint: #a3a8b0;
  --booking-line: #e5e7ea;
  --booking-line-soft: #eeeff2;
  --booking-ease: cubic-bezier(.22, 1, .36, 1);
  width: min(780px, 100%);
  min-width: 0;
  margin-inline: auto;
  color: var(--booking-ink);
  font-family: var(--sans);
  text-align: left;
}
[data-scheduler] *, [data-scheduler] *::before, [data-scheduler] *::after { box-sizing: border-box; }
.booking-card, .booking-fallback {
  width: 100%;
  border: 2px solid #cbcfd5;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 1px 2px #181a1e0a, 0 10px 28px #181a1e12;
}
.booking-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); overflow: hidden; }
.booking-card[data-stage="pick"], .booking-card[data-stage="loading"] { height: 400px; }
.booking-hours, .booking-calendar { min-width: 0; padding: 26px 26px 24px; }
.booking-calendar { display: flex; flex-direction: column; }
.booking-hours { display: flex; flex-direction: column; min-height: 396px; border-right: 1px solid var(--booking-line-soft); }
.booking-pane { display: flex; flex: 1; min-height: 0; flex-direction: column; animation: booking-pane-in 280ms var(--booking-ease) both; }
@keyframes booking-pane-in { from { opacity: 0; transform: translateY(6px); } }
[data-scheduler] .booking-day-head h3,
[data-scheduler] .booking-month-head h3,
[data-scheduler] .booking-done h3 {
  margin: 0; color: var(--booking-ink); font: 600 16px/1.3 var(--sans); letter-spacing: -.012em;
}
.booking-meta, .booking-hint { margin: 6px 0 0; color: var(--booking-muted); font-size: 13px; line-height: 1.5; }
.booking-slots {
  display: grid; gap: 8px; max-height: 268px; margin: 18px -6px 0 0; padding: 0 6px 4px 0;
  overflow-y: auto; list-style: none; scrollbar-width: thin;
}
.booking-slot {
  display: flex; width: 100%; height: 42px; align-items: center; justify-content: center;
  border: 1px solid var(--booking-line); border-radius: 10px; color: var(--booking-ink); background: #fff;
  font: 600 14px var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .01em;
  cursor: pointer; transition: border-color 140ms ease, background 140ms ease, transform 160ms var(--booking-ease);
}
.booking-slot:active { transform: scale(.985); }
.booking-form { display: flex; flex-direction: column; gap: 12px; }
.booking-back {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 24px; padding: 0;
  border: 0; color: var(--booking-muted); background: none; font: 500 13px var(--sans); cursor: pointer;
}
.booking-icon { display: block; flex: 0 0 auto; width: 16px; height: 16px; }
.booking-when { margin: 2px 0 6px; color: var(--booking-ink-soft); font-size: 14px; line-height: 1.5; }
.booking-when b { color: var(--booking-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.booking-field { display: grid; gap: 6px; }
.booking-field span { color: var(--booking-ink-soft); font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; }
.booking-field em { color: var(--booking-muted); font-style: normal; font-weight: 500; }
.booking-field input {
  width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--booking-line); border-radius: 10px;
  color: var(--booking-ink); background: #fff; font: 500 14px var(--sans); outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.booking-field input:focus { border-color: var(--booking-ink); box-shadow: 0 0 0 3px #16181b14; }
.booking-button {
  display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 16px; border: 1px solid var(--booking-ink); border-radius: 10px; color: #fff; background: var(--booking-ink);
  font: 600 13px/1.3 var(--sans); text-align: center; cursor: pointer; transition: background 140ms ease;
}
.booking-confirm { width: 100%; margin-top: 6px; }
.booking-button:disabled { opacity: .6; cursor: progress; }
.booking-error { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; color: #9a2f2f; background: #fbeeee; font-size: 13px; line-height: 1.45; }
.booking-error a { font-weight: 600; text-decoration: underline; }
.booking-done { display: flex; flex: 1; flex-direction: column; justify-content: center; }
.booking-done-mark { display: grid; width: 30px; height: 30px; place-items: center; margin-bottom: 16px; border-radius: 8px; color: #fff; background: var(--accent, #c96a43); }
.booking-done .booking-when { margin-top: 10px; }
.booking-hint b { color: var(--booking-ink); font-weight: 600; overflow-wrap: anywhere; }
.booking-meet { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 18px; padding-bottom: 3px; border-bottom: 1px solid var(--booking-ink); color: var(--booking-ink); font-size: 14px; font-weight: 600; }
.booking-month-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.booking-month-nav { display: flex; flex-shrink: 0; gap: 4px; }
.booking-month-nav button {
  display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid var(--booking-line); border-radius: 9px;
  color: var(--booking-ink); background: #fff; cursor: pointer; transition: border-color 140ms ease, color 140ms ease;
}
.booking-month-nav button:disabled { color: var(--booking-faint); cursor: default; opacity: 1; }
.booking-weekdays, .booking-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.booking-weekdays { margin-top: 20px; color: var(--booking-muted); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-align: center; }
.booking-days { margin-top: 8px; }
.booking-card[data-stage="pick"] .booking-days { flex: 1; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
.booking-card[data-stage="pick"] .booking-day { aspect-ratio: auto; }
.booking-day {
  position: relative; display: grid; width: 100%; aspect-ratio: 1; place-items: center; padding: 0; border: 0; border-radius: 10px;
  color: var(--booking-ink); background: var(--booking-paper); font: 600 14px var(--sans); font-variant-numeric: tabular-nums;
  cursor: pointer; transition: background 140ms ease, color 140ms ease;
}
.booking-day:disabled { color: var(--booking-faint); background: transparent; font-weight: 500; cursor: default; opacity: 1; }
.booking-day[aria-pressed="true"] { color: #fff; background: var(--booking-ink); }
.booking-day[data-today]::after { position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; border-radius: 1px; background: var(--accent, #c96a43); content: ""; transform: translateX(-50%); }
.booking-day[aria-pressed="true"][data-today]::after { background: #fff; }
[data-scheduler] :is(button, a):focus-visible { outline: 2px solid var(--accent-ink, #a14725); outline-offset: 2px; }
.booking-fallback { display: grid; justify-items: center; gap: 18px; padding: 36px 32px; text-align: center; }
.booking-fallback p { max-width: 44ch; margin: 0; color: var(--booking-ink-soft); font-size: 15px; line-height: 1.55; }
.booking-fallback-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.booking-retry { color: var(--booking-ink); background: #fff; border-color: var(--booking-line); }
.booking-accessible, .booking-trap { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.booking-trap { left: -10000px; }
.booking-ghost-line, .booking-ghost-list i, .booking-ghost-grid i { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--booking-paper), var(--booking-paper-deep), var(--booking-paper)); background-size: 200% 100%; animation: booking-shimmer 1.4s linear infinite; }
.booking-ghost-line { width: 62%; height: 14px; }
.booking-ghost-line + .booking-ghost-line { width: 44%; margin-top: 10px; }
.booking-ghost-list { display: grid; gap: 8px; margin-top: 22px; }
.booking-ghost-list i { height: 42px; border-radius: 10px; }
.booking-ghost-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 46px; }
.booking-ghost-grid i { aspect-ratio: 1; border-radius: 10px; }
@keyframes booking-shimmer { to { background-position: -200% 0; } }
@media (hover: hover) and (pointer: fine) {
  .booking-slot:hover { border-color: var(--booking-ink); background: var(--booking-paper); }
  .booking-back:hover { color: var(--booking-ink); }
  .booking-month-nav button:hover:not(:disabled) { border-color: var(--booking-ink); }
  .booking-day:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--booking-paper-deep); }
  .booking-button:hover:not(:disabled) { background: #303338; }
  .booking-retry:hover:not(:disabled) { background: var(--booking-paper); }
}
@media (min-width: 601px) and (max-width: 820px) {
  .booking-hours, .booking-calendar { padding: 24px 16px; }
  .booking-month-head { gap: 8px; }
}
@media (max-width: 600px) {
  [data-scheduler] { max-width: 420px; }
  .booking-card { grid-template-columns: 1fr; }
  .booking-card[data-stage="pick"], .booking-card[data-stage="loading"] { height: auto; }
  .booking-calendar { order: -1; border-bottom: 1px solid var(--booking-line-soft); }
  .booking-hours { min-height: 0; border-right: 0; }
  .booking-hours, .booking-calendar { padding: 22px 20px; }
  .booking-field input { height: 44px; font-size: 16px; }
  .booking-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; margin-right: 0; padding-right: 0; overflow: visible; }
  .booking-month-nav button { width: 40px; height: 40px; }
  .booking-card[data-stage="pick"] .booking-days { flex: none; grid-auto-rows: auto; }
  .booking-card[data-stage="pick"] .booking-day { aspect-ratio: 1; }
}
@media (max-width: 600px) {
  .booking-hours, .booking-calendar { padding-inline: 16px; }
  .booking-weekdays, .booking-days { gap: 3px; }
  .booking-fallback { padding: 28px 20px; }
}
@media (max-width: 380px) {
  .booking-hours, .booking-calendar { padding: 20px 12px; }
  [data-scheduler] .booking-month-head h3 { font-size: 15px; white-space: nowrap; }
  .booking-month-head { gap: 6px; }
  .booking-month-nav { gap: 3px; }
  .booking-month-nav button { width: 32px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .booking-pane, .booking-ghost-line, .booking-ghost-list i, .booking-ghost-grid i { animation: none; }
  [data-scheduler] *, [data-scheduler] *::before, [data-scheduler] *::after { transition: none; }
}
