/*
 * Clean People Email Login.
 * Without JS (no .cp-ml-ready on #login) the theme's form shows unchanged plus the
 * outlined "Email me a login link" button below it.
 */

.cp-ml [hidden],
.cp-ml-card [hidden] {
  display: none !important;
}

/* ---- Login form controls ---- */
.cp-ml {
  margin-top: 10px;
  margin-bottom: 16px;
  text-align: center;
}
.cp-ml .login_footer_separator {
  margin-bottom: 20px;
}

.login-register-container .account-forms button.cp-ml-button {
  width: 100%;
  background-color: #fff !important;
  color: #ef4036 !important;
  border: 2px solid #ef4036 !important;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.login-register-container .account-forms button.cp-ml-button:hover {
  background-color: #ef4036 !important;
  color: #fff !important;
}

.cp-ml-hint {
  margin: 10px 0 0;
  font-size: 14px;
  color: #777 !important;
  line-height: 1.5;
}
.cp-ml-switch {
  margin: 18px 0 0;
}

.login-register-container .account-forms button.cp-ml-textlink,
.cp-ml-textlink {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0.25rem 0rem !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #ef4036 !important;
  font: inherit;
  font-size: 1.125rem !important;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: underline;
  cursor: pointer;
}
.cp-ml-textlink:hover {
  opacity: 0.8;
}

/* Link mode (default): email + primary "Email me a login link". */
#login.cp-ml-ready.cp-mode-link .cp-pw-only,
#login.cp-ml-ready.cp-mode-link .cp-ml-sep,
#login.cp-ml-ready.cp-mode-link .cp-ml-to-link {
  display: none !important;
}
#login.cp-ml-ready.cp-mode-link .cp-ml {
  margin-top: 14px;
}
.login-register-container
  .account-forms
  #login.cp-mode-link
  button.cp-ml-button {
  background-color: #ef4036 !important;
  color: #fff !important;
}
.login-register-container
  .account-forms
  #login.cp-mode-link
  button.cp-ml-button:hover {
  background-color: rgba(239, 64, 54, 0.85) !important;
}

/* Password mode: theme's password + Login + remember/lost-password. */
#login.cp-ml-ready.cp-mode-password .cp-ml-sep,
#login.cp-ml-ready.cp-mode-password .cp-ml-button,
#login.cp-ml-ready.cp-mode-password .cp-ml-hint,
#login.cp-ml-ready.cp-mode-password .cp-ml-to-password {
  display: none !important;
}
#login.cp-ml-ready.cp-mode-password .cp-ml-switch {
  margin-top: 6px;
}

/* Lets the script notice browser autofill of the password field. */
#login #password:-webkit-autofill {
  animation-name: cpMlAutofill;
  animation-duration: 1ms;
}
@keyframes cpMlAutofill {
  from {
    opacity: 1;
  }
  to {
    opacity: 1;
  }
}

/* ---- Full-card screens (check email / expired / welcome back) ---- */
.cp-ml-card {
  max-width: 420px;
  margin: 50px auto 40px;
  text-align: center;
}
.cp-ml-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: rgba(239, 64, 54, 0.1);
  color: #ef4036;
}
.cp-ml-card .page-title {
  margin-bottom: 14px;
}
.cp-ml-card p {
  color: #555;
  line-height: 1.6;
  margin: 0 0 14px;
}
.cp-ml-card .cp-ml-small {
  font-size: 13px;
  color: #777;
}
.cp-ml-card form {
  margin: 22px 0 18px;
}
.cp-ml-card .button {
  width: 100%;
}
.cp-ml-card button.cp-ml-secondary {
  background-color: #fff !important;
  color: #ef4036 !important;
  border: 2px solid #ef4036 !important;
}
.cp-ml-card button.cp-ml-secondary:hover:not([disabled]) {
  background-color: #ef4036 !important;
  color: #fff !important;
}
.cp-ml-card button[disabled] {
  opacity: 0.55;
  cursor: default;
}
.cp-ml-card .cp-ml-links {
  font-size: 1rem;
  color: #777;
}
.cp-ml-card .cp-ml-links a {
  color: #ef4036;
  text-decoration: underline;
}
.cp-ml-card .cp-ml-links span {
  margin: 0 6px;
}

/* "Logging you in…" (auto-submitting link landing page) */
.cp-ml-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 22px;
  border: 4px solid rgba(239, 64, 54, 0.2);
  border-top-color: #ef4036;
  border-radius: 50%;
  animation: cpMlSpin 0.8s linear infinite;
}
@keyframes cpMlSpin {
  to {
    transform: rotate(360deg);
  }
}
.cp-ml-auto .cp-ml-fallback {
  visibility: hidden;
  margin: 0;
}
.cp-ml-auto .cp-ml-fallback span {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  color: #777;
}
