/* ============================================================
   SecureHold WP — Password Reset Flow
   Self-contained: covers all 4 custom password-reset page types.
   Does NOT depend on login.css — all .auth-* base styles are
   included here, scoped to the 4 relevant body classes.

   Design tokens (--brand, --slate-*, --nav-h, etc.) are
   inherited from homepage.css (.sh-homepage).
   ============================================================ */

/* ── Scope selector ─────────────────────────────────────────── */
.sh-page-forgot-password,
.sh-page-check-email,
.sh-page-reset-password,
.sh-page-password-updated {

  /* ── Additional tokens (same as login.css) ──────────────── */
  --rose:          #E11D48;
  --rose-light:    #FFE4E6;
  --rose-dark:     #9F1239;
  --emerald:       #10B981;
  --emerald-light: #d1fae5;
  --emerald-dark:  #047857;
}

/* ── Page shell ─────────────────────────────────────────────── */
.sh-page-forgot-password .auth-page,
.sh-page-check-email .auth-page,
.sh-page-reset-password .auth-page,
.sh-page-password-updated .auth-page {
  min-height: calc(100vh - var(--nav-h));
  padding: calc(var(--nav-h) + 40px) 24px 64px;
  display: flex; align-items: flex-start; justify-content: center;
  background: var(--slate-50);
}
@media (max-width: 480px) {
  .sh-page-forgot-password .auth-page,
  .sh-page-check-email .auth-page,
  .sh-page-reset-password .auth-page,
  .sh-page-password-updated .auth-page {
    padding: calc(var(--nav-h) + 20px) 16px 48px;
  }
}

.sh-page-forgot-password .auth-container,
.sh-page-check-email .auth-container,
.sh-page-reset-password .auth-container,
.sh-page-password-updated .auth-container {
  width: 100%;
  max-width: 420px;
  display: flex; flex-direction: column; align-items: center;
  gap: 0;
}

/* ── Brand mark ─────────────────────────────────────────────── */
.sh-page-forgot-password .auth-brand,
.sh-page-check-email .auth-brand,
.sh-page-reset-password .auth-brand,
.sh-page-password-updated .auth-brand {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; margin-bottom: 24px;
}
.sh-page-forgot-password .auth-brand-mark,
.sh-page-check-email .auth-brand-mark,
.sh-page-reset-password .auth-brand-mark,
.sh-page-password-updated .auth-brand-mark {
  width: 44px; height: 44px;
  background: var(--slate-900);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  box-shadow: 0 2px 12px rgba(15,23,42,0.18);
  text-decoration: none;
}
.sh-page-forgot-password .auth-brand-text,
.sh-page-check-email .auth-brand-text,
.sh-page-reset-password .auth-brand-text,
.sh-page-password-updated .auth-brand-text {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800; font-size: 17px;
  color: var(--slate-900); letter-spacing: -0.02em;
}

/* ── Card ───────────────────────────────────────────────────── */
.sh-page-forgot-password .auth-card,
.sh-page-check-email .auth-card,
.sh-page-reset-password .auth-card,
.sh-page-password-updated .auth-card {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--slate-200);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 4px 24px rgba(15,23,42,0.05);
}
@media (max-width: 480px) {
  .sh-page-forgot-password .auth-card,
  .sh-page-check-email .auth-card,
  .sh-page-reset-password .auth-card,
  .sh-page-password-updated .auth-card {
    padding: 24px 20px; border-radius: 14px;
  }
}

/* ── Card head ──────────────────────────────────────────────── */
.sh-page-forgot-password .auth-head,
.sh-page-check-email .auth-head,
.sh-page-reset-password .auth-head,
.sh-page-password-updated .auth-head {
  margin-bottom: 24px;
}
.sh-page-forgot-password .auth-h1,
.sh-page-check-email .auth-h1,
.sh-page-reset-password .auth-h1,
.sh-page-password-updated .auth-h1 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800; font-size: 22px;
  color: var(--slate-900); letter-spacing: -0.025em;
  line-height: 1.2; margin-bottom: 8px;
}
.sh-page-forgot-password .auth-sub,
.sh-page-check-email .auth-sub,
.sh-page-reset-password .auth-sub,
.sh-page-password-updated .auth-sub {
  font-size: 14px; color: var(--slate-500); line-height: 1.6;
}

/* ── Icon tile ──────────────────────────────────────────────── */
.sh-page-forgot-password .auth-icon-tile,
.sh-page-check-email .auth-icon-tile,
.sh-page-reset-password .auth-icon-tile,
.sh-page-password-updated .auth-icon-tile {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--brand-light);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  border: 1.5px solid rgba(47,91,255,0.18);
  box-shadow: 0 4px 14px rgba(47,91,255,0.10);
}
.sh-page-forgot-password .auth-icon-tile.success,
.sh-page-check-email .auth-icon-tile.success,
.sh-page-reset-password .auth-icon-tile.success,
.sh-page-password-updated .auth-icon-tile.success {
  background: var(--emerald-light);
  color: var(--emerald-dark);
  border-color: rgba(16,185,129,0.2);
  box-shadow: 0 4px 14px rgba(16,185,129,0.10);
}

