/*
 * auth.minxi.ai — on top of the design-system cascade from
 * static.minxi.ai (tokens → reset → theme-dark → locale-switcher →
 * auth.css). Layout is a three-row column: header / main / footer.
 *
 * Header: minxi.ai wordmark linking back to the marketing site.
 * Main: vertically-centred auth card.
 * Footer: locale switcher (when more than one locale is active).
 */

/*
 * Auth-specific tokens.
 * All design tokens (radii, surface tints, text tiers, borders, accent,
 * focus ring, transitions, font sizes) come from
 * static.minxi.ai/css/tokens.css. Brutalist sweep 2026-05-19 dropped
 * --auth-radius (was 14px) — auth-card is now sharp.
 */
:root {
  --auth-card-max: 420px;
  --auth-gap: 18px;
  --auth-header-height: 64px;
  --auth-page-padding-x: 24px;
}

html, body { min-height: 100%; }

body.auth-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg, #111);
  color: var(--fg, #f1f1f1);
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface-2, #222);
  color: var(--fg, #fff);
  padding: 8px 16px;
  border-radius: 0;
}
.skip-link:focus { left: 8px; z-index: 10; }

/* ---- Header ---- */
.auth-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: var(--auth-header-height);
  padding: 0 var(--auth-page-padding-x);
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
  background: var(--surface-0, transparent);
}
.auth-header-home {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 6px 8px;
  border-radius: 0;
  transition: background var(--transition-fast, 150ms ease);
}
.auth-header-home:hover {
  background: var(--secondary-surface, rgba(255, 255, 255, 0.04));
}
.auth-header-logo {
  width: 28px;
  height: 28px;
  display: block;
}
.auth-header-wordmark {
  font-size: 1rem;
  color: var(--text-primary, var(--fg, #f1f1f1));
}

/* ---- Main shell (centred card) ---- */
.auth-shell {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px var(--auth-page-padding-x);
}

.auth-card {
  width: 100%;
  max-width: var(--auth-card-max);
  display: flex;
  flex-direction: column;
  gap: var(--auth-gap);
  padding: 32px;
  border-radius: 0;
  background: var(--surface-1, #1b1b1b);
  /* shadow removed per minxi brutalist design (2026-05-19) */
  text-align: center;
}

.auth-logo { margin: 0 auto 4px; }
.auth-title { margin: 0; font-size: 1.5rem; font-weight: 600; }
.auth-subtitle { margin: 0; color: var(--fg-muted, #a0a0a0); }
.auth-subtitle-sm { margin: 0; font-size: .9rem; color: var(--fg-muted, #a0a0a0); }
.auth-status {
  margin: 0; padding: 10px 14px; border-radius: 0;
  background: rgba(255, 180, 70, .12); color: #ffb446; font-size: .9rem;
}
.auth-hint { margin-top: 12px; font-size: .85rem; color: var(--fg-muted, #808080); }
.auth-hint a { color: inherit; text-decoration: underline; }

.auth-button {
  padding: 12px 20px;
  border-radius: 0;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent-primary, #7a5cff);
  color: #fff;
  transition: opacity .15s ease, transform .05s ease;
}
.auth-button:disabled { opacity: .6; cursor: progress; }
.auth-button:not(:disabled):active { transform: translateY(1px); }
.auth-button-secondary {
  background: transparent;
  color: var(--fg, #eee);
  border: 1px solid var(--border-color, #333);
}
.auth-button-secondary:hover { background: var(--surface-2, #262626); }

.auth-error {
  min-height: 1.2em;
  margin: 0;
  font-size: .9rem;
  color: var(--accent-danger, #ff6b6b);
}

/* ---- Footer (locale switcher) ----
 * Visual chip styling lives in static.minxi.ai/css/locale-switcher.css.
 * This block only positions the switcher in the auth-page layout.
 * When only one locale is active the switcher is omitted server-side
 * and the footer renders empty (small gutter only). */
.auth-footer {
  flex: 0 0 auto;
  padding: 18px var(--auth-page-padding-x) 24px;
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}
.auth-footer:empty { border-top: 0; padding: 0; }
.auth-footer .locale-switcher {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}
.auth-footer .locale-switcher-chips {
  justify-content: center;
}
