/* Registration-First Onboarding */

.onboard-page {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  position: relative;
  z-index: 1;
}

.onboard-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.onboard-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-lg);
}

.onboard-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin: 0;
}

.onboard-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* Progress indicator */
.onboard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-6);
}

.onboard-step-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.onboard-step-dot.active {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.onboard-step-line {
  height: 2px;
  flex: 1;
  max-width: 40px;
  background: var(--color-border);
}

/* Steps */
.onboard-step h2 {
  font-size: var(--text-xl);
  margin: 0 0 var(--space-1);
}

.onboard-step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
}

/* 2026-11-02: the way in for a returning family before she types anything.
   Secondary: Continue stays the step's one primary action. */
.onboard-signin-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.onboard-signin-btn {
  flex: none;
}

.onboard-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

/* A nav button's label wraps rather than widening the page (Priya's Buckhead
   rehearsal: a 530px label made the form 604px wide on a 390px phone). The
   shared .btn is one line at a fixed height; here it grows to fit, never
   below that height. */
.onboard-nav .btn {
  min-width: 0;
  height: auto;
  min-height: calc(var(--space-8) + var(--space-1));
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  line-height: normal;
  white-space: normal;
  text-align: center;
}

/* Player cards */
.onboard-player-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

[data-theme="light"] .onboard-player-card {
  border: none;
  box-shadow: var(--color-shadow);
}

.onboard-player-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  font-weight: var(--weight-medium);
}

.player-age-badge {
  margin-top: var(--space-2);
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

/* League selection */
.onboard-league-section {
  margin-bottom: var(--space-4);
}

.onboard-league-section h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-base);
}

/* A break between children, so one child's camps never read as the next
   child's (Josh, 2026-09-21: "a break of some sort in between each child";
   the camps accordion made the two lists identical boxes, 2026-11-03). */
.onboard-league-section + .onboard-league-section {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
}

/* In the camps checkout the child's name outranks the camp names under it. */
.onboard-league-section:has(> details.onboard-camp) > h3,
.onboard-league-section:has(> .onboard-camp-sport) > h3 {
  font-size: var(--text-lg);
}

.onboard-league-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  transition: border-color 0.15s;
}

.onboard-league-option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-surface);
}

/* One row per child: the league, decided; a compact select behind Change */
.onboard-league-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.onboard-league-row .league-select {
  flex: 1 1 14rem;
  min-width: 0;
}

.onboard-league-decided {
  flex: 1 1 14rem;
  min-width: 0;
}

/* TEA-822: the league moved, and the family is told before they continue.
   Notice, not alarm -- the form is doing the right thing, it just has to say
   so. The keep button inherits .btn sizing, so the 44px rule holds. */
.onboard-league-swap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-warning);
  border-radius: var(--radius-md);
  background: var(--color-warning-subtle);
  color: var(--color-text);
  font-size: var(--text-sm);
}

/* TEA-986: the select league's line under a child. Going back is good news,
   so it reads as success, not the swap notice's warning. The tryout box's
   whole label is the tap target, and it is 44px tall on a phone. */
.onboard-select-offer .onboard-select-keeper {
  margin: 0 0 var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-success);
  border-radius: var(--radius-md);
  background: var(--color-success-subtle);
  color: var(--color-text);
  font-size: var(--text-sm);
}

.onboard-select-offer .setup-toggle-label {
  min-height: 44px;
}

.onboard-select-offer .text-muted {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
}

.onboard-error {
  color: var(--color-error);
  margin: var(--space-2) 0 0;
}

/* Waivers */
.onboard-waiver {
  margin-bottom: var(--space-3);
}

.onboard-waiver details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
}

.onboard-waiver summary {
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
}

.onboard-waiver-body {
  padding: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  max-height: 200px;
  overflow-y: auto;
  /* A waiver is numbered paragraphs; keep the breaks the park wrote. */
  white-space: pre-wrap;
}

/* Review */
.onboard-review-player {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.onboard-review-player:last-child {
  border-bottom: none;
}

.onboard-review-player p {
  flex-basis: 100%;
  margin: 0;
  font-size: var(--text-sm);
}

.onboard-review-fee {
  margin-left: auto;
  font-weight: var(--weight-semibold);
}

/* The back-out fee, said before she confirms (TEA-746). It sits under the
   per-child lines and above the total, because it is about the money on those
   lines and not about the number she is about to pay. */
.onboard-review-backout {
  padding: var(--space-2) 0;
}

.onboard-review-backout p {
  margin: 0 0 var(--space-1);
  font-size: var(--text-sm);
}

.onboard-review-total {
  padding: var(--space-3) 0;
  text-align: right;
  font-size: var(--text-base);
}

/* Payment */
#paymentElement {
  margin: var(--space-3) 0;
}

#paymentError {
  color: var(--color-error);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

/* Confirmation */
.onboard-success {
  text-align: center;
}

.onboard-success h2 {
  color: var(--color-success);
}