/* ── Inline error ───────────────────────────────────────────── */
.sh-page-forgot-password .auth-error,
.sh-page-check-email .auth-error,
.sh-page-reset-password .auth-error,
.sh-page-password-updated .auth-error {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--rose-light);
  border: 1px solid rgba(225,29,72,0.25);
  border-radius: 10px; padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 13.5px; color: var(--rose-dark); line-height: 1.5;
}
.sh-page-forgot-password .auth-error-icon,
.sh-page-check-email .auth-error-icon,
.sh-page-reset-password .auth-error-icon,
.sh-page-password-updated .auth-error-icon {
  flex-shrink: 0; color: var(--rose); margin-top: 1px;
}
.sh-page-forgot-password .auth-error-text,
.sh-page-check-email .auth-error-text,
.sh-page-reset-password .auth-error-text,
.sh-page-password-updated .auth-error-text {
  flex: 1;
}

/* ── Form ───────────────────────────────────────────────────── */
.sh-page-forgot-password .auth-form,
.sh-page-check-email .auth-form,
.sh-page-reset-password .auth-form,
.sh-page-password-updated .auth-form {
  display: flex; flex-direction: column; gap: 18px;
}

/* ── Field ──────────────────────────────────────────────────── */
.sh-page-forgot-password .auth-field,
.sh-page-check-email .auth-field,
.sh-page-reset-password .auth-field,
.sh-page-password-updated .auth-field {
  display: flex; flex-direction: column; gap: 6px;
}
.sh-page-forgot-password .auth-label,
.sh-page-check-email .auth-label,
.sh-page-reset-password .auth-label,
.sh-page-password-updated .auth-label {
  font-size: 13px; font-weight: 600; color: var(--slate-700);
}
.sh-page-forgot-password .auth-hint,
.sh-page-check-email .auth-hint,
.sh-page-reset-password .auth-hint,
.sh-page-password-updated .auth-hint {
  font-size: 12px; color: var(--slate-400); line-height: 1.5;
}

.sh-page-forgot-password .auth-input-wrap,
.sh-page-check-email .auth-input-wrap,
.sh-page-reset-password .auth-input-wrap,
.sh-page-password-updated .auth-input-wrap {
  position: relative; display: flex; align-items: center;
}
.sh-page-forgot-password .auth-input,
.sh-page-check-email .auth-input,
.sh-page-reset-password .auth-input,
.sh-page-password-updated .auth-input {
  width: 100%;
  font-family: 'Inter', sans-serif; font-size: 14px;
  color: var(--slate-900);
  background: #fff;
  border: 1.5px solid var(--slate-200);
  border-radius: 9px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sh-page-forgot-password .auth-input::placeholder,
.sh-page-check-email .auth-input::placeholder,
.sh-page-reset-password .auth-input::placeholder,
.sh-page-password-updated .auth-input::placeholder {
  color: var(--slate-400);
}
.sh-page-forgot-password .auth-input:focus,
.sh-page-check-email .auth-input:focus,
.sh-page-reset-password .auth-input:focus,
.sh-page-password-updated .auth-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47,91,255,0.1);
}
.sh-page-forgot-password .auth-field.has-error .auth-input,
.sh-page-check-email .auth-field.has-error .auth-input,
.sh-page-reset-password .auth-field.has-error .auth-input,
.sh-page-password-updated .auth-field.has-error .auth-input {
  border-color: var(--rose);
}
.sh-page-forgot-password .auth-field.has-error .auth-input:focus,
.sh-page-check-email .auth-field.has-error .auth-input:focus,
.sh-page-reset-password .auth-field.has-error .auth-input:focus,
.sh-page-password-updated .auth-field.has-error .auth-input:focus {
  box-shadow: 0 0 0 3px rgba(225,29,72,0.1);
}

/* Password eye toggle */
.sh-page-forgot-password .auth-input-toggle,
.sh-page-check-email .auth-input-toggle,
.sh-page-reset-password .auth-input-toggle,
.sh-page-password-updated .auth-input-toggle {
  position: absolute; right: 12px;
  background: transparent; border: none; cursor: pointer; padding: 2px;
  color: var(--slate-400); display: flex; align-items: center;
  transition: color 0.15s;
}
.sh-page-forgot-password .auth-input-toggle:hover,
.sh-page-check-email .auth-input-toggle:hover,
.sh-page-reset-password .auth-input-toggle:hover,
.sh-page-password-updated .auth-input-toggle:hover {
  color: var(--slate-700);
}
/* Reserve space for the toggle button inside password fields */
.sh-page-forgot-password .auth-input-wrap:has(.auth-input-toggle) .auth-input,
.sh-page-check-email .auth-input-wrap:has(.auth-input-toggle) .auth-input,
.sh-page-reset-password .auth-input-wrap:has(.auth-input-toggle) .auth-input,
.sh-page-password-updated .auth-input-wrap:has(.auth-input-toggle) .auth-input {
  padding-right: 40px;
}

