/*
 * Nexus forms — one state matrix for every ReadyLaunch form
 * (login family, checkout, ACF profile editor, password, billing modal).
 * Spec: docs/design-system/05-forms.md.
 *
 * Loaded last so per-screen sheets only carry layout. Anything about how a
 * control looks in default / hover / focus / error lives here.
 */

/* ------------------------------------------------------------------
 * 1. Labels — static Upperscale above the control; focus → solid royal.
 *    (Gradient background-clip on labels was removed: it painted a solid
 *    gradient block whenever the label wrapped a checkbox or RL reset the clip.)
 * ---------------------------------------------------------------- */
body.nx-rl .mp-form-row label,
body.nx-rl .mp-form-label label,
body.nx-rl .acf-field .acf-label label,
body.nx-rl .mepr_coupon label,
body.nx-rl .mp_wrapper label.placeholder-text,
body.nx-rl .mp_wrapper label.placeholder-text.active {
  position: static !important;
  top: auto !important;
  left: auto !important;
  z-index: auto;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  width: auto !important;
  max-width: 100%;
  margin: 0 0 6px;
  padding: 0 4px !important;
  background: transparent !important;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--ink) !important;
  font-family: var(--font);
  font-size: var(--fs-upper) !important;
  font-weight: 600;
  line-height: var(--lh-upper);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: none !important;
  pointer-events: auto;
  transition: color var(--dur-fast) var(--ease-out);
}
body.nx-rl .mp-form-row:focus-within > .mp-form-label > label,
body.nx-rl .mp-form-row:focus-within > label:not(.mepr-checkbox-field):not([for="rememberme"]),
body.nx-rl .mp-form-row-group-wrapper:focus-within > .mp-form-label > label,
body.nx-rl #mepr-template-login .mp-form-row:focus-within > .mp-form-label > label,
body.nx-rl #mepr-template-login .mp-form-row:focus-within > label:not(.mepr-checkbox-field):not([for="rememberme"]),
body.nx-rl .acf-field:focus-within > .acf-label label {
  color: var(--royal) !important;
}
/* Check rows are never “focused labels” */
body.nx-rl .mp-form-row.mepr_remember_me:focus-within label,
body.nx-rl .mp-form-row.mepr_remember_me:focus-within > label:not(.mepr-checkbox-field),
body.nx-rl #mepr-template-login .mp-form-row.mepr_remember_me:focus-within label,
body.nx-rl #mepr-template-login .mp-form-row.mepr_remember_me:focus-within > label:not(.mepr-checkbox-field),
body.nx-rl .mp-form-row.mepr_tos:focus-within label,
body.nx-rl .mp-form-row:focus-within > label.mepr-checkbox-field {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}
body.nx-rl .acf-field .acf-label .acf-required,
body.nx-rl .mp-form-row label .mepr-required,
body.nx-rl .mp-form-row label sup {
  color: var(--purple);
  font-size: inherit;
  vertical-align: baseline;
}

/* ------------------------------------------------------------------
 * 2. Text controls
 * ---------------------------------------------------------------- */
body.nx-rl .mp-form-row input[type="text"],
body.nx-rl .mp-form-row input[type="email"],
body.nx-rl .mp-form-row input[type="url"],
body.nx-rl .mp-form-row input[type="tel"],
body.nx-rl .mp-form-row input[type="password"],
body.nx-rl .mp-form-row input[type="number"],
body.nx-rl .mp-form-row input[type="search"],
body.nx-rl .mp-form-row select,
body.nx-rl .mp-form-row textarea,
body.nx-rl .mepr-form-input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
body.nx-rl #mepr-template-login .mepro-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.nx-rl #mepr-template-login .mepr-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.nx-rl .acf-field input[type="text"],
body.nx-rl .acf-field input[type="url"],
body.nx-rl .acf-field input[type="email"],
body.nx-rl .acf-field input[type="tel"],
body.nx-rl .acf-field input[type="number"],
body.nx-rl .acf-field input[type="password"],
body.nx-rl .acf-field input[type="search"],
body.nx-rl .acf-field select:not(.select2-hidden-accessible),
body.nx-rl .acf-field textarea,
body.nx-rl .invoice-wrapper .mepr-coupon-code {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--muted);
  border-radius: var(--r-pill);
  background-color: var(--white);
  color: var(--navy);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  box-shadow: none;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
