/* buddy/static/auth.css - Nebula login/register gate + header identity.
   Reuses style.css tokens + .glass-card/.field/.btn component classes.
   The aurora (#aurora, z-index:-1) shows through; this gate sits on top. */
#auth-gate {
  position: fixed;
  inset: 0;
  display: none;            /* JS flips to flex when shown */
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.10), transparent 60%),
              rgba(6, 8, 16, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 9999;
}

#auth-gate .auth-card {
  /* .glass-card supplies bg / border / blur / shadow; this is layout + depth */
  width: 340px;
  max-width: 100%;
  padding: 32px 28px;
  box-shadow: var(--shadow-3, 0 20px 50px rgba(0, 0, 0, 0.5)), var(--glass-hi);
  animation: auth-rise var(--dur, 220ms) var(--ease, cubic-bezier(.4, 0, .2, 1));
}
@keyframes auth-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  #auth-gate .auth-card { animation: none; }
}

#auth-gate .auth-brand {
  font-family: var(--font-display, sans-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  background: var(--user, linear-gradient(135deg, #3B82F6, #6366f1));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent, #3B82F6);
}

#auth-gate .auth-tagline {
  margin: 6px 0 22px;
  text-align: center;
  font-size: 13px;
  color: var(--fg-faint, #7e88b8);
}

#auth-gate form { display: flex; flex-direction: column; gap: 11px; }

/* .field already styles inputs; nudge size for the gate */
#auth-gate input.field {
  font-size: 14px;
  padding: 11px 13px;
}

#auth-gate button#auth-submit {
  margin-top: 6px;
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  justify-content: center;
}
#auth-gate button#auth-submit:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }

#auth-gate .auth-error {
  min-height: 16px;
  font-size: 13px;
  color: var(--danger, #e0696b);
  text-align: center;
}
#auth-gate .auth-error:not(:empty) {
  padding: 8px 10px;
  border-radius: var(--r-sm, 10px);
  background: rgba(224, 105, 107, 0.10);
  border: 1px solid rgba(224, 105, 107, 0.30);
}

#auth-gate .auth-toggle {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--fg-dim, #aab2d6);
}
#auth-gate .auth-toggle a {
  color: var(--accent, #3B82F6);
  text-decoration: none;
  font-weight: 600;
}
#auth-gate .auth-toggle a:hover { text-decoration: underline; }

/* ---------- mobile (auth-specific; the global mobile.css is Task 8's) ---------- */
@media (max-width: 768px) {
  #auth-gate { padding: 16px; align-items: center; }
  #auth-gate .auth-card {
    width: 100%;
    max-width: 420px;
    padding: 28px 22px;
  }
  #auth-gate input.field { font-size: 16px; }  /* avoid iOS zoom on focus */
}

/* ---------- header identity ---------- */
#auth-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-dim, #aab2d6);
}
#auth-identity .auth-who { white-space: nowrap; }
#auth-identity #auth-logout {
  padding: 5px 11px;
  border-radius: var(--r-sm, 10px);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.12));
  background: var(--glass-bg, rgba(255, 255, 255, 0.055));
  color: var(--fg, #e8e9ee);
  cursor: pointer;
  font-size: 12px;
  transition: background var(--dur, 220ms) var(--ease, cubic-bezier(.4, 0, .2, 1));
}
#auth-identity #auth-logout:hover { background: var(--glass-bg-2, rgba(255, 255, 255, 0.085)); }
