/**
 * ATS login — wp-login.php.
 *
 * The first screen a locked-out member sees. Stock WordPress here is the single
 * loudest signal that a property is "a WordPress thing".
 */

/* ===============================================================
   wp-login.php — login, lost password, reset, verification notices
   =============================================================== */

body.login {
  background: var(--color-section-bg);
  font-family: var(--font-sans);
  color: var(--color-text);
}

body.login #login {
  width: 400px;
  max-width: calc(100vw - 32px);
  padding: 48px 0 32px;
}

/* The default WP logo block links to wordpress.org and looks like a stock
   install. Suppress the mark; the form below carries the brand. */
body.login h1 a {
  background-image: none;
  width: auto;
  height: auto;
  text-indent: 0;
  font-family: var(--font-title);
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-title);
  line-height: 1.25;
}

body.login form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px 24px;
  margin-top: 16px;
}

body.login label {
  color: var(--color-text);
  font-size: var(--text-dense-small);
}

body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-form-border);
  border-radius: var(--radius-md);
  color: var(--color-title);
  font-size: var(--text-dense-body);
  padding: 10px 12px;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
  border-color: var(--color-form-focus);
  box-shadow: 0 0 0 3px var(--color-brand-hover-shadow);
  outline: none;
}

body.login .button-primary {
  background: var(--color-brand);
  border: none;
  border-radius: var(--radius-md);
  /* Near-black in dark, white in light — legible on the brand fill either way.
     A fixed white here disappeared on the dark theme's green brand colour. */
  color: var(--color-body);
  font-size: var(--text-dense-body);
  font-weight: 600;
  padding: 10px 20px;
  text-shadow: none;
  box-shadow: none;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

body.login .button-primary:hover,
body.login .button-primary:focus {
  background: var(--color-brand-dark);
  filter: brightness(1.05);
  box-shadow: var(--shadow-brand);
}

/* Verification and error notices. The success path and the failure path must
   not look the same — that ambiguity is what made verification unreadable. */
body.login .message,
body.login #login_error {
  border-radius: var(--radius-md);
  border-left-width: 4px;
  border-left-style: solid;
  font-size: var(--text-dense-body);
  padding: 12px 14px;
  box-shadow: none;
}

/* Default `.message` is neutral. WordPress reuses this one class for success,
   failure and information alike, so semantics come from the modifier class —
   a dead verification link must not be dressed in success green. */
body.login .message {
  background: var(--color-surface-alt);
  border-left-color: var(--color-brand);
  color: var(--color-title);
}

/* Tints are mixed from the semantic colour rather than taken from a surface
   token: --color-tertiary and --color-surface-warm are light in BOTH themes, so
   using them here put white text on a white panel in dark mode. */
body.login .message.ums-message-success {
  background: color-mix(in srgb, var(--color-success) 14%, transparent);
  border-left-color: var(--color-success);
}

body.login .message.ums-message-warning {
  background: color-mix(in srgb, var(--color-warning) 14%, transparent);
  border-left-color: var(--color-warning);
}

body.login .message.ums-message-info {
  background: var(--color-surface-alt);
  border-left-color: var(--color-brand);
}

body.login #login_error {
  background: color-mix(in srgb, var(--color-error) 14%, transparent);
  border-left-color: var(--color-error);
  color: var(--color-title);
}

body.login .message a,
body.login #login_error a {
  color: var(--color-brand);
  font-weight: 600;
}

body.login #nav,
body.login #backtoblog {
  padding: 12px 0 0;
}

body.login #nav a,
body.login #backtoblog a {
  color: var(--color-text-muted);
  font-size: var(--text-dense-small);
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
  color: var(--color-brand);
}

