/* Bookings (Phase 9.1): the public slot grid and the staff day view.
   Tokens come from theme.css; nothing here picks its own colours. */

/* ---------- slot picker ---------- */

.slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--edge-strong);
  border-radius: calc(var(--radius) - 4px);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.slot:hover { border-color: var(--accent-edge); }
.slot:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.slot.is-picked,
.slot:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.slot.is-full { cursor: not-allowed; opacity: 0.45; }
.slot.is-full:hover { border-color: var(--edge-strong); }
.slot-time { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.slot-free { font-size: 0.68rem; color: var(--ink-faint); }
.slot.is-picked .slot-free,
.slot:has(input:checked) .slot-free { color: var(--accent); }

/* ---------- staff day view ---------- */

/* Rigs are rows, time runs left to right. Columns are set inline from the
   number of interval steps in the day; each booking block spans the columns
   its minutes cover. */
.day-grid {
  display: grid;
  grid-template-columns: 8rem repeat(var(--day-cols), minmax(2.6rem, 1fr));
  gap: 2px;
  min-width: calc(8rem + var(--day-cols) * 2.6rem);
}
.day-grid .day-head {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.2rem 0.15rem;
  border-bottom: 1px solid var(--edge);
  white-space: nowrap;
  overflow: hidden;
}
.day-grid .day-rig {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.35rem 0.5rem;
  border-right: 1px solid var(--edge);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  min-height: 3rem;
}
.day-grid .day-rig small { font-weight: 400; font-size: 0.68rem; color: var(--ink-faint); }
.day-grid .day-cell {
  border-radius: 4px;
  background: var(--surface);
  min-height: 3rem;
}
.day-grid .day-cell.is-closed { background: transparent; border: 1px dashed var(--edge); }
.day-grid .day-cell.is-now { box-shadow: inset 0 0 0 1px var(--accent-edge); }
.day-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--edge-strong);
  background: var(--surface-2, var(--surface));
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.25;
  min-height: 3rem;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.day-block:hover { border-color: var(--accent-edge); background: var(--accent-soft); }
.day-block.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day-block strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-block small { font-size: 0.66rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-block.status-held { border-style: dashed; color: var(--ink-muted); }
.day-block.status-confirmed { border-color: rgba(56, 189, 248, 0.35); background: rgba(56, 189, 248, 0.08); }
.day-block.status-checked_in { border-color: rgba(52, 211, 153, 0.35); background: var(--pb-soft); }
.day-block.status-completed { opacity: 0.6; }
.day-block.status-no_show { border-color: rgba(248, 113, 113, 0.35); background: var(--danger-soft); }
.day-block.status-cancelled { opacity: 0.45; text-decoration: line-through; }
.day-block.is-walkin { border-style: dotted; color: var(--ink-muted); }
