/* MemberPress login, forgot/reset password, and the locked-content sign-in prompt.
   Loaded on the login page and wherever the login form renders (see functions.php). */

/* Card: standalone login/forgot/reset views */
.mp_wrapper.mpa-login-card {
  max-width: 420px;
  margin: 32px auto;
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  padding: 28px;
  box-sizing: border-box;
}

/* Locked-content prompt wraps the form in its own card; avoid a card inside a card. */
.mepr-login-form-wrap {
  max-width: 420px;
  margin: 32px auto;
}

.mepr-login-form-wrap .mp_wrapper.mpa-login-card {
  margin: 0;
}

.mpa-login-title {
  margin: 0 0 18px;
  font-size: 1.5rem;
  line-height: 1.2;
}

/* Fields */
.mpa-login-card .mp-form-row {
  margin: 0 0 16px;
}

.mpa-login-card label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.mpa-login-card input[type="text"],
.mpa-login-card input[type="email"],
.mpa-login-card input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #c8ccd4;
  border-radius: 8px;
  font: inherit;
}

/* Leave room for the show/hide password button */
.mpa-login-card .mp-hide-pw input[type="password"],
.mpa-login-card .mp-hide-pw input[type="text"] {
  padding-right: 48px;
}

.mpa-login-card input:focus-visible {
  outline: 3px solid rgba(180, 108, 84, .35);
  outline-offset: 1px;
  border-color: var(--portal-primary-strong);
}

/* Remember me */
.mpa-login-card input[type="checkbox"] {
  margin-right: 6px;
}

.mpa-login-card label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: center;
  font-weight: 400;
}

/* Submit (higher specificity than the plugin's ui/login.css) */
.mp_wrapper.mpa-login-card input[type="submit"] {
  width: 100%;
  padding: 11px 20px;
  background: var(--portal-primary-strong);
  border: 0;
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.mp_wrapper.mpa-login-card input[type="submit"]:hover,
.mp_wrapper.mpa-login-card input[type="submit"]:active {
  background: #7a4332;
}

.mp_wrapper.mpa-login-card input[type="submit"]:focus-visible {
  outline: 3px solid rgba(180, 108, 84, .45);
  outline-offset: 2px;
}

/* Spacer divs MemberPress adds between rows */
.mpa-login-card .mp-spacer,
.mpa-login-card .mepr_spacer {
  height: 8px;
  line-height: 0;
  overflow: hidden;
}

/* Forgot password link */
.mpa-login-card .mepr-login-actions {
  text-align: center;
}

.mpa-login-card .mepr-login-actions a {
  color: var(--portal-primary-strong);
}

/* Messages and errors */
.mp_wrapper .mepr_error,
.mp_wrapper .mepr_updated {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid;
}

.mp_wrapper .mepr_error {
  color: #b42318;
  background: #fef3f2;
  border-color: #fda29b;
}

.mp_wrapper .mepr_updated {
  color: #067647;
  background: #ecfdf3;
  border-color: #a6f4c5;
}

.mp_wrapper .mepr_error ul {
  margin: 0;
  padding-left: 1.2em;
}

/* Locked-content excerpt/message above the form */
.mepr-unauthorized-excerpt,
.mepr-unauthorized-message {
  max-width: 420px;
  margin: 0 auto 16px;
}