.onboard-confirmation-list {
  text-align: left;
  margin: var(--space-4) 0;
}

.onboard-confirmation-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.onboard-confirmation-item p {
  flex-basis: 100%;
  margin: 0;
  font-size: var(--text-sm);
}

/* A camp package: the child and the package once, its sessions under it */
.onboard-confirmation-package {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.onboard-confirmation-package-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.onboard-confirmation-package .onboard-confirmation-item {
  padding-left: var(--space-4);
}

/* A confirmation that is not "registered" for everyone is not green */
.onboard-success.onboard-success-partial h2 {
  color: var(--color-text);
}

.onboard-confirmation-item:last-child {
  border-bottom: none;
}

/* Shared */
.onboard-divider {
  border-top: 1px solid var(--color-border);
  margin: var(--space-4) 0;
}

.onboard-notice {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-3);
  text-align: center;
}

.onboard-footer {
  text-align: center;
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.onboard-footer a {
  color: var(--color-accent);
  text-decoration: none;
}

/* TEA-825: one line to the films, with a real touch target. */
.onboard-help-line {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.onboard-help-line a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.setup-field-row {
  display: flex;
  gap: var(--space-3);
}

.setup-field-row > .setup-field {
  flex: 1;
}

@media (max-width: 640px) {
  .setup-field-row {
    flex-direction: column;
  }

  .onboard-review-player {
    flex-direction: column;
    align-items: flex-start;
  }

  .onboard-review-fee {
    margin-left: 0;
  }
}

/* The six-digit code on the "check your email" wall (TEA-823). The same
   escape hatch /login offers, so a parent reading mail on another device is
   not sent out of the tab she is registering in. */
.onboard-code-form {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  text-align: left;
}

.onboard-code-form .setup-label {
  display: block;
  margin-bottom: var(--space-2);
}

.onboard-code-form .btn {
  width: 100%;
  min-height: 44px;
  margin-top: var(--space-3);
}

/* Six digits, spaced, and at least 16px so iOS Safari does not zoom the page
   in on focus and leave it panned sideways. */
.onboard-code-input {
  font-size: var(--text-2xl);
  letter-spacing: 0.3em;
  text-align: center;
  min-height: 44px;
}

/* A review line's child and league, one above the other at every width, so
   the league never reads as a line of its own. */
.onboard-review-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* "Want to help this season?" on the confirmation, one line per child when
   more than one child carries an offer (TEA-980 follow-up). */
.onboard-volunteer-outcome {
  text-align: left;
  margin: var(--space-3) 0;
}

.onboard-volunteer-outcome p {
  margin: 0 0 var(--space-2);
}

.onboard-volunteer-lines {
  margin: 0;
  padding-left: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.onboard-volunteer-lines li + li {
  margin-top: var(--space-1);
}

/* Camps & Clinics checkout (TEA-1163): a camp block per child, a session per
   checkbox row, the camp's questions under its sessions. Tokens only. */
.onboard-camp-sport {
  margin: var(--space-4) 0 var(--space-2);
  color: var(--color-text-muted);
}

/* One native disclosure per camp (Josh, 2026-11-03): closed, the header is
   the camp's name, ages, coach and place, what it costs, and what is ticked
   inside; open, everything as before. */
.onboard-camp {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
}

.onboard-camp + .onboard-camp {
  margin-top: var(--space-2);
}

.onboard-camp-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-md);
}

.onboard-camp-summary::-webkit-details-marker {
  display: none;
}

.onboard-camp-summary:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.onboard-camp-summary-text {
  flex: 1;
  min-width: 0;
}

.onboard-camp-summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.onboard-camp-summary .details-chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.onboard-camp[open] > .onboard-camp-summary {
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.onboard-camp-body {
  padding: var(--space-3);
}

.onboard-camp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.onboard-camp-session {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.onboard-camp-session.is-disabled {
  color: var(--color-text-muted);
}

.onboard-camp-session-text {
  flex: 1;
  min-width: 0;
}

.onboard-camp-fields:not(:empty) {
  margin-top: var(--space-3);
}

/* A camp's description at checkout (2026-10-19): the first paragraph, the
   rest behind a native disclosure. */
.onboard-camp-about {
  margin-top: var(--space-1);
  font-weight: 400;
  max-width: 65ch;
  font-size: var(--text-base);
  line-height: 1.5;
}

.onboard-camp-about p {
  margin: 0 0 var(--space-1);
}

.onboard-camp-about summary {
  cursor: pointer;
  color: var(--color-accent);
  padding: var(--space-1) 0;
}

@media (hover: none) and (pointer: coarse) {
  .onboard-camp-about summary {
    padding: var(--space-3) 0;
  }
}

/* Signed in: one quiet line where the Sign in row would be (2026-11-02). */
.onboard-signedin-row {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.onboard-signedin-row a {
  color: var(--color-accent);
}

/* Nothing open for this household (2026-11-08): when it opens, and the park page. */
.onboard-closed { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.onboard-closed h2, .onboard-closed p { margin: 0; }
