/* auth/login/assets/styles/login.css
   Login-page overrides on top of auth-global.css.
   Motion handled by /assets/css/motion.css — no local keyframes needed.
   ──────────────────────────────────────────────────────────────────────── */

/* ── Remember me + forgot password row ───────────────────────────────────── */
.login-options {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1;
}

.login-options label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--color-text, #555);
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

.login-options label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin: 0;
  position: relative;
  top: -0.5px;
  accent-color: var(--color-blue, #4A90E2);
}

.login-options a {
  flex-shrink: 0;
  color: var(--color-blue, #4A90E2);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.login-options a:hover {
  text-decoration: underline;
}

/* ── Login email chip — displays the confirmed email in step 2 ────────────── */
.login-email-chip {
  font-size: 0.9rem;
  color: var(--color-text-light);
  text-align: center;
  word-break: break-all;
}

/* ── Success screen ───────────────────────────────────────────────────────── */
.login-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  animation: np-fade-in-kf var(--np-duration-fade) ease both;
}

.login-success__icon {
  width: 72px;
  height: 72px;
  color: var(--color-accent, #2ECC71);
  margin-bottom: 1.5rem;
}

.login-success__icon svg {
  width: 100%;
  height: 100%;
}

.login-success__title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.login-success__msg {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.login-success__redirect {
  font-size: 0.875rem;
  color: var(--color-text-light);
  opacity: 0.7;
}

/* ── Provider list (step 1) ───────────────────────────────────────────────── */
.auth-provider-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: white;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}

.auth-provider-btn:hover:not(:disabled) {
  background: var(--color-background);
  border-color: var(--color-text-light);
  color: var(--color-text);
  text-decoration: none;
}

.auth-provider-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Email input inside provider list — no icon, full width */
.login-email-group {
  margin-bottom: 0;
}

.login-email-group .auth-input {
  padding-left: 1rem;
}

/* ── Primary slot ─────────────────────────────────────────────────────────── */
.primary-auth-slot {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── More-options expand / collapse ───────────────────────────────────────── */
.auth-more-wrap {
  display: flex;
  flex-direction: column;
}

/* Divider with centred toggle button */
.auth-divider--toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.75rem 0;
  position: relative;
  opacity: 0.5;
}

.auth-divider--toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-border);
  z-index: 0;
}

.auth-more-toggle {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s ease;
}

.auth-more-toggle:hover {
  background: var(--color-background, #f8f9fa);
  border-color: var(--color-text-light);
  color: var(--color-text);
}

.auth-more-toggle.is-open {
  transform: rotate(180deg);
}

.auth-more-toggle__icon {
  display: block;
  pointer-events: none;
}

/* Collapsible container — smooth height + opacity */
.auth-more-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.28s ease,
    margin-top 0.28s ease;
}

.auth-more-options.is-open {
  max-height: 320px;
  /* enough for 3–4 provider buttons */
  opacity: 1;
  margin-top: 0.75rem;
}

/* ── Centred error messages ───────────────────────────────────────────────── */
.error-message--center {
  text-align: center;
  margin: -0.25rem 0 0.5rem;
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .auth-more-options {
    transition: none;
  }

  .auth-more-toggle {
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  }

  .auth-more-toggle.is-open {
    transform: none;
  }

  .auth-more-toggle.is-open .auth-more-toggle__icon {
    transform: rotate(180deg);
  }
}