body.nx-rl .mp-form-row textarea,
body.nx-rl .acf-field textarea {
  height: auto;
  min-height: 120px;
  padding: 12px 16px;
  border-radius: var(--r-row);
  resize: vertical;
}
body.nx-rl .mp-form-row input::placeholder,
body.nx-rl .acf-field input::placeholder,
body.nx-rl .acf-field textarea::placeholder,
body.nx-rl .mepr-form-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Native select: chevron 20 in ink, room for it on the right */
body.nx-rl .mp-form-row select,
body.nx-rl .acf-field select:not(.select2-hidden-accessible) {
  padding-right: 44px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23373C57' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px;
}
body.nx-rl .acf-field select[multiple]:not(.select2-hidden-accessible) {
  height: auto;
  min-height: 160px;
  padding: 8px;
  border-radius: var(--r-row);
  background-image: none;
}

/* Hover */
@media (hover: hover) {
  body.nx-rl .mp-form-row input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not(:focus):not(.invalid):not([aria-invalid="true"]):hover,
  body.nx-rl .mp-form-row select:not(:focus):not(.invalid):hover,
  body.nx-rl .mp-form-row textarea:not(:focus):hover,
  body.nx-rl .acf-field input:not([type="checkbox"]):not([type="radio"]):not(:focus):hover,
  body.nx-rl .acf-field select:not(.select2-hidden-accessible):not(:focus):hover,
  body.nx-rl .acf-field textarea:not(:focus):hover,
  body.nx-rl .acf-field .select2-container--default:not(.select2-container--focus):not(.select2-container--open) .select2-selection:hover,
  body.nx-rl .invoice-wrapper .mepr-coupon-code:not(:focus):hover {
    border-color: var(--ink);
  }
}

/* Focus */
body.nx-rl .mp-form-row input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus,
body.nx-rl .mp-form-row input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus-visible,
body.nx-rl .mp-form-row select:focus,
body.nx-rl .mp-form-row textarea:focus,
body.nx-rl .mepr-form-input:not([type="checkbox"]):not([type="radio"]):focus,
body.nx-rl #mepr-template-login .mepro-form input:not([type="checkbox"]):not([type="submit"]):focus,
body.nx-rl #mepr-template-login .mepr-form input:not([type="checkbox"]):not([type="submit"]):focus,
body.nx-rl .acf-field input:not([type="checkbox"]):not([type="radio"]):focus,
body.nx-rl .acf-field select:focus,
body.nx-rl .acf-field textarea:focus,
body.nx-rl .acf-field .select2-container--default.select2-container--focus .select2-selection--multiple,
body.nx-rl .acf-field .select2-container--default.select2-container--open .select2-selection--single,
body.nx-rl .acf-field .select2-container--default.select2-container--open .select2-selection--multiple,
body.nx-rl .invoice-wrapper .mepr-coupon-code:focus,
body.nx-rl .StripeElement--focus {
  border-color: var(--royal);
  outline: none;
  box-shadow: var(--ring);
}

/* Disabled */
body.nx-rl .mp-form-row input:disabled,
body.nx-rl .mp-form-row select:disabled,
body.nx-rl .acf-field input:disabled,
body.nx-rl .acf-field select:disabled,
body.nx-rl .acf-field textarea:disabled {
  background-color: var(--surface);
  opacity: var(--op-disabled);
  cursor: not-allowed;
}

/* ------------------------------------------------------------------
 * 3. Error state — stroke only, never a fill. Overrides Mepr's red
 *    `.invalid` background and the browser's :invalid tint.
 * ---------------------------------------------------------------- */
