/* =========================================================================
   LocalBuddy — Forgot password (forgotpassword.php)
   The page had no CSS left (its rules were only in stylebackup.css).
   Same look as the Login page and the app: green #0b6b34, Plus Jakarta Sans.
   Steps: .forgot-step (hidden) / .forgot-step.active (shown) — set by the page JS.
   ========================================================================= */
:root {
  --fp-green: #0b6b34;
  --fp-green-2: #10843f;
  --fp-soft: #eef8f1;
  --fp-yellow: #f8c51c;
  --fp-ink: #101828;
  --fp-text: #475467;
  --fp-muted: #667085;
  --fp-line: #eaecf0;
  --fp-input: #d0d5dd;
  --fp-danger: #d92d20;
  --fp-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body:has(.forgot-section) { margin: 0; background: #f5f8f6; }

.forgot-section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  box-sizing: border-box;
  font-family: var(--fp-font);
  background:
    radial-gradient(520px 320px at 100% 0%, rgba(248, 197, 28, .18), transparent 70%),
    radial-gradient(520px 360px at 0% 100%, rgba(11, 107, 52, .12), transparent 70%),
    #f5f8f6;
}
.forgot-section *, .forgot-section *::before, .forgot-section *::after { box-sizing: border-box; }
.forgot-container { width: 100%; max-width: 460px; }

.forgot-card {
  background: #fff;
  border: 1px solid var(--fp-line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .10);
}

.forgot-header {
  position: relative;
  overflow: hidden;
  padding: 30px 24px 26px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(260px 180px at 100% 0%, rgba(248, 197, 28, .3), transparent 70%),
    linear-gradient(135deg, var(--fp-green), var(--fp-green-2));
}
.forgot-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .18);
  font-size: 26px;
  color: #fff;
  margin-bottom: 12px;
}
.forgot-header h1 { margin: 0; font-family: var(--fp-font); font-weight: 800; font-size: 26px; letter-spacing: -.02em; color: #fff; }
.forgot-header p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.55; color: rgba(255, 255, 255, .9); }

.forgot-body { padding: 24px 22px 26px; }

/* steps */
.forgot-step { display: none; }
.forgot-step.active { display: block; animation: fpIn .3s ease both; }
@keyframes fpIn { from { transform: translateY(8px); } to { transform: none; } }

.info-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--fp-soft);
  color: #0b4f27;
  font-size: 14px;
  line-height: 1.55;
}
.info-box i { margin-top: 3px; color: var(--fp-green); }
.info-box strong { word-break: break-all; }

/* alerts (JS adds alert-success / alert-danger / alert-warning / alert-info) */
.forgot-body .alert { border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; font-weight: 600; border: 1px solid transparent; }
.forgot-body .alert-success { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.forgot-body .alert-danger { background: #fef3f2; color: #b42318; border-color: #fecdca; }
.forgot-body .alert-warning { background: #fffaeb; color: #b54708; border-color: #fedf89; }
.forgot-body .alert-info { background: #eff8ff; color: #175cd3; border-color: #b2ddff; }

/* fields */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 7px; font-weight: 700; font-size: 14px; color: var(--fp-ink); }
.form-input-wrapper { position: relative; }
.form-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 46px 12px 14px;
  border: 1.5px solid var(--fp-input);
  border-radius: 12px;
  background: #fff;
  font-family: var(--fp-font);
  font-size: 16px;
  color: var(--fp-ink);
  transition: border-color .15s, box-shadow .15s;
}
.form-input::placeholder { color: #98a2b3; }
.form-input:focus { outline: none; border-color: var(--fp-green); box-shadow: 0 0 0 4px rgba(11, 107, 52, .12); }
.form-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--fp-muted); font-size: 16px; }
.error-message { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--fp-danger); }

/* 6-digit code */
.code-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-input {
  width: 100%;
  min-width: 0;
  height: 56px;
  border: 1.5px solid var(--fp-input);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  font-family: var(--fp-font);
  font-weight: 800;
  font-size: 22px;
  color: var(--fp-ink);
  transition: border-color .15s, box-shadow .15s;
}
.code-input:focus { outline: none; border-color: var(--fp-green); box-shadow: 0 0 0 4px rgba(11, 107, 52, .12); }

