/*
 * Ensure non-ID selectors include `.login` first to overcome specificity
 */

/* WordPress Logo */
.login h1 {
  padding-bottom: 19.6%;
  margin-bottom: 2rem;
  background-image: url(./mercer-wordpress.svg);
  background-size: contain;
}

.login h1 a {
  display: none;
}

/* "Username or Email Address" field */
#loginform > p:nth-of-type(1),
/* "Password" field */
#loginform > .user-pass-wrap,
/* "Remember Me" checkbox */
#loginform > .forgetmenot,
/* "Log In" button */
#loginform > .submit {
  display: none;
}

.aadsso-login-form-text a:not(.dim) {
  font-size: 1.2rem;
}

.aadsso-login-form-text a.dim {
  display: block;
  margin-top: 2rem;
}

/* "Lost your password?" link */
#nav {
  display: none;
}

/* Manual login toggle link */
.manual-login-toggle-wrapper {
  margin-top: 2rem;
  text-align: center;
}

.manual-login-toggle {
  font-size: 0.875rem;
  color: #666;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.manual-login-toggle:hover,
.manual-login-toggle:focus {
  color: #333;
  text-decoration: underline;
}

/* When showing WP credentials: hide SSO, show credentials form */
body.login.show-manual-login .aadsso-login-form-text {
  display: none;
}

body.login.show-manual-login #loginform > p:nth-of-type(1),
body.login.show-manual-login #loginform > .user-pass-wrap,
body.login.show-manual-login #loginform > .forgetmenot,
body.login.show-manual-login #loginform > .submit {
  display: block !important;
  animation: fadeIn 0.3s ease;
}

body.login.show-manual-login #nav {
  display: block !important;
  animation: fadeIn 0.3s ease;
}

/* Fade in animation for smooth reveal */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
