/*
 * Schedule page — booking flow specific styles.
 * Uses tokens from styles.css. Page-specific rules namespaced with .sched-*
 * to avoid collisions with the home page.
 */

.sched-page {
  padding: clamp(96px, 12vw, 160px) 0;
}

.sched-h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.012em;
  font-weight: 400;
  text-wrap: balance;
  margin-bottom: 32px;
  max-width: var(--w-h2);
  color: var(--ink);
}
.sched-h1 i { color: var(--copper); font-style: italic; }

.sched-deck { margin-bottom: 24px; }

.sched-tz-note {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--mid);
  margin: 0 0 56px;
  max-width: var(--w-deck);
}
.sched-tz-label { color: var(--ink); font-weight: 500; }
.sched-tz-note a {
  color: var(--copper);
  border-bottom: 1px solid var(--copper-tint-mid);
}
.sched-tz-note a:hover { border-color: var(--copper); }

/* STEP 1 — contact form. Field anatomy is canonical (.fields, .field,
   .field-label, .field--invalid, .field-error) and lives in styles.css.
   Schedule scopes only the form-level spacing here. */
.sched-form { max-width: 720px; }
.sched-form .fields { margin-bottom: 32px; }

/* STEP 2 — time picker */
.sched-step-intro {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
  color: var(--mid);
  margin: 0 0 32px;
  max-width: var(--w-deck);
}

.sched-status {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--mid);
  padding: 32px 0;
}
.sched-status--error a {
  color: var(--copper);
  border-bottom: 1px solid var(--copper-tint-mid);
}

/*
 * Two-pane picker. Left: compact month calendar. Right: selected day's slot
 * list. On a day with at least one available slot the right pane shows
 * AM/PM groups with booked slots visible-but-disabled (SavvyCal-style); on
 * a fully-booked day it shows only the all-booked callout with no grids.
 */
.sched-picker {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  margin-top: 8px;
  align-items: start;
}
@media (max-width: 880px) {
  .sched-picker {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ── Calendar pane ──────────────────────────────────────────────── */
.sched-cal-pane {
  font-family: var(--font-body);
}
.sched-cal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.sched-cal-month {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
}
.sched-cal-nav {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.sched-cal-nav:hover:not(:disabled) { border-color: var(--copper); color: var(--copper); }
.sched-cal-nav:disabled { color: var(--mid); cursor: not-allowed; opacity: 0.5; }
.sched-cal-nav--hidden { visibility: hidden; }

.sched-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--mid);
  text-align: center;
  margin-bottom: 6px;
}
.sched-cal-weekdays span { padding: 6px 0; }

.sched-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
/* role=row wrapper: ARIA semantics only, layout falls through to cells. */
.sched-cal-row { display: contents; }
.sched-cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  cursor: default;
  padding: 0;
}
.sched-cal-day-num { line-height: 1; }
.sched-cal-day-dot {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--copper);
}
.sched-cal-day--other-month { color: var(--rule-soft); opacity: 0.35; }
.sched-cal-day--disabled { color: var(--mid); cursor: not-allowed; }
.sched-cal-day--available { cursor: pointer; font-weight: 600; }
.sched-cal-day--available:hover { border-color: var(--copper-tint-mid); }
/* All-booked day: clickable so the visitor can see the busy slots and
   understand why nothing's open, but no copper dot or bold (signals "no
   times available" before they click). */
.sched-cal-day--all-booked { cursor: pointer; color: var(--mid); }
.sched-cal-day--all-booked:hover { border-color: var(--rule); }
.sched-cal-day--today .sched-cal-day-num {
  font-weight: 600;
}
.sched-cal-day--selected {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.sched-cal-day--selected .sched-cal-day-dot { background: var(--copper-bright); }

/* ── Slot pane ──────────────────────────────────────────────────── */
.sched-slot-pane { min-width: 0; }
.sched-slot-day-label {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 6px;
}
.sched-slot-tz-note {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--mid);
  margin: 0 0 24px;
}
.sched-slot-list {
  display: flex; flex-direction: column;
  gap: 24px;
}
.sched-slot-group-label {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 10px;
  font-weight: 500;
}
.sched-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sched-slot {
  display: block;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  border-radius: 2px;
  text-align: center;
  width: 100%;
}
.sched-slot--available {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.sched-slot--available:hover { border-color: var(--copper); }
.sched-slot--available[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
/* Disabled slot. Color alone signals disabled state; opacity is intentionally
   not used because it dropped effective text contrast below 3:1. */
.sched-slot--busy {
  background: var(--paper-2);
  color: var(--mid);
  border: 1px solid var(--rule-soft);
  text-decoration: line-through;
  cursor: not-allowed;
}
.sched-slot--busy[disabled] { opacity: 1; }

/* Visually-hidden text for screen readers (e.g., " (booked)" suffix). */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sched-no-slots {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--mid);
  padding: 24px 0;
}
.sched-no-slots a { color: var(--copper); border-bottom: 1px solid var(--copper-tint-mid); }

/* "All times this day are booked" callout shown for a fully-booked day —
   replaces the AM/PM grids entirely so the visitor sees one clear message
   instead of a wall of struck-through times. */
.sched-slot-allbooked-note {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--mid);
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--paper-2);
  border-left: 2px solid var(--copper-tint-mid);
}

/* Status action row (retry button + email fallback) inside error regions. */
.sched-status-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  font-family: var(--font-body);
  font-size: 14px;
}
.sched-status-actions a {
  color: var(--copper);
  border-bottom: 1px solid var(--copper-tint-mid);
}
.sched-status-or { color: var(--mid); }

/* Inline booking error: appears when the booking POST fails. Replaces the
   former native alert(). role="alert" carries an implicit assertive
   live-region semantic, so SR users hear the message when it appears. */
.sched-booking-error {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--paper-2);
  border-left: 2px solid var(--copper);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
}
.sched-booking-error p { margin: 0; }
.sched-booking-error p + p { margin-top: 6px; }

.sched-confirm-bar {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
/* STEP 3 — confirmation */
.sched-confirmed {
  max-width: var(--w-body);
}
.sched-confirmed-h2 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.012em;
  font-weight: 400;
  margin: 0 0 16px;
  color: var(--ink);
}
.sched-confirmed-h2 i { color: var(--copper); font-style: italic; }
.sched-confirmed-deck {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
  color: var(--mid);
  margin: 0 0 32px;
}
.sched-confirmed-deck #sched-confirmed-email { color: var(--ink); font-style: normal; font-weight: 500; }
.sched-confirmed-details {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 40px;
  padding: 24px 28px;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 2px;
}
.sched-confirmed-details strong { font-weight: 600; }
.sched-confirmed-details small {
  display: block;
  margin-top: 14px;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--mid);
}