body.nx-rl .mp-form-row input.invalid,
body.nx-rl .mp-form-row select.invalid,
body.nx-rl .mp-form-row textarea.invalid,
body.nx-rl .mp-form-row.invalid input,
body.nx-rl .mp-form-row.invalid select,
body.nx-rl .mepr-form-input.invalid,
body.nx-rl input[aria-invalid="true"],
body.nx-rl select[aria-invalid="true"],
body.nx-rl textarea[aria-invalid="true"],
body.nx-rl .acf-field.acf-error .acf-input > input,
body.nx-rl .acf-field.acf-error .acf-input > textarea,
body.nx-rl .acf-field.acf-error .acf-input > select,
body.nx-rl .acf-field.acf-error .select2-selection,
body.nx-rl .mepr-form .invalid,
body.nx-rl .mp_wrapper .invalid,
body.nx-rl .StripeElement--invalid {
  border-color: var(--error) !important;
  background-color: var(--white) !important;
  background-image: none;
  color: var(--navy) !important;
  box-shadow: none;
}
body.nx-rl .mp-form-row select.invalid,
body.nx-rl .mp-form-row.invalid select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23373C57' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
}
body.nx-rl .mp-form-row input.invalid:focus,
body.nx-rl .mp-form-row select.invalid:focus,
body.nx-rl .mepr-form-input.invalid:focus,
body.nx-rl input[aria-invalid="true"]:focus,
body.nx-rl .acf-field.acf-error .acf-input > input:focus,
body.nx-rl .acf-field.acf-error .acf-input > textarea:focus {
  box-shadow: var(--ring-error);
}
body.nx-rl .mp-form-row input.invalid::placeholder,
body.nx-rl .mepr-form-input.invalid::placeholder {
  color: var(--muted);
}
/* Mepr also paints the label / TOS row when invalid — keep them ink */
body.nx-rl .mepr-form label.invalid,
body.nx-rl .mepr-form label.invalid a,
body.nx-rl .mp-form-row label.invalid {
  color: var(--ink) !important;
  background: transparent !important;
}
body.nx-rl .mepr-form label.invalid a {
  color: var(--royal) !important;
}
body.nx-rl .mepr-payment-methods-radios label.invalid,
body.nx-rl .mp_wrapper .mepr-cards.invalid {
  border-color: var(--error) !important;
  background-color: var(--white) !important;
  opacity: 1;
}

/* Field helper — one message under a field */
body.nx-rl .nx-field-error,
body.nx-rl .form-wrapper .cc-error,
body.nx-rl .invoice-wrapper .cc-error,
body.nx-rl .mepr-account-container .cc-error,
body.nx-rl .mepr-stripe-card-errors,
body.nx-rl .mepr-stripe-errors,
body.nx-rl .acf-field .acf-error-message,
body.nx-rl .acf-field .acf-notice.-error {
  display: none;
  align-items: flex-start;
  gap: 6px;
  margin: var(--sp-2) 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--error);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  text-transform: none;
  letter-spacing: 0;
}
body.nx-rl .nx-field-error::before,
body.nx-rl .form-wrapper .cc-error::before,
body.nx-rl .invoice-wrapper .cc-error::before,
body.nx-rl .mepr-account-container .cc-error::before,
body.nx-rl .mepr-stripe-card-errors:not(:empty)::before,
body.nx-rl .acf-field .acf-error-message::before,
body.nx-rl .acf-field .acf-notice.-error::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' x2='12' y1='8' y2='12'/%3E%3Cline x1='12' x2='12.01' y1='16' y2='16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' x2='12' y1='8' y2='12'/%3E%3Cline x1='12' x2='12.01' y1='16' y2='16'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.nx-rl .nx-field-error,
body.nx-rl .form-wrapper .mepr-field-required.invalid .cc-error,
body.nx-rl .form-wrapper .mp-form-row.invalid .cc-error,
body.nx-rl .form-wrapper input.invalid ~ .cc-error,
body.nx-rl .form-wrapper .mp-form-row.invalid .mp-form-label .cc-error,
body.nx-rl .form-wrapper .cc-error[style*="display: block"],
body.nx-rl .form-wrapper .cc-error[style*="display:block"],
body.nx-rl .invoice-wrapper .cc-error[style*="display: block"],
body.nx-rl .mepr-account-container .cc-error[style*="display: block"],
body.nx-rl .mepr-stripe-card-errors:not(:empty),
body.nx-rl .acf-field .acf-error-message,
body.nx-rl .acf-field .acf-notice.-error {
  display: flex;
}
body.nx-rl .mp_wrapper .mp-form-row.mp-address-group .mp-form-label .cc-error {
  display: none !important;
}
body.nx-rl .acf-field .acf-error-message::after {
  display: none;
}
body.nx-rl .acf-field .acf-error-message p {
  margin: 0;
}

