/*
 * Portal attendee auth screens — sign-in form, check-your-email, and the
 * magic-link verifying interstitial. Split screen per Figma 555:11884:
 * panel left (5fr), photograph right (7fr).
 *
 * The hero layers the photo in `overlay` blend over a brand gradient then tints
 * it — a single flat wash reads grey instead of blue. The url() is `../` because
 * Propshaft resolves it relative to THIS file's directory.
 */

.portal-auth {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 100dvh;
}

.portal-auth__panel {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 4rem;
  background: var(--wa-color-surface-lowered);
}

.portal-auth__logo {
  /* The two auto block-start margins share the free space: the content group
     lands centered between the panel top and the pinned legal line. */
  margin-block-start: auto;
  width: 220px;
  height: 55px;
  object-fit: contain;
}

.portal-auth__intro {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.portal-auth__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--wa-color-text-normal);
}

.portal-auth__event {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--wa-color-text-normal);
}

.portal-auth__subtitle {
  margin: 0;
  max-width: 26rem;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--wa-color-text-quiet);
}

.portal-auth__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 26rem;
}

.portal-auth__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wa-color-text-normal);
}

.portal-auth__input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  color: var(--wa-color-text-normal);
  background: var(--wa-color-surface-raised);
  border: 1px solid var(--wa-color-neutral-border-quiet);
  border-radius: var(--wa-border-radius-s);
}

.portal-auth__input:focus {
  outline: 2px solid var(--wa-color-neutral-border-quiet);
  outline-offset: 1px;
}

.portal-auth__submit {
  width: 100%;
  margin-block-start: 0.5rem;
}

/* The verifying interstitial's arc — Font Awesome does the motion, the brand
   fill gives it the design's teal. */
.portal-auth__spinner {
  font-size: 3rem;
  color: var(--wa-color-brand-fill-loud);
}

.portal-auth__steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 26rem;
}

.portal-auth__step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.portal-auth__step--done {
  font-weight: 600;
  color: var(--wa-color-text-normal);
}

.portal-auth__step--done .fa-check {
  color: var(--wa-color-success);
}

.portal-auth__step--pending {
  color: var(--wa-color-text-quiet);
}

.portal-auth__continue {
  margin: 0;
  font-size: 0.8125rem;
}

.portal-auth__legal {
  margin: 0;
  margin-block-start: auto;
  font-size: 0.6875rem;
  line-height: 1.6;
  text-align: center;
  color: var(--wa-color-text-quiet);
}

.portal-auth__hero {
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(
    circle at 50% 120%,
    var(--wa-color-brand-60),
    var(--wa-color-brand-40)
  );
}

.portal-auth__hero::before,
.portal-auth__hero::after {
  content: "";
  position: absolute;
  inset: 0;
}

.portal-auth__hero::before {
  background-image: var(--portal-auth-hero-image, url("/assets/sign-in-hero-301c04e0.png"));
  background-size: cover;
  background-position: center;
  mix-blend-mode: overlay;
}

.portal-auth__hero::after {
  background: var(--ek-color-sign-in-tint);
}

/* The photograph is decoration: below the fold it costs bandwidth and says
   nothing, so the panel takes the whole screen. */
@media (max-width: 40rem) {
  .portal-auth {
    grid-template-columns: 1fr;
  }

  .portal-auth__hero {
    display: none;
  }

  .portal-auth__panel {
    padding: 2rem 1.5rem;
  }
}

/* The event wordmark strip on the auth wall (HMS-402). The loud brand fill
   carries the white wordmark + event name; on-loud flips dark automatically
   for light brand colors via the emitted tokens. */
.portal-auth__event-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  /* Replaces .portal-auth__logo's auto top margin — without it the free space
     collapses above the legal line and the whole panel block hugs the top
     instead of sharing the stock layout's centering. */
  margin-block-start: auto;
  border-radius: var(--wa-border-radius-m);
  background: var(--wa-color-brand-fill-loud);
  color: var(--wa-color-brand-on-loud);
}

.portal-auth__event-logo {
  display: block;
  height: 2rem;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
}

.portal-auth__event-brand-name {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
}

/* HMS-442 — booking-continuity hint on the auth wall: shown when the
   bounce stored a portal bookings URL as the post-sign-in destination. */
.portal-auth__hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  max-width: 26rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wa-color-brand-on-quiet);
  background: var(--wa-color-brand-fill-quiet);
  border: 1px solid var(--wa-color-brand-border-quiet);
  border-radius: var(--wa-border-radius-s);
}

/* HMS-442 — Sales-demo sign-in fixture on the wall. Quiet secondary affordance
   below the primary email form: labelled honestly as a demo path. */
.portal-auth__demo {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  max-width: 26rem;
  border-top: 1px solid var(--wa-color-neutral-border-quiet);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.portal-auth__demo-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wa-color-text-quiet);
}

.portal-auth__demo-button {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--wa-color-brand);
  background: none;
  border: none;
  padding: 0.25rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.portal-auth__demo-button:hover {
  color: var(--wa-color-brand);
}

.portal-auth__demo-button:focus-visible {
  outline: 2px solid var(--wa-color-brand);
  outline-offset: 2px;
}

/* button_to emits its own <form>; the default form margin would skew the
   flex row's alignment */
.portal-auth__demo form.button_to {
  margin: 0;
}

