/* Pre-Check-In wizard — scoped stylesheet (no global rules).
   Every selector is prefixed with `.grw` so it only affects this section.
   Mobile/tablet-first, clean, big touch targets. */
.grw {
  --grw-bg: #0b1220;
  --grw-card: #ffffff;
  --grw-ink: #0f172a;
  --grw-muted: #64748b;
  --grw-line: #e2e8f0;
  --grw-red: #e31837;
  --grw-blue: #003da5;
  --grw-navy: #041e42;
  --grw-accent: var(--grw-red);
  --grw-accent-ink: #ffffff;
  --grw-danger: #dc2626;
  --grw-radius: 14px;
  --grw-space: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  color: var(--grw-ink);
  background: var(--grw-bg);
  margin: 0;
  min-height: 100dvh;
  box-sizing: border-box;
}
.grw *,
.grw *::before,
.grw *::after { box-sizing: border-box; }

/* Site chrome (header, language side rail, footer) lives in base.css — this
   sheet only styles the wizard itself (steps, banner, progress, cards). */

/* Event banner (server-rendered featured gathering) */
.grw-event-banner {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px var(--grw-space) 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.grw-event-banner-logo {
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.grw-event-banner-info { min-width: 0; }
.grw-event-banner-kicker {
  margin: 0 0 2px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fca5a5;
  font-weight: 700;
}
.grw-event-banner-name { margin: 0; font-size: 1.15rem; color: #fff; }
.grw-event-banner-date { margin: 2px 0 0; color: #93c5fd; font-size: .85rem; font-weight: 600; }

/* Progress dots */
/* Progress bar (replaces the numbered step dots) */
.grw-progress { max-width: 720px; margin: 0 auto; padding: 14px var(--grw-space) 2px; }
.grw-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}
.grw-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--grw-red);
  transition: width .3s ease;
}

/* Card */
.grw-form { max-width: 720px; margin: 0 auto; padding: var(--grw-space); }
.grw-step {
  background: var(--grw-card);
  border-radius: var(--grw-radius);
  padding: 20px var(--grw-space);
  box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.08);
}
.grw-step[hidden] { display: none; }
.grw-step h2 { margin: 0 0 4px; font-size: 1.35rem; }
.grw-help, .grw-hint { margin: 4px 0 0; color: var(--grw-muted); font-size: .88rem; }

