/* ==========================================================================
   Auth pages — Member Login & Forgot Password
   Reuses the join page's split layout (.reg) with an auth-sized card.
   ========================================================================== */

/* Standalone split fills the viewport (no marketing nav/topbar here) */
.reg--auth {
  min-height: 100vh;
}

.reg--auth .reg__main {
  align-items: center;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.reg--auth .reg__card {
  width: min(100%, 25rem);
  align-self: center;
}

/* Breathing room between fields, and before the submit button */
.reg--auth .form-field {
  margin-bottom: 1.25rem;
}

/* Card heading */
.auth__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--clr-primary-deep);
  margin: 0 0 0.375rem;
}

.auth__sub {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--clr-muted);
  margin: 0 0 1.75rem;
}

/* Password field with show / hide */
.auth__passwrap {
  position: relative;
  width: 100%;
}

.auth__passwrap input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 2.75rem;
}

.auth__eye {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--clr-muted);
  cursor: pointer;
  border-radius: 0.5rem;
}

.auth__eye:hover {
  color: var(--clr-primary);
}

.auth__eye svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* Remember + forgot row */
.auth__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  /* the field above already supplies the top gap */
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
}

.auth__remember {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  color: var(--clr-muted);
  cursor: pointer;
}

.auth__remember input {
  width: 0.9375rem;
  height: 0.9375rem;
  accent-color: var(--clr-primary);
}

.auth__link {
  color: var(--clr-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth__link:hover {
  text-decoration: underline;
}

.auth__foot {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--clr-border);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--clr-muted);
}

.auth__back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--clr-muted);
  text-decoration: none;
}

.auth__back:hover {
  color: var(--clr-primary);
}

.auth__back svg {
  width: 1rem;
  height: 1rem;
}

/* Forgot-password success state */
.auth__success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background-color: var(--clr-primary-tint);
  color: var(--clr-primary);
}

.auth__success-icon svg {
  width: 1.625rem;
  height: 1.625rem;
}

.auth__success strong {
  color: var(--clr-primary-deep);
}

/* Stack the panel above the card on small screens */
@media (max-width: 56rem) {
  .reg--auth {
    grid-template-columns: 1fr;
  }

  .reg--auth .reg__panel {
    display: none;
  }
}

/* Login error message (e.g. "Invalid email or password") */
.auth__alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #8a1c1c;
  background: #fdf0f0;
  border: 1px solid #f3cccc;
  border-radius: 0.625rem;
}

.auth__alert svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  margin-top: 0.05rem;
}

/* The backend adds `hidden` when there is no error */
.auth__alert[hidden] {
  display: none;
}