/* Form-level “fix the errors above” — an inline error notice under submit */
body.nx-rl .mepr-form-has-errors {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin: var(--sp-3) 0 0;
  padding: 10px 12px;
  border: 1px solid var(--error);
  border-radius: 12px;
  background: var(--error-soft);
  color: var(--navy);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-align: left;
}
body.nx-rl .mepr-form-has-errors[style*="display: block"],
body.nx-rl .mepr-form-has-errors[style*="display:block"] {
  display: flex !important;
}
body.nx-rl .mepr-form-has-errors::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  background: var(--error);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' x2='12' y1='8' y2='12'/%3E%3Cline x1='12' x2='12.01' y1='16' y2='16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' x2='12' y1='8' y2='12'/%3E%3Cline x1='12' x2='12.01' y1='16' y2='16'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ------------------------------------------------------------------
 * 4. Checkbox + radio — 20px, purple, custom drawn, 44px hit row
 * ---------------------------------------------------------------- */
body.nx-rl .mp-form-row input[type="checkbox"],
body.nx-rl .mp-form-row input[type="radio"],
body.nx-rl .mepr_remember_me input[type="checkbox"],
body.nx-rl .mepr_tos input[type="checkbox"],
body.nx-rl .form-wrapper input[type="checkbox"],
body.nx-rl .form-wrapper input[type="radio"],
body.nx-rl .mepr-payment-methods-radios input[type="radio"],
body.nx-rl .acf-field input[type="checkbox"],
body.nx-rl .acf-field input[type="radio"],
body.nx-rl .mepr-account-container .mepr-form-input[type="checkbox"] {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 1px 0 0;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 6px;
  background: var(--white);
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  vertical-align: middle;
  line-height: 0;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
body.nx-rl .mp-form-row input[type="radio"],
body.nx-rl .form-wrapper input[type="radio"],
body.nx-rl .mepr-payment-methods-radios input[type="radio"],
body.nx-rl .acf-field input[type="radio"] {
  border-radius: 50%;
}
@media (hover: hover) {
  body.nx-rl .mp-form-row input[type="checkbox"]:not(:checked):hover,
  body.nx-rl .mp-form-row input[type="radio"]:not(:checked):hover,
  body.nx-rl .form-wrapper input[type="checkbox"]:not(:checked):hover,
  body.nx-rl .form-wrapper input[type="radio"]:not(:checked):hover,
  body.nx-rl .acf-field input[type="checkbox"]:not(:checked):hover,
  body.nx-rl .acf-field input[type="radio"]:not(:checked):hover,
  body.nx-rl .mepr_remember_me input[type="checkbox"]:not(:checked):hover {
    border-color: var(--ink);
  }
}
body.nx-rl .mp-form-row input[type="checkbox"]:checked,
body.nx-rl .mp-form-row input[type="radio"]:checked,
body.nx-rl .mepr_remember_me input[type="checkbox"]:checked,
body.nx-rl .mepr_tos input[type="checkbox"]:checked,
body.nx-rl .form-wrapper input[type="checkbox"]:checked,
body.nx-rl .form-wrapper input[type="radio"]:checked,
body.nx-rl .mepr-payment-methods-radios input[type="radio"]:checked,
body.nx-rl .acf-field input[type="checkbox"]:checked,
body.nx-rl .acf-field input[type="radio"]:checked {
  border-color: var(--purple);
}
body.nx-rl .mp-form-row input[type="checkbox"]:checked,
body.nx-rl .mepr_remember_me input[type="checkbox"]:checked,
body.nx-rl .mepr_tos input[type="checkbox"]:checked,
body.nx-rl .form-wrapper input[type="checkbox"]:checked,
body.nx-rl .acf-field input[type="checkbox"]:checked {
  background: var(--purple);
}
body.nx-rl .mp-form-row input[type="checkbox"]::after,
body.nx-rl .mepr_remember_me input[type="checkbox"]::after,
body.nx-rl .mepr_tos input[type="checkbox"]::after,
body.nx-rl .form-wrapper input[type="checkbox"]::after,
body.nx-rl .acf-field input[type="checkbox"]::after {
  content: "";
  grid-area: 1 / 1;
  width: 10px;
  height: 6px;
  margin-top: -2px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg) scale(0);
  transition: transform var(--dur-fast) var(--ease-out);
}
body.nx-rl .mp-form-row input[type="checkbox"]:checked::after,
body.nx-rl .mepr_remember_me input[type="checkbox"]:checked::after,
body.nx-rl .mepr_tos input[type="checkbox"]:checked::after,
body.nx-rl .form-wrapper input[type="checkbox"]:checked::after,
body.nx-rl .acf-field input[type="checkbox"]:checked::after {
  transform: rotate(-45deg) scale(1);
}
body.nx-rl .mp-form-row input[type="radio"]::after,
body.nx-rl .form-wrapper input[type="radio"]::after,
body.nx-rl .mepr-payment-methods-radios input[type="radio"]::after,
body.nx-rl .acf-field input[type="radio"]::after {
  content: "";
  grid-area: 1 / 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-out);
}
body.nx-rl .mp-form-row input[type="radio"]:checked::after,
body.nx-rl .form-wrapper input[type="radio"]:checked::after,
body.nx-rl .mepr-payment-methods-radios input[type="radio"]:checked::after,
body.nx-rl .acf-field input[type="radio"]:checked::after {
  transform: scale(1);
}
body.nx-rl .mp-form-row input[type="checkbox"]:focus-visible,
body.nx-rl .mp-form-row input[type="radio"]:focus-visible,
body.nx-rl .mepr_remember_me input[type="checkbox"]:focus-visible,
body.nx-rl .form-wrapper input[type="checkbox"]:focus-visible,
body.nx-rl .form-wrapper input[type="radio"]:focus-visible,
body.nx-rl .acf-field input[type="checkbox"]:focus-visible,
body.nx-rl .acf-field input[type="radio"]:focus-visible {
  outline: none;
  border-color: var(--royal);
  box-shadow: var(--ring);
}
body.nx-rl .mp-form-row input[type="checkbox"]:disabled,
body.nx-rl .form-wrapper input[type="checkbox"]:disabled,
body.nx-rl .acf-field input[type="checkbox"]:disabled {
  opacity: var(--op-disabled);
  cursor: not-allowed;
}

