/**
 * NM-D Theme — authentication / registration
 * Author: Paweł Nosko / Design Cart
 */

body#authentication,
body#registration,
body#password {
  background: var(--nmd-bg, #f0f1f8);
}

body#authentication .nmd-auth-container,
body#registration .nmd-auth-container,
body#password .nmd-auth-container,
body#authentication .columns-container.container,
body#registration .columns-container.container,
body#password .columns-container.container,
body#authentication .container.container--limited-sm,
body#registration .container.container--limited-md,
body#password .container.container--limited-sm {
  padding-top: 24px;
  padding-bottom: 64px;
}

body#authentication .page-content--general.nmd-prose,
body#registration .page-content--general.nmd-prose {
  max-width: none;
  padding: 0;
  background: transparent;
  border: 0;
}

/* Auth card */
.nmd-auth {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nmd-auth__card,
body#authentication .login__form-wrapper,
body#registration .register-form > form,
body#registration .nmd-auth__card {
  background: #fff;
  border: 1px solid var(--nmd-hero-gray, #d5d7e4);
  border-radius: 12px;
  padding: 28px 28px 24px;
  box-shadow: 0 8px 28px rgba(26, 28, 46, 0.05);
}

.nmd-auth__lead {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--nmd-muted, #6b6d8a);
}

.nmd-auth__aside {
  background: #fff;
  border: 1px solid var(--nmd-hero-gray, #d5d7e4);
  border-radius: 12px;
  padding: 22px 28px;
  text-align: center;
}

.nmd-auth__aside-title,
body#authentication .login__register-prompt .h4 {
  margin: 0 0 6px;
  font-family: var(--nmd-font-sans, 'DM Sans', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--nmd-dark, #1a1c2e);
}

.nmd-auth__aside-text {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--nmd-muted, #6b6d8a);
}

.nmd-auth__aside-btn {
  min-width: 220px;
  border-radius: 8px !important;
  font-weight: 700;
}

.nmd-auth__switch {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--nmd-muted, #6b6d8a);
}

.nmd-auth__switch a {
  color: var(--nmd-purple, #5b3fc8);
  font-weight: 700;
  text-decoration: none;
}

.nmd-auth__switch a:hover {
  text-decoration: underline;
}

/* Kill default HR between form and register */
body#authentication .login > hr,
body#registration .register-form > hr {
  display: none;
}

/* Forms */
body#authentication .form-label,
body#registration .form-label,
body#password .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--nmd-dark, #1a1c2e);
  margin-bottom: 6px;
}

body#authentication .form-control,
body#registration .form-control,
body#password .form-control {
  border: 1px solid var(--nmd-hero-gray, #d5d7e4);
  border-radius: 8px;
  min-height: 44px;
  font-size: 14px;
  color: var(--nmd-dark, #1a1c2e);
  box-shadow: none;
}

body#authentication .form-control:focus,
body#registration .form-control:focus,
body#password .form-control:focus {
  border-color: var(--nmd-purple, #5b3fc8);
  box-shadow: 0 0 0 3px rgba(91, 63, 200, 0.12);
}

/* Password toggle — not a giant primary CTA */
body#authentication .password-field .btn,
body#registration .password-field .btn,
body#password .password-field .btn {
  background: var(--nmd-bg, #f0f1f8) !important;
  border: 1px solid var(--nmd-hero-gray, #d5d7e4) !important;
  color: var(--nmd-muted, #6b6d8a) !important;
  border-radius: 0 8px 8px 0 !important;
  box-shadow: none !important;
}

body#authentication .password-field .form-control,
body#registration .password-field .form-control,
body#password .password-field .form-control {
  border-radius: 8px 0 0 8px;
}

body#authentication .password-field .btn:hover,
body#registration .password-field .btn:hover {
  color: var(--nmd-purple, #5b3fc8) !important;
  border-color: var(--nmd-purple, #5b3fc8) !important;
}

/* Login actions row */
body#authentication #login-form .buttons-wrapper,
body#authentication .nmd-auth .buttons-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

body#authentication #login-form .buttons-wrapper .btn {
  width: auto;
}

body#authentication #login-form .btn-basic {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nmd-purple, #5b3fc8);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

body#authentication #login-form .btn-basic:hover {
  text-decoration: underline;
  color: var(--nmd-purple-dark, #3d2990);
}

body#authentication #submit-login {
  min-width: 140px;
  border-radius: 8px;
  font-weight: 700;
}

body#registration .buttons-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

body#registration .buttons-wrapper .btn {
  width: auto;
  min-width: 160px;
  border-radius: 8px;
  font-weight: 700;
}

/* Password recovery */
body#password .page-content--general.nmd-prose {
  max-width: none;
  padding: 0;
  background: transparent;
  border: 0;
}

body#password .forgotten-password .buttons-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

body#password #send-reset-link {
  min-width: 160px;
  border-radius: 8px;
  font-weight: 700;
}

body#password .page-footer > hr {
  display: none;
}

@media (max-width: 575.98px) {
  .nmd-auth__card,
  body#authentication .login__form-wrapper {
    padding: 20px 16px;
  }

  body#authentication #login-form .buttons-wrapper {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  body#authentication #login-form .buttons-wrapper .btn,
  body#authentication #submit-login {
    width: 100%;
  }

  .nmd-auth__aside-btn {
    width: 100%;
    min-width: 0;
  }
}
