/*
 * Single sign-in page (login-and-roles D1; branded layout from login-ux, Miguel 2026-10-03).
 * Mobile-first, one centered column; existing tokens only, no literal colors, no new global token.
 * saper.club shapes (OD-UI-012) on the SAPER Claro colors (OD-UI-014): white card on the
 * off-white page, pill buttons with the button type tokens, Bodoni headings from base.css. The test-mode banner rule lives once in base.css.
 */

.login {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-6);
  inline-size: 100%;
  max-inline-size: 30rem;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-4);
}

/*
 * Hero slot for a future real San Acasio photo (WebP under 200 KB, Miguel 2026-10-03). It stays
 * hidden until a rule here sets `display: block`, an `aspect-ratio` and a background image served
 * from the harness allowlist. No placeholder image is shipped.
 */
.login__hero {
  display: none;
}

.login__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

/* The approved imagotype, never narrower than the 115 px brand minimum (OD-UI-006). */
.login__logo {
  inline-size: min(100%, max(var(--brand-logo-min-width), 14rem));
  block-size: auto;
}

/* Visible event name (login-ux), set as the subtitle under the logo. */
.login__event {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-large);
  letter-spacing: var(--heading-letter-spacing);
  color: var(--color-heading);
}

.sign-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

/* Decorative gold isotype heading the sign-in frame (alt=""). */
.sign-in__isotype {
  inline-size: 2.5rem;
  block-size: auto;
}

.sign-in__heading {
  font-size: var(--font-size-xlarge);
  text-align: center;
}

.login__audience,
.login__intro,
.login__status {
  text-align: center;
}

.login__intro,
.login__status {
  color: var(--color-text-muted);
}

/*
 * Orientation for attendees: they never sign in here, their wallet opens with the QR or personal
 * link from the desk (OD-AUTH-007). Emphasized so an attendee reads it before the staff form.
 */
.login__note {
  inline-size: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-divider);
  border-inline-start: 4px solid var(--color-primary);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-weight: 700;
  text-align: start;
}

.login__status:empty,
.login__intro:empty,
.login__audience:empty,
.login__note:empty {
  display: none;
}

/* Discreet staff-only link-button below the Clerk form (OD-AUTH-007 hotfix, 2026-10-04). */
.login__switch {
  align-self: center;
  min-block-size: var(--touch-target-min);
  padding: var(--space-2) var(--space-3);
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--font-size-small);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.login__switch[hidden] {
  display: none;
}

.login__switch:focus-visible {
  outline-offset: var(--focus-ring-offset);
}

.login__button {
  min-block-size: var(--touch-target-min);
  padding: var(--space-2) var(--space-6);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-primary-text);
  font: inherit;
  font-size: var(--font-size-button);
  font-weight: var(--button-font-weight);
  letter-spacing: var(--button-letter-spacing);
  text-transform: uppercase;
  cursor: pointer;
}

.login__button[hidden] {
  display: none;
}

/* Clerk's card keeps its own width; the mount only centers it and never forces a page scroll. */
.sign-in__mount {
  inline-size: 100%;
  max-inline-size: 100%;
  display: flex;
  justify-content: center;
}

.sign-in__mount:empty {
  display: none;
}

.account {
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
}

.account:empty {
  min-width: 0;
  min-height: 0;
}

.login__footer {
  padding: 0 var(--space-4) max(var(--space-6), env(safe-area-inset-bottom));
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  text-align: center;
}

@media (min-width: 48rem) {
  .login {
    padding-block-start: var(--space-8);
  }

  .sign-in {
    padding: var(--space-8) var(--space-6);
  }
}
