/* The "When" picker on /host (booker.js), after shadcn/ui's calendar with time slots: a card with the month on the
   left and start times on the right, how long it runs and what you picked underneath. In the site's dark palette. */
.booker { border-radius: 8px; background: #0d0e11; box-shadow: inset 0 0 0 1px #ffffff14; overflow: hidden; }
.booker-main { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.booker-label { margin: 0 0 8px; font-size: 12px; color: var(--faint); }

.cal { padding: 14px 12px 12px; }
.cal-head { display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; margin-block-end: 8px; }
.cal-month { margin: 0; text-align: center; font-size: 14px; font-weight: 500; color: var(--strong); }
.cal-nav {
  display: grid; place-items: center; inline-size: 28px; block-size: 28px; padding: 0; border: 0; border-radius: 5px;
  background: transparent; box-shadow: inset 0 0 0 1px #ffffff1f; color: var(--text); cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.cal-nav svg { inline-size: 16px; block-size: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-grid { border-collapse: collapse; }
.cal-grid th { block-size: 28px; padding: 0; font-size: 12px; font-weight: 400; color: var(--faint); }
.cal-grid td { padding: 1px; }
.cal-day {
  position: relative; display: grid; place-items: center; inline-size: 36px; block-size: 36px; padding: 0; border: 0; border-radius: 5px;
  background: transparent; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.cal-day.today { box-shadow: inset 0 0 0 1px #ffffff2e; }
.cal-day.outside { visibility: hidden; }
.cal-day[aria-disabled="true"] { color: var(--faint); opacity: .45; cursor: default; }
.cal-day[aria-pressed="true"] { background: var(--strong); color: var(--bg); box-shadow: none; }
/* A day with something on: a small dot of heat under the number. A day with no time left: crossed out as well. */
.cal-day:is(.booked, .full)::after { content: ""; position: absolute; inset-block-end: 4px; inline-size: 4px; block-size: 4px; border-radius: 50%; background: #ff991e; box-shadow: 0 0 6px #ff6a1f; }
.cal-day.full { text-decoration: line-through; }
.cal-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; font-size: 12px; color: var(--faint); }
.cal-key span { display: inline-flex; align-items: center; gap: 6px; }
.cal-key-some::before { content: ""; inline-size: 5px; block-size: 5px; border-radius: 50%; background: #ff991e; box-shadow: 0 0 6px #ff6a1f; }
.cal-key-full::before { content: "12"; font-size: 11px; text-decoration: line-through; color: var(--text); }
.cal-day[aria-pressed="true"].booked::after { background: var(--bg); }
.cal-day:focus-visible, .cal-nav:focus-visible, .slot:focus-visible, .booker-length:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }

.slots { display: grid; grid-template-rows: auto minmax(0, 1fr); min-inline-size: 0; padding: 14px 12px 12px; box-shadow: inset 1px 0 0 #ffffff14; }
.slot-list { display: grid; align-content: start; gap: 6px; max-block-size: 268px; overflow-y: auto; padding: 2px; scrollbar-width: thin; scrollbar-color: #ffffff26 transparent; }
.slot {
  block-size: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; box-shadow: inset 0 0 0 1px #ffffff1f;
  color: var(--strong); font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.slot[aria-pressed="true"] { background: var(--strong); color: var(--bg); box-shadow: none; }
.slot:disabled { color: var(--faint); text-decoration: line-through; opacity: .5; cursor: default; }
.slot:disabled::after { content: " booked"; font-size: 11px; text-decoration: none; }
.slot-empty { margin: 4px 0 0; font-size: 13px; color: var(--faint); }

.booker-foot { padding: 12px 12px 14px; box-shadow: inset 0 1px 0 #ffffff14; }
.booker-lengths { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.booker-length {
  block-size: 30px; padding: 0 4px; border: 0; border-radius: 5px; background: transparent; box-shadow: inset 0 0 0 1px #ffffff1f;
  color: var(--text); font-size: 12.5px; white-space: nowrap; cursor: pointer; transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.booker-length[aria-pressed="true"] { background: var(--strong); color: var(--bg); box-shadow: none; }
.booker-summary { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--faint); }
.booker-summary strong { font-weight: 500; color: var(--strong); }
.field[data-invalid] .booker { box-shadow: inset 0 0 0 1px #f0a29680; }

@media (hover: hover) and (pointer: fine) {
  .cal-nav:not(:disabled):hover, .cal-day:not([aria-pressed="true"]):not([aria-disabled="true"]):hover,
  .slot:not([aria-pressed="true"]):not(:disabled):hover, .booker-length:not([aria-pressed="true"]):hover { background: var(--surface-2); color: var(--strong); }
}
/* Narrow: times move under the month, in a grid. */
@media (max-width: 460px) {
  .booker-main { grid-template-columns: minmax(0, 1fr); }
  .cal-grid { inline-size: 100%; } .cal-day { inline-size: 100%; aspect-ratio: 1; block-size: auto; max-block-size: 44px; }
  .slots { box-shadow: inset 0 1px 0 #ffffff14; }
  .slot-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-block-size: 190px; }
  .booker-lengths { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .cal-nav, .cal-day, .slot, .booker-length { transition: none; } }
