/* ==========================================================================
   NSRL ACCOUNT RECOVERY — /cant-sign-in, /forgot-password, /forgot-username
   Path: assets/public/css/account-recovery.css

   1. Tokens + page reset
   2. Shell (background, brand, bottom links)
   3. Headline
   4. Can't sign in — option cards
   5. Split layout + card
   6. Forgot Username form
   7. Ultimate Member password form (Forgot Password)
   8. Responsive
   ========================================================================== */

/* 1. TOKENS + PAGE RESET ------------------------------------------------ */
.nsrl-recovery {
  --nsrl-rc-green-950: #06190f;
  --nsrl-rc-green-900: #0b3d24;
  --nsrl-rc-green-700: #135232;
  --nsrl-rc-accent: #2f8f5b;
  --nsrl-rc-ink: #14231b;
  --nsrl-rc-muted: #5b6b62;
  --nsrl-rc-field: #eef2f0;
  --nsrl-rc-line: #d6e0db;
  --nsrl-rc-danger: #b42318;
  --nsrl-rc-serif: var(--nsrl-font-heading, "DM Sans", sans-serif);
  --nsrl-rc-sans: var(--nsrl-font, "DM Sans", sans-serif);
}

body.nsrl-recovery-page:has(.nsrl-recovery) {
  margin: 0;
  overflow: hidden;
  background: #06190f;
}

body.nsrl-recovery-page .entry-header,
body.nsrl-recovery-page .page-header,
body.nsrl-recovery-page .entry-title {
  display: none !important;
}

.nsrl-recovery,
.nsrl-recovery *,
.nsrl-recovery *::before,
.nsrl-recovery *::after {
  box-sizing: border-box;
}

/* 2. SHELL ------------------------------------------------------------- */
.nsrl-recovery {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--nsrl-rc-sans);
  color: #ffffff;
  background: var(--nsrl-rc-green-950);
}

body.elementor-editor-active .nsrl-recovery,
body.elementor-editor-preview .nsrl-recovery {
  position: relative;
  min-height: 100vh;
}
body.elementor-editor-active.nsrl-recovery-page,
body.elementor-editor-preview.nsrl-recovery-page {
  overflow: auto;
}

.nsrl-recovery__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 15%, rgba(47, 143, 91, 0.35) 0%, rgba(47, 143, 91, 0) 45%),
    linear-gradient(140deg, #06190f 0%, #0b3d24 55%, #135232 100%);
}

.nsrl-recovery.has-bg .nsrl-recovery__bg {
  background:
    linear-gradient(100deg, rgba(6, 25, 15, 0.94) 0%, rgba(8, 40, 24, 0.82) 45%, rgba(11, 61, 36, 0.6) 100%),
    var(--nsrl-recovery-bg) center / cover no-repeat;
}

.nsrl-recovery__top,
.nsrl-recovery__main,
.nsrl-recovery__bottom {
  position: relative;
  z-index: 1;
}

.nsrl-recovery__top {
  padding: 32px 48px 0;
}

.nsrl-recovery__brand {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  color: #ffffff;
  text-decoration: none;
  line-height: 1.2;
}
.nsrl-recovery__brand:visited { color: #ffffff; }
.nsrl-recovery__brand:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 6px;
  border-radius: 2px;
}

.nsrl-recovery__org-name {
  font-family: var(--nsrl-rc-serif);
  font-size: 22px;
  font-weight: 700;
}

.nsrl-recovery__org-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.3px;
}

.nsrl-recovery__main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 48px;
}

.nsrl-recovery__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 0 48px 28px;
}

.nsrl-recovery__bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nsrl-recovery__bottom-links li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  background: none !important;
}
.nsrl-recovery__bottom-links li::marker { content: "" !important; }
.nsrl-recovery__bottom-links li::before,
.nsrl-recovery__bottom-links li::after { content: none !important; display: none !important; }

