/* Registration page.
 *
 * Design System 3.0 tokens, matching events_show.css's --zw-* namespace: this
 * page and that one are read back to back. The hex fallbacks these var() calls
 * used to carry were Tailwind-palette values rather than brand ones, and since
 * the token names were wrong too, every colour on the page was silently using
 * them. No fallbacks now -- a missing token should be visible, not quietly
 * off-brand. The Register button is action
 * blue: green is a state in this system, never a control, which is the one
 * place this page deliberately departs from the Luma screens it is modelled on.
 *
 * The measure matches the event detail page (64rem) rather than the site header,
 * because this is a document-width page and the two are read back to back.
 */
.zw-reg {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

.zw-reg__grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 1fr) 22rem;
  align-items: start;
}

/* The summary drops below the form rather than beside it: at this width a
   22rem rail and a form column both become unreadable. */
@media (max-width: 860px) {
  .zw-reg__grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .zw-reg__summary { order: -1; }
}

.zw-reg__title {
  font-family: var(--zw-font-serif);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  line-height: 1.1;
  color: var(--zw-ink);
  margin: 0 0 1.75rem;
}

/* The address typed is already registered here: its owner signs in to add. */
.zw-reg__sign-in {
  max-width: 30rem;
  margin: -0.75rem 0 1.5rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--zw-border-warm);
  border-radius: var(--zw-radius-lg);
  background: var(--zw-surface-warm);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--zw-ink);
}
.zw-reg__sign-in-link { font-weight: 600; color: var(--zw-blue-700); text-decoration: underline; text-underline-offset: 2px; }

.zw-reg__form { display: flex; flex-direction: column; gap: 1.25rem; max-width: 30rem; }

.zw-reg__field { display: flex; flex-direction: column; gap: 0.375rem; }
.zw-reg__label { font-size: 0.875rem; font-weight: 600; color: var(--zw-ink-2); }

.zw-reg__input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--zw-line-2);
  border-radius: 0.75rem;
  background: #fff;
  font-size: 1rem;
  color: var(--zw-ink);
}
.zw-reg__input:focus {
  outline: 2px solid var(--zw-blue-700);
  outline-offset: 1px;
  border-color: transparent;
}

.zw-reg__identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--zw-line-2);
  border-radius: 0.875rem;
  background: var(--zw-paper);
}
.zw-reg__avatar {
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  background: var(--zw-green-100);
  color: var(--zw-green-900);
  font-weight: 700;
  text-transform: uppercase;
}
.zw-reg__identity-text { display: flex; flex-direction: column; min-width: 0; }
.zw-reg__identity-name { font-weight: 600; color: var(--zw-ink); }
.zw-reg__identity-email { font-size: 0.875rem; color: var(--zw-ink-3); overflow-wrap: anywhere; }

.zw-reg__submit {
  margin-top: 0.5rem;
  padding: 0.875rem 1.25rem;
  border: 0;
  border-radius: 0.875rem;
  background: var(--zw-blue-700);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.zw-reg__submit:hover { background: var(--zw-blue-800); }

.zw-reg__summary {
  border: 1px solid var(--zw-line-2);
  border-radius: 1rem;
  padding: 1.25rem;
  background: #fff;
}
.zw-reg__event { display: flex; gap: 0.875rem; align-items: flex-start; }
.zw-reg__event-cover {
  width: 4rem; height: 4rem;
  border-radius: 0.625rem;
  object-fit: cover;
  flex: 0 0 auto;
}
.zw-reg__event-name { margin: 0; font-weight: 600; color: var(--zw-ink); }
.zw-reg__event-when { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--zw-ink-3); }

.zw-reg__tickets {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--zw-line);
}
.zw-reg__tickets-label { font-weight: 600; color: var(--zw-ink); }

.zw-stepper { display: inline-flex; align-items: center; gap: 0.5rem; }
.zw-stepper__btn {
  width: 2rem; height: 2rem;
  border: 1px solid var(--zw-line-2);
  border-radius: var(--zw-radius-sm);
  background: #fff;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--zw-ink);
  cursor: pointer;
}
.zw-stepper__btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.zw-stepper__value { min-width: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }

/* The success screen.
 *
 * Green here is a state, not a control -- the one place Design System 3.0
 * allows it, the same way the "You're in" pill on an event card does. The only
 * control on the page is a text link.
 */
.zw-reg-success {
  max-width: 34rem;
  margin: 0 auto;
  padding: 6rem 1.25rem;
  text-align: center;
}
.zw-reg-success__mark {
  display: grid;
  place-items: center;
  width: 4.5rem; height: 4.5rem;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--zw-green-600);
  color: #fff;
}
.zw-reg-success__title {
  font-family: var(--zw-font-serif);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  margin: 0 0 0.5rem;
  color: var(--zw-ink);
}
.zw-reg-success__note { margin: 0 0 2rem; color: var(--zw-ink-3); }
.zw-reg-success__link { color: var(--zw-blue-700); font-weight: 600; }

/* The rows a guest chose, carried through from the event page. Read-only here:
 * the place to change them is the picker, which is what Edit goes back to.
 */
.zw-reg__chosen { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--zw-line); }
.zw-reg__chosen-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.zw-reg__edit { font-size: 0.875rem; font-weight: 600; color: var(--zw-blue-700); }
.zw-reg__chosen-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.375rem 0 0;
  color: var(--zw-ink);
}
.zw-reg__chosen-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.zw-reg__chosen-when { color: var(--zw-ink-3); font-size: 0.8125rem; }
.zw-reg__chosen-full {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--zw-ink-3);
}

/* === Registration questions ===
   Admin-defined questions, between the identity block and the submit. They sit
   in a bordered group so a run of them reads as one section of the form rather
   than as more identity fields. */
.zw-reg__questions {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1rem;
  border: 1px solid var(--zw-line-2);
  border-radius: 0.75rem;
  background: var(--zw-paper, #fafaf9);
}

.zw-reg__question { display: flex; flex-direction: column; gap: 0.375rem; }

/* The whole label is the hit target, not just the 16px box. */
.zw-reg__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
}
.zw-reg__checkbox-input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  accent-color: var(--zw-blue-700);
  cursor: pointer;
}
.zw-reg__checkbox-text {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--zw-ink);
}
