/* ──────────────────────────────────────────────────────────────
   The one-card pages: forgot / reset password, verify email, claim a team, help run a team (request access),
   connect the browser extension, a team's join gate. In the site's own look, from styles.css's tokens (every page
   here loads it): the cream page with its stripes, the white card with the red jersey tab (like .card / .si-card),
   REM headings, cream inputs (.input), the red pill button (.btn-primary), red text links. Light and dark alike.
   ────────────────────────────────────────────────────────────── */
.recovery-shell {
  min-height: 100vh;
  color: var(--ink);
}

.recovery-nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 32px;
  /* The logo, and the language menu on pages that hide the site header */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.recovery-logo img {
  display: block;
  width: 168px;
  height: auto;
}

.recovery-main {
  display: grid;
  min-height: calc(100vh - 96px);
  place-items: start center;
  padding: 40px 20px 80px;
}

.recovery-card {
  position: relative;
  width: min(100%, 480px);
  box-sizing: border-box;
  padding: 40px 36px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
/* The red jersey tab on the card's top edge, as on the site's other cards */
.recovery-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 32px;
  width: 64px;
  height: 6px;
  background: var(--red);
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

.recovery-eyebrow {
  margin-bottom: 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.recovery-card h1 {
  margin: 0 0 12px;
  font-family: 'REM', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.recovery-copy {
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  /* a long email address ("Signed in as …") wraps instead of pushing the card sideways on a phone */
  overflow-wrap: anywhere;
}
.recovery-copy strong { color: var(--ink); }

.recovery-copy-es {
  margin-top: 4px;
}

.recovery-form {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}
/* display:grid above would otherwise override the hidden attribute (the sent form stayed on screen). */
.recovery-form[hidden] { display: none; }

/* Field labels as the site's forms have them (.field label) */
.recovery-form label {
  margin-top: 8px;
  font-family: 'REM', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}
.recovery-form label:first-child { margin-top: 0; }

/* The site's inputs (.input / .select / .textarea) */
.recovery-form input,
.recovery-form select,
.recovery-form textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream-soft);
  color: var(--ink);
  font-family: 'REM', sans-serif;
  font-size: 16px; /* 16px, or iPhones zoom in when one is tapped */
  font-weight: 500;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

/* The request-access note (Pages/RequestAccess) */
.recovery-form textarea {
  min-height: 96px;
  resize: vertical;
}

.recovery-form input::placeholder,
.recovery-form textarea::placeholder { color: var(--ink-3); font-weight: 400; }

.recovery-form input:focus,
.recovery-form select:focus,
.recovery-form textarea:focus {
  outline: none;
  border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.recovery-hint {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}

/* The main action: the site's red pill button (.btn.btn-primary) */
.recovery-primary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 13px 26px;
  box-sizing: border-box;
  border: 1.5px solid var(--red);
  border-radius: 999px;
  background: var(--red);
  color: var(--cream);
  box-shadow: 0 4px 0 var(--red-deep);
  font-family: 'REM', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.recovery-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--red-deep);
}
.recovery-primary:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--red-deep);
}
.recovery-primary:focus-visible { outline: 3px solid var(--red-soft); outline-offset: 3px; }
/* In a form it spans the card, as the sign-in page's main button does */
.recovery-form .recovery-primary { width: 100%; }

.recovery-primary:disabled {
  opacity: .65;
  cursor: wait;
}

/* A low-key action next to the main one, e.g. "Withdraw my request"; at least 44px tall to tap */
.recovery-textbtn {
  width: fit-content;
  margin-top: 12px;
  padding: 0;
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.recovery-textbtn:hover { color: var(--ink); }

.recovery-status {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-left: 4px solid var(--success);
  border-radius: var(--radius);
  background: var(--success-soft);
  color: var(--ink);
  line-height: 1.45;
}
/* display:grid above would otherwise override the hidden attribute. */
.recovery-status[hidden] { display: none; }

.recovery-status-warning {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.recovery-status-link {
  width: fit-content;
}

.recovery-error {
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 600;
}

/* The way back / the other choice ("Back to Cross Country Booster Club", "Create a free account"): a red text link,
   at least 44px tall to tap */
.recovery-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  color: var(--red);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
}
.recovery-back:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Beside the main button (signed-out "Sign in" / "Create a free account"): on its line, with room between */
.recovery-primary + .recovery-back { margin-left: 18px; }

@media (max-width: 560px) {
  .recovery-nav { padding: 22px 20px; }
  .recovery-main { padding: 24px 16px 48px; }
  .recovery-card { padding: 34px 22px 26px; }
  .recovery-card h1 { font-size: 24px; }
  /* The main button full width, the other choice under it */
  .recovery-primary { width: 100%; }
  .recovery-primary + .recovery-back { margin-left: 0; display: flex; justify-content: center; }
}