/* Check row: label text beside the control, whole row ≥ 44 */
body.nx-rl .mepr_remember_me,
body.nx-rl .form-wrapper .mepr_tos label,
body.nx-rl .form-wrapper label.mepr-checkbox-field,
body.nx-rl .mp-form-row label.mepr-checkbox-field,
body.nx-rl .acf-field-true-false .acf-input > label,
body.nx-rl .acf-field .acf-checkbox-list li label,
body.nx-rl .acf-field .acf-radio-list li label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 11px 0 !important;
  color: var(--ink) !important;
  font-size: 15px !important;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
body.nx-rl .mepr_remember_me > * + * {
  margin: 0;
}
body.nx-rl .mepr_remember_me label,
body.nx-rl #mepr-template-login .mepro-form .mepr_remember_me label,
body.nx-rl #mepr-template-login .mepr-form .mepr_remember_me label,
body.nx-rl .acf-field .acf-checkbox-list li label span,
body.nx-rl .acf-field .acf-radio-list li label span {
  display: inline !important;
  min-height: 0;
  margin: 0;
  padding: 0 !important;
  color: var(--ink) !important;
  font-size: 15px !important;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0;
  text-transform: none;
}
body.nx-rl .mepr_remember_me label:hover,
body.nx-rl .form-wrapper label.mepr-checkbox-field:hover {
  color: var(--navy) !important;
}
body.nx-rl .acf-field .acf-checkbox-list,
body.nx-rl .acf-field .acf-radio-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.nx-rl .acf-field .acf-checkbox-list li,
body.nx-rl .acf-field .acf-radio-list li {
  margin: 0;
}
body.nx-rl .acf-field.acf-field-true-false .acf-input .message {
  color: var(--ink);
  font-size: 15px;
  line-height: 22px;
}