/* Fields */
.grw-field { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.grw-field label { font-weight: 600; font-size: .92rem; }
/* PBLeagues logo on the side of the player-number input (links out) */
.grw-field-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.grw-field-input-row input { flex: 1; min-width: 0; }
/* Awesomplete wraps the number input in a .awesomplete container */
.grw-field-input-row .awesomplete { flex: 1; min-width: 0; position: relative; }
.grw-field-input-row .awesomplete input { width: 100%; }
.grw-field-logo-link {
  flex: none;
  display: inline-flex;
  align-items: center;
}
.grw-field-logo-link:hover { opacity: .85; }
.grw-field-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* Awesomplete dropdown — theme it to match the wizard card */
.awesomplete > ul {
  border: 1px solid var(--grw-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
  z-index: 60;
  max-height: 40dvh;
  overflow: auto;
}
.awesomplete > ul > li { padding: 10px 12px; cursor: pointer; }
.awesomplete > ul > li:hover { background: #eff6ff; }
.awesomplete > ul > li[aria-selected="true"] { background: var(--grw-blue); color: #fff; }

/* Player name input + matched PBLeagues profile photo */
.grw-input-with-photo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.grw-input-with-photo input { flex: 1; min-width: 0; }
.grw-lead-photo {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--grw-line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .15);
}
.grw-lead-photo[hidden] { display: none; }
.grw-lead-reset {
  align-self: flex-start;
  margin-top: 2px;
  background: none;
  border: 1px solid var(--grw-line);
  border-radius: 8px;
  padding: 5px 12px;
  font: inherit;
  font-size: .85rem;
  color: var(--grw-muted);
  cursor: pointer;
}
.grw-lead-reset:hover { color: var(--grw-danger); border-color: var(--grw-danger); }
.grw-field input,
.grw-field select {
  font: inherit;
  color: var(--grw-ink);
  border: 1px solid var(--grw-line);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 48px;
  background: #fff;
  width: 100%;
}
.grw-field input:focus,
.grw-field select:focus { outline: 2px solid var(--grw-accent); outline-offset: 1px; border-color: var(--grw-accent); }
.grw-field.is-error input,
.grw-field.is-error select { border-color: var(--grw-danger); }
.grw-error { color: var(--grw-danger); font-size: .82rem; margin-top: 6px; min-height: 1em; }

/* Choices (role) */
.grw-choices { display: grid; gap: 10px; margin-top: 16px; }
.grw-choice {
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--grw-line); border-radius: 12px;
  padding: 16px 14px; font-weight: 600; cursor: pointer;
  background: #fff;
}
.grw-choice input { width: 22px; height: 22px; accent-color: var(--grw-accent); }
.grw-choice:has(input:checked) { border-color: var(--grw-accent); background: #fef2f2; }
.grw-choice small {
  display: block;
  font-weight: 500;
  font-size: .8rem;
  color: var(--grw-muted);
  margin-top: 2px;
}
/* PBLeagues logo fills the player-role option's height (right side) */
.grw-choice-logo {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: auto;
  max-width: 45%;
  object-fit: contain;
  box-sizing: border-box;
  padding: 6px 10px;
}
.grw-choice:has(.grw-choice-logo) > span { padding-right: 64px; }

/* Or divider */
.grw-or { text-align: center; color: var(--grw-muted); font-size: .85rem; margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .05em; }

/* Reveal (player name after team name > 3 chars) */
.grw-reveal { animation: grw-fade .25s ease; }
@keyframes grw-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Checkbox (terms) */
.grw-check {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 16px; font-size: .92rem; cursor: pointer;
}
.grw-check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--grw-accent); flex: none; }

/* Terms doc box */
.grw-terms {
  margin-top: 14px; max-height: 40dvh; overflow: auto;
  border: 1px solid var(--grw-line); border-radius: 10px;
  padding: 14px; background: #f8fafc; font-size: .86rem;
}
.grw-terms h1, .grw-terms h2, .grw-terms h3 { font-size: 1rem; }
.grw-terms p { margin: .5em 0; }

/* Photo */
.grw-photo {
  display: flex; align-items: center; justify-content: center;
  margin-top: 14px; min-height: 180px;
  border: 2px dashed var(--grw-line); border-radius: 12px;
  background: #f8fafc; cursor: pointer; overflow: hidden;
}
.grw-photo:has(img[src]) { border-style: solid; }
.grw-photo-placeholder { color: var(--grw-muted); font-weight: 600; }
.grw-photo-preview { max-width: 100%; max-height: 240px; display: block; }

/* Success */
.grw-welcome { font-size: 1.05rem; margin: 8px 0; }
.grw-code {
  margin: 18px 0; padding: 22px; text-align: center;
  background: var(--grw-navy); color: #bfdbfe; border-radius: 14px;
}
.grw-code span { font-size: 2.2rem; font-weight: 800; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.grw-code-help { color: var(--grw-muted); font-size: .9rem; margin: 0; }
.grw-thanks { color: var(--grw-muted); font-size: .92rem; margin: 12px 0 0; }

/* Sticky bottom action bar — sticks to the viewport while the form is taller
   than the screen, then scrolls away at the end so the site footer is
   reachable. */
.grw-nav {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: flex; gap: 10px;
  max-width: 720px; margin: 24px auto 0;
  padding: 12px var(--grw-space);
  background: var(--grw-navy);
  border-radius: 14px;
  border: 2px solid var(--grw-red);
  box-shadow: 0 -4px 20px rgba(0,0,0,.25);
}
.grw-btn {
  flex: 1; min-height: 50px; border-radius: 12px; border: none;
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
  padding: 0 14px;
}
.grw-btn-next { background: var(--grw-red); color: #fff; }
.grw-btn-back { background: #ffffff; color: var(--grw-blue); flex: .7; }
.grw-btn-reset { flex: 0 0 auto; background: transparent; color: #bfdbfe; text-decoration: underline; font-size: .86rem; min-height: 44px; }
.grw-btn[hidden] { display: none; }
.grw-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Chrome width handled by base.css — no fixed max-width here. */

/* Phones: the event banner stacks into two rows — logo first, event name
   second (centered); the date is hidden. */
@media (max-width: 640px) {
  .grw-event-banner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .grw-event-banner-logo { width: 120px; height: 120px; margin: 0 auto; }
  .grw-event-banner-date { display: none; }
}
