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

/* Page padding (.single-page) and H1 (.page-h1) are now system-level
   classes defined in styles.css — see the section-padding rules there.
   Schedule-specific styles below this line. */


/* 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;
}

/*
 * 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; }
/* role=gridcell wrapper around interactive day buttons: ARIA semantics
   only, layout falls through to the button so the button becomes the
   grid item and inherits .sched-cal-day sizing. Inert (out-of-month)
   cells use a single div carrying both the gridcell role and the
   .sched-cal-day styling — they don't get this wrapper. */
.sched-cal-cell { 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);
}

.sched-confirm-bar {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

/* "Send as a message" escape hatch.
   Sits below the picker and confirm-bar as the always-available
   alternative when no slot fits. No divider rule above: top margin
   alone carries the visual separation since the wording (and the
   picker visible above it) already communicates "alternative path."
   The link inside is a button styled as a copper underlined link
   matching the .async-error-actions a treatment used elsewhere. */
.sched-message-prompt {
  margin-top: 56px;
}
.sched-message-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 15px;
  text-align: left;
  color: var(--copper);
  /* text-decoration (not border-bottom) so the underline wraps with
     each line of text on mobile. Border-bottom would underline only
     the last wrapped line, which reads as a layout bug. The .email
     link in the contact card keeps its border-bottom because it's
     a single short string that never wraps. */
  text-decoration: underline;
  text-decoration-color: var(--copper-tint-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: text-decoration-color 0.18s;
}
.sched-message-link:hover { text-decoration-color: var(--copper); }
.sched-message-link[disabled],
.sched-message-link[aria-busy="true"] {
  color: var(--mid);
  text-decoration-color: var(--rule);
  cursor: progress;
}
.sched-message-link .arrow {
  display: inline-block;
  transition: transform 0.22s ease;
}
.sched-message-link:hover .arrow,
.sched-message-link:focus-visible .arrow { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
  .sched-message-link .arrow { transition: none; }
  .sched-message-link:hover .arrow,
  .sched-message-link:focus-visible .arrow { transform: none; }
}

/* STEP 3 — confirmation. Container + heading + deck use the canonical
   .confirmed family in styles.css. .sched-confirmed-details below is
   booking-specific (date / time / TZ block) and stays page-scoped. */
.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);
}