/* Payment-method cards on checkout: hide the raw radio circle, show state on the card */
body.nx-rl .mepr-payment-methods-radios label,
body.nx-rl .mepr-payment-methods-radios label.checked {
  display: flex !important;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  margin: 0;
  padding: 14px 16px !important;
  border: 1px solid var(--muted);
  border-radius: var(--r-row);
  background: var(--white);
  color: var(--navy) !important;
  font-size: 15px !important;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
@media (hover: hover) {
  body.nx-rl .mepr-payment-methods-radios label:not(.checked):hover {
    border-color: var(--ink);
  }
}
body.nx-rl .mepr-payment-methods-radios label.checked {
  border-color: var(--royal);
  background: var(--surface);
  box-shadow: none;
}
body.nx-rl .mepr-payment-methods-radios label img {
  height: 24px;
  width: auto;
}

/* ------------------------------------------------------------------
 * 5. Password reveal button sits inside the pill
 * ---------------------------------------------------------------- */
body.nx-rl .mp-hide-pw {
  position: relative;
}
body.nx-rl .mp-hide-pw input {
  padding-right: 52px;
}
body.nx-rl .mp-hide-pw button.mp-hide-pw,
body.nx-rl #mepr-template-login .mepro-form button.mp-hide-pw,
body.nx-rl #mepr-template-login .mepr-form button.mp-hide-pw {
  position: absolute;
  top: 0;
  right: 4px;
  bottom: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}
body.nx-rl .mp-hide-pw button.mp-hide-pw:hover {
  color: var(--navy);
  padding: 0;
}
body.nx-rl .mp-hide-pw button.mp-hide-pw:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* ------------------------------------------------------------------
 * 6. Field rhythm — rows never touch each other or the notices
 * ---------------------------------------------------------------- */
body.nx-rl .mp-form-row {
  position: relative;
  margin: 0;
}
body.nx-rl .mp-form-row + .mp-form-row,
body.nx-rl .mp-form-row + .mp-form-row-group-wrapper,
body.nx-rl .mp-form-row-group-wrapper + .mp-form-row {
  margin-top: var(--sp-4);
}
body.nx-rl .mp-form-label {
  position: static;
  display: block;
  margin: 0;
}
body.nx-rl .mepr_password .mp-form-label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
body.nx-rl .mp-spacer,
body.nx-rl .mepr_spacer {
  display: none;
}

/* ------------------------------------------------------------------
 * 7. Buttons in loading state (submit, save) — spinner beside the text
 * ---------------------------------------------------------------- */
body.nx-rl .nx-btn.is-loading,
body.nx-rl .is-loading > .mepr-submit,
body.nx-rl form.is-submitting input[type="submit"],
body.nx-rl form.is-saving .acf-form-submit input[type="submit"] {
  position: relative;
  pointer-events: none;
}
body.nx-rl .nx-btn.is-loading::before,
body.nx-rl .nx-btn-wrap.is-loading::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: nx-spin 0.7s linear infinite;
}

/* ------------------------------------------------------------------
 * 8. Login “Remember Me” — Windows / dark-scheme native checkbox
 *    leaks a broken rectangle; field labels use uppercase + text-fill.
 *    Draw a 20 r6 box with an SVG tick and keep the label as Body 15.
 * ---------------------------------------------------------------- */
