/* Enrollment form: in-person tour question + mini tour calendar (enroll-tour.js).
   Uses the --atob-* tokens from tour-tokens.css (loaded first). The day/time styles mirror
   tour-booker.css; that file is not loaded here because it styles body, .btn and .form-row
   globally and would restyle the enrollment form. Everything is scoped under .et-*.
   1-year immutable cache (vercel.json): bump ?v= in enroll.html on any change. */
.et-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* In-form summary chip */
.et-chip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px;
  padding: 12px 14px; border: 1px solid var(--atob-purple-mist); border-radius: 12px; background: var(--atob-purple-wash);
}
.et-chip-text { flex: 1 1 220px; min-width: 0; font-size: 14px; line-height: 1.45; color: var(--atob-charcoal); }
.et-chip-text strong { color: var(--atob-purple); }
.et-chip-actions { display: flex; gap: 8px; }
.et-link {
  font: 700 13px/1 var(--atob-font-body); color: var(--atob-purple); padding: 9px 12px; min-height: 36px;
  border: 1.5px solid var(--atob-purple); border-radius: var(--atob-radius-btn); background: var(--atob-white); cursor: pointer;
  transition: background-color var(--atob-dur) var(--atob-ease);
}
.et-link:hover { background: var(--atob-purple-mist); }
.et-link--quiet { border-color: transparent; background: transparent; color: var(--atob-slate); }
.et-link--quiet:hover { background: var(--atob-white); color: var(--atob-purple); }
.et-note { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--atob-slate); }
.et-link:focus-visible, .et-btn:focus-visible, .et-x:focus-visible, .et-nav:focus-visible,
.et-day:focus-visible, .et-slot:focus-visible, .et-center:focus-visible {
  outline: 2px solid var(--atob-purple); outline-offset: 2px; box-shadow: 0 0 0 5px var(--atob-purple-wash);
}

/* Popup: centered dialog on desktop, bottom sheet on phones */
.et-backdrop {
  position: fixed; inset: 0; z-index: 2147482000; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(27, 18, 48, 0.55); opacity: 0; transition: opacity var(--atob-dur) var(--atob-ease);
}
.et-backdrop[hidden] { display: none; }
.et-backdrop.et-in { opacity: 1; }
.et-sheet {
  width: 100%; max-width: 420px; max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--atob-white); border: 1px solid var(--atob-purple-mist); border-radius: var(--atob-radius-card);
  box-shadow: var(--atob-shadow-card); padding: 20px 20px 18px; font-family: var(--atob-font-body); color: var(--atob-charcoal);
}
.et-sheet:focus { outline: none; }
.et-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.et-head .atob-eyebrow { margin-bottom: 4px; }
.et-title { font: 700 1.35rem/1.2 var(--atob-font-display); color: var(--atob-charcoal); margin: 0; }
.et-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--atob-slate); }
.et-x {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--atob-radius-pill);
  background: transparent; color: var(--atob-purple); cursor: pointer;
}
.et-x:hover { background: var(--atob-purple-wash); }
.et-msg { margin: 6px 0 12px; font-size: 14.5px; line-height: 1.55; color: var(--atob-slate); }

.et-centers { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.et-center {
  width: 100%; text-align: left; padding: 13px 14px; border: 2px solid var(--atob-purple-mist); border-radius: 12px;
  background: var(--atob-white); cursor: pointer; font-family: inherit; transition: border-color var(--atob-dur) var(--atob-ease);
}
.et-center:hover { border-color: var(--atob-purple); }
.et-center strong { display: block; font-size: 14.5px; color: var(--atob-purple); }
.et-center span { display: block; font-size: 12.5px; color: var(--atob-slate); margin-top: 2px; }

.et-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.et-month-label { font: 700 1.05rem/1.2 var(--atob-font-display); color: var(--atob-charcoal); margin: 0; }
.et-nav {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: var(--atob-radius-pill);
  background: transparent; color: var(--atob-purple); cursor: pointer;
}
.et-nav:hover:not(:disabled) { background: var(--atob-purple-wash); }
.et-nav:disabled { color: var(--atob-muted); cursor: default; }
.et-cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.et-cal th { padding: 4px 0; text-align: center; font: 700 0.75rem/1.5 var(--atob-font-body); color: var(--atob-slate); }
.et-cal abbr { text-decoration: none; }
.et-cal td { padding: 2px 0; text-align: center; }
.et-day {
  position: relative; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: var(--atob-radius-pill);
  background: transparent; color: var(--atob-muted); font: 400 0.95rem/1 var(--atob-font-body); cursor: default;
}
.et-day.is-avail {
  background: var(--atob-purple-wash); color: var(--atob-purple); font-weight: 700; cursor: pointer;
  transition: background-color var(--atob-dur) var(--atob-ease), transform var(--atob-dur) var(--atob-ease);
}
.et-day.is-avail:hover { background: var(--atob-purple-mist); transform: translateY(-1px); }
.et-day.is-selected, .et-day.is-selected:hover { background: var(--atob-purple); color: var(--atob-white); transform: none; }
.et-times-head { margin: 14px 0 8px; font: 700 0.95rem/1.4 var(--atob-font-body); color: var(--atob-charcoal); }
.et-times-head:focus { outline: none; }
.et-slots { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; }
.et-slot {
  width: 100%; height: 44px; border: 1px solid var(--atob-purple); border-radius: var(--atob-radius-btn);
  background: var(--atob-white); color: var(--atob-purple); font: 700 0.9rem/1 var(--atob-font-body); cursor: pointer;
  transition: box-shadow var(--atob-dur) var(--atob-ease), transform var(--atob-dur) var(--atob-ease);
}
.et-slot:hover { box-shadow: inset 0 0 0 1px var(--atob-purple), var(--atob-shadow-btn); transform: translateY(-1px); }
.et-slot.is-selected { background: var(--atob-purple); color: var(--atob-white); }
.et-foot { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--atob-slate); }
.et-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border: 0;
  border-radius: var(--atob-radius-btn); background: var(--atob-purple); color: var(--atob-white);
  font: 700 0.9rem/1 var(--atob-font-body); cursor: pointer; box-shadow: var(--atob-shadow-btn);
}
.et-btn:hover { background: var(--atob-purple-deep); }

@media (max-width: 640px) {
  .et-backdrop { align-items: flex-end; padding: 0; }
  .et-sheet {
    max-width: none; max-height: 88vh; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateY(24px); transition: transform var(--atob-dur) var(--atob-ease);
  }
  .et-in .et-sheet { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .et-backdrop, .et-sheet, .et-day, .et-slot, .et-link { transition: none; }
  .et-day.is-avail:hover, .et-slot:hover { transform: none; }
}