.nsrl-recovery__bottom-links a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}
.nsrl-recovery__bottom-links a:visited { color: rgba(255, 255, 255, 0.82); }
.nsrl-recovery__bottom-links a:hover { color: #ffffff; text-decoration: underline; }

.nsrl-recovery__copy {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* 3. HEADLINE ----------------------------------------------------------- */
.nsrl-recovery__headline {
  margin: 0;
  font-family: var(--nsrl-rc-serif);
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.nsrl-recovery__headline--center {
  text-align: center;
}

.nsrl-recovery__lead {
  margin: 14px 0 0;
  text-align: center;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.78);
}

/* 4. CAN'T SIGN IN — OPTION CARDS -------------------------------------- */
.nsrl-recovery__choose {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nsrl-recovery__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  justify-content: center;
  gap: 24px;
  width: 100%;
  margin-top: 44px;
}

.nsrl-recovery-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 250px;
  padding: 44px 32px 40px;
  background: #ffffff;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--nsrl-rc-ink);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nsrl-recovery-option:visited { color: var(--nsrl-rc-ink); }
.nsrl-recovery-option:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 48px -18px rgba(0, 0, 0, 0.6);
}
.nsrl-recovery-option:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

.nsrl-recovery-option__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: #e8f2ec;
  color: var(--nsrl-rc-green-900);
}
.nsrl-recovery-option__icon svg {
  width: 36px;
  height: 36px;
}

.nsrl-recovery-option__title {
  font-family: var(--nsrl-rc-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--nsrl-rc-green-900);
}

.nsrl-recovery-option__text {
  max-width: 260px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--nsrl-rc-muted);
}

.nsrl-recovery-option__go {
  margin-top: auto;
  padding-top: 12px;
  font-size: 20px;
  color: var(--nsrl-rc-accent);
  transition: transform 0.2s ease;
}
.nsrl-recovery-option:hover .nsrl-recovery-option__go { transform: translateX(4px); }

.nsrl-recovery__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}
.nsrl-recovery__back:visited { color: rgba(255, 255, 255, 0.86); }
.nsrl-recovery__back:hover { color: #ffffff; text-decoration: underline; }

/* 5. SPLIT LAYOUT + CARD ------------------------------------------------ */
.nsrl-recovery__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 540px);
  align-items: center;
  gap: 64px;
  width: 100%;
}

.nsrl-recovery__split .nsrl-recovery__headline {
  align-self: end;
  justify-self: center;
  padding-bottom: 24px;
  padding-left: 8%;
  text-transform: none;
}

.nsrl-recovery-card {
  display: flex;
  flex-direction: column;
  min-height: 540px;
  padding: 56px 56px 40px;
  background: #fbfcfb;
  border-radius: 12px;
  color: var(--nsrl-rc-ink);
  text-align: center;
  box-shadow: 0 28px 60px -24px rgba(0, 0, 0, 0.6);
}

.nsrl-recovery-card__step {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}
.nsrl-recovery-card__step[hidden] { display: none; }
.nsrl-recovery-card__step:focus { outline: none; }

.nsrl-recovery-card__title {
  margin: 0;
  font-family: var(--nsrl-rc-sans);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--nsrl-rc-ink);
}

.nsrl-recovery-card__text {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--nsrl-rc-muted);
}

.nsrl-recovery-card__notice {
  margin: 24px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fdecea;
  color: var(--nsrl-rc-danger);
  font-size: 14px;
}

.nsrl-recovery-card__notice--expired {
  line-height: 1.5;
}
.nsrl-recovery-card__notice--expired strong {
  display: block;
  margin-bottom: 2px;
}
.nsrl-recovery-card__notice--expired a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.nsrl-recovery-card__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}
.nsrl-recovery-card__links a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--nsrl-rc-muted);
  text-decoration: none;
}
.nsrl-recovery-card__links a:visited { color: var(--nsrl-rc-muted); }
.nsrl-recovery-card__links a:hover,
.nsrl-recovery-card__links a:focus-visible { color: var(--nsrl-rc-green-900); text-decoration: underline; }

/* 6. FORGOT USERNAME FORM ---------------------------------------------- */
.nsrl-recovery-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 0 auto;
  margin-top: 36px;
}

.nsrl-recovery-field {
  position: relative;
  width: 100%;
}