/* ── Primary button ─────────────────────────────────────────── */
.sh-page-forgot-password .auth-btn-primary,
.sh-page-check-email .auth-btn-primary,
.sh-page-reset-password .auth-btn-primary,
.sh-page-password-updated .auth-btn-primary {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  background: var(--brand); color: #fff;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14.5px;
  padding: 12px 20px; border-radius: 10px;
  border: none; cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 2px rgba(47,91,255,0.25);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  margin-top: 4px;
}
.sh-page-forgot-password .auth-btn-primary:hover,
.sh-page-check-email .auth-btn-primary:hover,
.sh-page-reset-password .auth-btn-primary:hover,
.sh-page-password-updated .auth-btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 3px 10px rgba(47,91,255,0.35);
  transform: translateY(-1px);
}
.sh-page-forgot-password .auth-btn-primary:disabled,
.sh-page-check-email .auth-btn-primary:disabled,
.sh-page-reset-password .auth-btn-primary:disabled,
.sh-page-password-updated .auth-btn-primary:disabled {
  opacity: 0.6; cursor: not-allowed; transform: none;
}
/* as-link: allows <a> to use the same full-width button style */
.sh-page-forgot-password .auth-btn-primary.as-link,
.sh-page-check-email .auth-btn-primary.as-link,
.sh-page-reset-password .auth-btn-primary.as-link,
.sh-page-password-updated .auth-btn-primary.as-link {
  display: flex;
}

/* ── Fineprint ──────────────────────────────────────────────── */
.sh-page-forgot-password .auth-fineprint,
.sh-page-check-email .auth-fineprint,
.sh-page-reset-password .auth-fineprint,
.sh-page-password-updated .auth-fineprint {
  font-size: 12px; color: var(--slate-400);
  text-align: center; line-height: 1.6; margin-top: 16px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.sh-page-forgot-password .auth-footer,
.sh-page-check-email .auth-footer,
.sh-page-reset-password .auth-footer,
.sh-page-password-updated .auth-footer {
  margin-top: 20px; text-align: center;
}
.sh-page-forgot-password .auth-footer-link,
.sh-page-check-email .auth-footer-link,
.sh-page-reset-password .auth-footer-link,
.sh-page-password-updated .auth-footer-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--slate-500);
  text-decoration: none; transition: color 0.15s;
}
.sh-page-forgot-password .auth-footer-link:hover,
.sh-page-check-email .auth-footer-link:hover,
.sh-page-reset-password .auth-footer-link:hover,
.sh-page-password-updated .auth-footer-link:hover {
  color: var(--slate-800);
}

/* ============================================================
   Password-reset-specific styles
   (layered on top of the auth base above)
   ============================================================ */

/* ── Error icon tile (invalid/expired link state) ───────────── */
.sh-page-forgot-password .auth-icon-tile.rp-error-tile,
.sh-page-check-email .auth-icon-tile.rp-error-tile,
.sh-page-reset-password .auth-icon-tile.rp-error-tile,
.sh-page-password-updated .auth-icon-tile.rp-error-tile {
  background: #fff5f5;
  color: var(--rose-dark);
  border-color: rgba(225,29,72,0.20);
  box-shadow: 0 4px 14px rgba(225,29,72,0.10);
}

/* ── Password requirements checklist ───────────────────────── */
.sh-page-reset-password .rp-reqs {
  list-style: none;
  margin: -4px 0 4px;
  padding: 10px 12px;
  background: var(--slate-50);
  border: 1px dashed var(--slate-200);
  border-radius: 10px;
  display: grid;
  gap: 6px;
}
.sh-page-reset-password .rp-req {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px;
  color: var(--slate-500);
  line-height: 1.3;
}
.sh-page-reset-password .rp-req-dot {
  width: 16px; height: 16px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--slate-200);
  color: var(--slate-300);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sh-page-reset-password .rp-req-label {
  flex: 1;
}
.sh-page-reset-password .rp-req.ok {
  color: var(--slate-700);
}
.sh-page-reset-password .rp-req.ok .rp-req-dot {
  background: var(--emerald-light);
  border-color: rgba(16,185,129,0.35);
  color: var(--emerald-dark);
}

/* ── Security note (check-email page) ──────────────────────── */
.sh-page-check-email .rp-security-note,
.sh-page-forgot-password .rp-security-note {
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  margin-top: 18px;
}
.sh-page-check-email .rp-security-icon,
.sh-page-forgot-password .rp-security-icon {
  display: inline-flex; align-items: center;
  color: var(--slate-400);
  flex-shrink: 0;
}