body.nx-rl #mepr-template-login .mepr_remember_me,
body.nx-rl #mepr_loginform .mepr_remember_me {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0 0 var(--sp-2);
  padding: 0 !important;
  color-scheme: only light;
}

body.nx-rl #mepr-template-login .mepr_remember_me input[type="checkbox"],
body.nx-rl #mepr_loginform .mepr_remember_me input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  color-scheme: only light;
  accent-color: var(--purple);
  box-sizing: border-box !important;
  display: inline-block !important;
  flex: 0 0 20px;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid var(--muted) !important;
  border-radius: 6px !important;
  background-color: var(--white) !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 12px 12px !important;
  box-shadow: none !important;
  outline: none;
  color: transparent;
  cursor: pointer;
  vertical-align: middle;
  line-height: 0;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

body.nx-rl #mepr-template-login .mepr_remember_me input[type="checkbox"]::before,
body.nx-rl #mepr-template-login .mepr_remember_me input[type="checkbox"]::after,
body.nx-rl #mepr_loginform .mepr_remember_me input[type="checkbox"]::before,
body.nx-rl #mepr_loginform .mepr_remember_me input[type="checkbox"]::after {
  content: none !important;
  display: none !important;
}

@media (hover: hover) {
  body.nx-rl #mepr-template-login .mepr_remember_me input[type="checkbox"]:not(:checked):hover,
  body.nx-rl #mepr_loginform .mepr_remember_me input[type="checkbox"]:not(:checked):hover {
    border-color: var(--ink) !important;
  }
}

body.nx-rl #mepr-template-login .mepr_remember_me input[type="checkbox"]:active,
body.nx-rl #mepr_loginform .mepr_remember_me input[type="checkbox"]:active,
body.nx-rl #mepr-template-login #rememberme:active {
  border-color: var(--royal) !important;
  background-color: var(--chip) !important;
}

body.nx-rl #mepr-template-login .mepr_remember_me input[type="checkbox"]:checked,
body.nx-rl #mepr_loginform .mepr_remember_me input[type="checkbox"]:checked,
body.nx-rl #mepr-template-login #rememberme:checked {
  border-color: var(--purple) !important;
  background-color: var(--purple) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.1 6.2 4.7 8.8 9.9 3.2' stroke='%23fff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

body.nx-rl #mepr-template-login .mepr_remember_me input[type="checkbox"]:checked:active,
body.nx-rl #mepr_loginform .mepr_remember_me input[type="checkbox"]:checked:active,
body.nx-rl #mepr-template-login #rememberme:checked:active {
  border-color: var(--plum) !important;
  background-color: var(--plum) !important;
}

body.nx-rl #mepr-template-login .mepr_remember_me input[type="checkbox"]:focus-visible,
body.nx-rl #mepr_loginform .mepr_remember_me input[type="checkbox"]:focus-visible,
body.nx-rl #mepr-template-login #rememberme:focus-visible {
  border-color: var(--royal) !important;
  box-shadow: var(--ring) !important;
}

body.nx-rl #mepr-template-login .mepr_remember_me label,
body.nx-rl #mepr-template-login .mepro-form .mepr_remember_me label,
body.nx-rl #mepr-template-login .mepr-form .mepr_remember_me label,
body.nx-rl #mepr_loginform .mepr_remember_me label {
  display: inline !important;
  width: auto !important;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  font-family: var(--font) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 22px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
}

body.nx-rl #mepr-template-login .mepr_remember_me:hover label,
body.nx-rl #mepr_loginform .mepr_remember_me:hover label {
  color: var(--navy) !important;
  -webkit-text-fill-color: var(--navy) !important;
}
body.nx-rl #mepr-template-login .mp-form-row.mepr_remember_me:focus-within > label,
body.nx-rl #mepr-template-login .mp-form-row.mepr_remember_me:focus-within > label:not(.mepr-checkbox-field),
body.nx-rl #mepr_loginform .mp-form-row.mepr_remember_me:focus-within > label {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}