.resend-code { margin: 0 0 16px; text-align: center; font-size: 13.5px; color: var(--fp-muted); }
.resend-link { color: var(--fp-green); font-weight: 800; text-decoration: none; }
.resend-link:hover { text-decoration: underline; }

/* password strength + rules */
.password-strength { margin-top: 10px; }
.strength-bar { height: 6px; border-radius: 3px; background: #f2f4f7; overflow: hidden; }
.strength-fill { height: 100%; width: 0; border-radius: 3px; background: var(--fp-green); transition: width .25s, background-color .25s; }
.strength-text { margin-top: 5px; font-size: 12.5px; font-weight: 700; color: var(--fp-muted); }
.password-requirements { margin: 0 0 18px; padding: 12px 14px; border-radius: 14px; background: #f9fafb; border: 1px solid var(--fp-line); }
.password-requirements p { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--fp-ink); }
.password-requirements ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.password-requirements li { position: relative; padding-left: 20px; font-size: 12.8px; color: var(--fp-muted); }
.password-requirements li::before { content: "\25CB"; position: absolute; left: 2px; top: 0; color: #98a2b3; }
.password-requirements li.valid { color: #067647; font-weight: 700; }
.password-requirements li.valid::before { content: "\2713"; color: var(--fp-green); font-weight: 800; }

/* button */
.submit-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--fp-green), var(--fp-green-2));
  color: #fff;
  font-family: var(--fp-font);
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(11, 107, 52, .25);
  transition: transform .08s, filter .15s;
}
a.submit-btn { color: #fff; }
.submit-btn:hover { filter: brightness(1.06); }
.submit-btn:active { transform: translateY(1px); }
.submit-btn:disabled { opacity: .7; cursor: progress; }
.submit-btn .spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: fpSpin .7s linear infinite;
}
@keyframes fpSpin { to { transform: rotate(360deg); } }

.back-link { margin-top: 16px; text-align: center; }
.back-link a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--fp-green); text-decoration: none; }
.back-link a:hover { text-decoration: underline; }

/* done */
.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: var(--fp-soft);
  color: var(--fp-green);
  font-size: 32px;
  box-shadow: 0 0 0 10px rgba(11, 107, 52, .06);
}
.success-title { margin: 0 0 6px; text-align: center; font-family: var(--fp-font); font-weight: 800; font-size: 22px; color: var(--fp-ink); }
.success-text { margin: 0 0 20px; text-align: center; font-size: 14.5px; line-height: 1.6; color: var(--fp-text); }

@media (max-width: 380px) {
  .code-inputs { gap: 6px; }
  .code-input { height: 50px; font-size: 20px; }
  .password-requirements ul { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .forgot-step.active { animation: none; }
}

/* ENHANCEMENT (2026-11-28): the mascot peeks over the card + 4-step progress dots
   (dots follow the .forgot-step.active set by the page JS, via :has). */
.forgot-container { position: relative; padding-top: 74px; }
.forgot-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: 112px;
  height: 98px;
  transform: translateX(-50%);
  background: url("../images/lb-mascot-ok.webp") center bottom / contain no-repeat;
  filter: drop-shadow(0 8px 12px rgba(16, 24, 40, .18));
}
.forgot-header { padding-top: 34px; }
.forgot-header .forgot-icon { display: none; }      /* the mascot replaces the lock icon */
.fp-steps { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.fp-steps span { width: 22px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .3); transition: background .25s, width .25s; }
.forgot-card:has(#step1.active) .fp-steps span:nth-child(-n+1),
.forgot-card:has(#step2.active) .fp-steps span:nth-child(-n+2),
.forgot-card:has(#step3.active) .fp-steps span:nth-child(-n+3),
.forgot-card:has(#step4.active) .fp-steps span:nth-child(-n+4) { background: #f8c51c; }
.forgot-card:has(#step1.active) .fp-steps span:nth-child(1),
.forgot-card:has(#step2.active) .fp-steps span:nth-child(2),
.forgot-card:has(#step3.active) .fp-steps span:nth-child(3),
.forgot-card:has(#step4.active) .fp-steps span:nth-child(4) { width: 34px; }