.nsrl-recovery .nsrl-recovery-field__input {
  display: block !important;
  width: 100% !important;
  height: 60px !important;
  margin: 0 !important;
  padding: 22px 16px 6px !important;
  border: 2px solid transparent !important;
  border-radius: 6px !important;
  background: var(--nsrl-rc-field) !important;
  box-shadow: none !important;
  font-family: var(--nsrl-rc-sans) !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  color: var(--nsrl-rc-ink) !important;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.nsrl-recovery .nsrl-recovery-field__input:hover { background: #e6ece9 !important; }
.nsrl-recovery .nsrl-recovery-field__input:focus {
  outline: none !important;
  background: #ffffff !important;
  border-color: var(--nsrl-rc-green-900) !important;
}
.nsrl-recovery .nsrl-recovery-field__input[aria-invalid="true"] { border-color: var(--nsrl-rc-danger) !important; }

.nsrl-recovery-field__label {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--nsrl-rc-muted);
  pointer-events: none;
  transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease;
}
.nsrl-recovery-field__input:focus + .nsrl-recovery-field__label,
.nsrl-recovery-field__input:not(:placeholder-shown) + .nsrl-recovery-field__label {
  top: 16px;
  font-size: 10px;
  color: var(--nsrl-rc-green-900);
}

.nsrl-recovery-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nsrl-recovery-form__error {
  width: 100%;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fdecea;
  color: var(--nsrl-rc-danger);
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}
.nsrl-recovery-form__error[hidden] { display: none; }

.nsrl-recovery-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-top: auto;
  padding: 0;
  border: 2px solid var(--nsrl-rc-green-900);
  border-radius: 24px;
  background: var(--nsrl-rc-green-900);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.nsrl-recovery-form .nsrl-recovery-submit { margin-top: 48px; }
.nsrl-recovery-submit:hover:not(:disabled) { background: #062415; transform: translateY(-1px); }
.nsrl-recovery-submit:focus-visible { outline: 3px solid rgba(47, 143, 91, 0.45); outline-offset: 3px; }
.nsrl-recovery-submit:disabled {
  cursor: not-allowed;
  background: transparent;
  border-color: #e3e8e5;
  color: #c9d2cd;
}

.nsrl-recovery-submit__arrow {
  width: 28px;
  height: 28px;
}

.nsrl-recovery-submit__spinner {
  display: none;
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: nsrl-rc-spin 0.8s linear infinite;
}
.nsrl-recovery-submit.is-loading { background: var(--nsrl-rc-green-900); border-color: var(--nsrl-rc-green-900); }
.nsrl-recovery-submit.is-loading .nsrl-recovery-submit__arrow { display: none; }
.nsrl-recovery-submit.is-loading .nsrl-recovery-submit__spinner { display: block; }

@keyframes nsrl-rc-spin { to { transform: rotate(360deg); } }

.nsrl-recovery-done {
  align-items: center;
  justify-content: center;
}

.nsrl-recovery-done__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: #e8f2ec;
  color: var(--nsrl-rc-green-900);
}
.nsrl-recovery-done__icon svg { width: 30px; height: 30px; }

.nsrl-recovery-ghost {
  margin-top: 28px;
  padding: 12px 22px;
  border: 1px solid var(--nsrl-rc-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--nsrl-rc-green-900);
  font-family: var(--nsrl-rc-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.nsrl-recovery-ghost:hover { background: #f1f7f3; }
.nsrl-recovery-ghost:focus-visible { outline: 3px solid rgba(47, 143, 91, 0.35); outline-offset: 2px; }

/* 7. ULTIMATE MEMBER PASSWORD FORM -------------------------------------
   UM ships its own rules with !important, so these overrides need it too. */
.nsrl-recovery-card__form--um {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  margin-top: 28px;
}

.nsrl-recovery-card__form--um .um {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--nsrl-rc-sans);
}

.nsrl-recovery-card__form--um .um-form {
  margin: 0 !important;
}

.nsrl-recovery-card__form--um .um-form:has(input[name="username_b"]) .um-field-type_block,
.nsrl-recovery-card__form--um .um-form:has(input[name="username_b"]) .um-field-block {
  display: none !important;
}

.nsrl-recovery-card__form--um .um-field-block,
.nsrl-recovery-card__form--um .um-field-block div {
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: var(--nsrl-rc-muted) !important;
  text-align: center !important;
}

.nsrl-recovery-card__form--um .um-field {
  padding: 0 0 16px 0 !important;
}

.nsrl-recovery-card__form--um .um-field-label {
  margin: 0 0 6px 0 !important;
  text-align: left;
}
.nsrl-recovery-card__form--um .um-field-label label {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--nsrl-rc-muted) !important;
}

.nsrl-recovery-card__form--um .um-form input[type="text"],
.nsrl-recovery-card__form--um .um-form input[type="email"],
.nsrl-recovery-card__form--um .um-form input[type="password"] {
  width: 100% !important;
  height: 60px !important;
  padding: 0 16px !important;
  border: 2px solid transparent !important;
  border-radius: 6px !important;
  background: var(--nsrl-rc-field) !important;
  box-shadow: none !important;
  font-size: 16px !important;
  color: var(--nsrl-rc-ink) !important;
}
.nsrl-recovery-card__form--um .um-form input::placeholder {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--nsrl-rc-muted);
  opacity: 1;
}
.nsrl-recovery-card__form--um .um-form input[type="text"]:focus,
.nsrl-recovery-card__form--um .um-form input[type="email"]:focus,
.nsrl-recovery-card__form--um .um-form input[type="password"]:focus {
  outline: none !important;
  background: #ffffff !important;
  border-color: var(--nsrl-rc-green-900) !important;
}

.nsrl-recovery-card__form--um .um-field-error {
  margin-top: 6px !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  background: #fdecea !important;
  color: var(--nsrl-rc-danger) !important;
  font-size: 13px !important;
  text-align: left;
}
.nsrl-recovery-card__form--um .um-field-arrow { display: none !important; }

.nsrl-recovery-card__form--um :has(> .g-recaptcha) {
  display: flex !important;
  justify-content: center !important;
}

.nsrl-recovery-card__form--um .um-col-alt,
.nsrl-recovery-card__form--um .um-col-alt-b {
  display: flex !important;
  justify-content: center;
  margin: 32px 0 0 0 !important;
  padding: 0 !important;
}
.nsrl-recovery-card__form--um .um-center,
.nsrl-recovery-card__form--um .um-left,
.nsrl-recovery-card__form--um .um-half {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}
.nsrl-recovery-card__form--um .um-clear { display: none !important; }

.nsrl-recovery-card__form--um .um-form input[type="submit"].um-button,
.nsrl-recovery-card__form--um .um-form .um-button {
  width: 76px !important;
  min-width: 0 !important;
  height: 76px !important;
  padding: 0 !important;
  border: 2px solid var(--nsrl-rc-green-900) !important;
  border-radius: 24px !important;
  background: var(--nsrl-rc-green-900) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12H19M13 6L19 12L13 18' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 28px 28px no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.nsrl-recovery-card__form--um .um-form .um-button:hover {
  background-color: #062415 !important;
  transform: translateY(-1px);
}
.nsrl-recovery-card__form--um .um-form .um-button:focus-visible {
  outline: 3px solid rgba(47, 143, 91, 0.45) !important;
  outline-offset: 3px;
}

/* 8. RESPONSIVE --------------------------------------------------------- */
@media (max-width: 960px) {
  .nsrl-recovery__split {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 520px;
    margin: 0 auto;
  }
  .nsrl-recovery__split .nsrl-recovery__headline {
    align-self: auto;
    justify-self: center;
    padding-bottom: 0;
    padding-left: 0;
    text-align: center;
  }
  .nsrl-recovery__split .nsrl-recovery__headline br { display: none; }
  .nsrl-recovery-card { min-height: 0; }
}

@media (max-width: 720px) {
  .nsrl-recovery__top { padding: 24px 20px 0; }
  .nsrl-recovery__org-name { font-size: 18px; }
  .nsrl-recovery__main { padding: 32px 20px; }
  .nsrl-recovery__bottom { padding: 0 20px 24px; justify-content: center; text-align: center; }
  .nsrl-recovery__bottom-links { justify-content: center; }
  .nsrl-recovery__options { grid-template-columns: 1fr; max-width: 420px; gap: 16px; margin-top: 32px; }
  .nsrl-recovery-option { min-height: 0; padding: 32px 24px; }
  .nsrl-recovery-card { padding: 40px 24px 32px; }
  .nsrl-recovery-card__title { font-size: 22px; }
  .nsrl-recovery__headline { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .nsrl-recovery-option,
  .nsrl-recovery-option__go,
  .nsrl-recovery-submit { transition: none; }
  .nsrl-recovery-submit__spinner { animation-duration: 2s; }
}
