/* Login / Forgot Password / Reset Password page shell and the session lock
   screen. Extracted from components.css (CSS split, CLAUDE.md §12).
   Consumed by frontend/js/views/login.js, forgot-password.js,
   reset-password.js and features/session-lock/lock-screen.js. */
@layer components {

/* ── Login page ───────────────────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  /* Follow the visible viewport as mobile browser toolbars expand/collapse. */
  min-height: 100dvh;
  padding: 72px var(--space-4) var(--space-6);
  background: var(--bg);
}

/* The atrium artwork belongs to the sign-in flow only. Password recovery
   reuses .login-page but intentionally keeps the quieter token background. */
.login-page--atrium {
  background-color: var(--bg);
  background-image: url("../../assets/login-atrium-light.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

[data-theme="dark"] .login-page--atrium {
  background-image: url("../../assets/login-atrium-dark.webp");
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}

.login-card .brand {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: var(--space-2);
}

.login-card .subtitle {
  text-align: center;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 400;
  margin-top: 0;
  margin-bottom: var(--space-8);
}

/* Session lock screen (features/session-lock/lock-screen.js): the sign-in
   card over the app, which stays mounted but hidden so its state survives. */
.session-lock {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow-y: auto;
}
body.session-locked > :not(.session-lock) { visibility: hidden; }
.session-lock .subtitle .icon { vertical-align: -2px; }

/* Why the previous session ended (login.js loginNoticeHTML). */
.login-notice {
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--info-bg);
  color: var(--text);
  font-size: var(--text-sm);
}
.login-notice--warning {
  border-left-color: var(--warning);
  background: var(--warning-bg);
}

.login-card #rp-retry-link:not([hidden]) { display: block; margin-bottom: var(--space-3); }

.login-theme-button {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.login-theme-button:hover { background: var(--surface-sunk); transform: translateY(-1px); }
.login-theme-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Sits to the left of the theme button (44px + gap) rather than its own fixed slot. */
.login-lang-button { right: calc(var(--space-4) + 44px + var(--space-2)); }

/* .flex-1 alone doesn't keep these two buttons equal-width: a flex item's
   default min-width is its content's width, so swapping the sign-in button's
   label to a longer "Signing in…"/"Bezig met inloggen…" string during submit
   forced it past its 50% share and pushed/overflowed the passkey button
   beside it. min-width: 0 lets flexbox actually enforce the equal split;
   ellipsis truncates gracefully if a translated label still doesn't fit. */
.login-actions .btn {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

} /* @layer components */
