/* ============================================================
   Uniqueue — forgot-password.css
   3-step password recovery: Email → OTP → New Password
   Extends auth.css variables/patterns — load AFTER auth.css
   ============================================================ */

/* ── Page centering override (no split layout here) ────────── */
.fp-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.75rem;
  background: var(--off-white);
  font-family: 'Inter', sans-serif;
}

.fp-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ── Card ───────────────────────────────────────────────────── */
.fp-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.75rem 2.5rem 3rem;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

/* ── Brand row (logo + name) ────────────────────────────────── */
.fp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.8rem;
}

.fp-brand__logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.fp-brand__name {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--red);
}

/* ── Step progress indicator ─────────────────────────────────── */
.fp-steps {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  gap: 0;
}

.fp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  position: relative;
}

.fp-step__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-light);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  z-index: 1;
  position: relative;
}

.fp-step__label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-light);
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* connector line between dots */
.fp-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-bottom: 1.25rem; /* align with dot vertical center */
  transition: background 0.2s ease;
}

/* active step */
.fp-step--active .fp-step__dot {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.fp-step--active .fp-step__label {
  color: var(--red);
  font-weight: 600;
}

/* completed step */
.fp-step--done .fp-step__dot {
  border-color: var(--success, #2e7d32);
  background: var(--success, #2e7d32);
  color: var(--white);
}

.fp-step--done .fp-step__label {
  color: var(--success, #2e7d32);
}

.fp-step-line--done {
  background: var(--success, #2e7d32);
}

/* ── Step panels ─────────────────────────────────────────────── */
.fp-step-panel {
  display: none;
  animation: fpFadeIn 0.22s ease;
}

.fp-step-panel--active {
  display: block;
}

@keyframes fpFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Headings inside each step ───────────────────────────────── */
.fp-heading {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
  letter-spacing: 0.01em;
}

.fp-subheading {
  font-size: 0.875rem;
  color: var(--ink-light);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.fp-subheading strong {
  color: var(--ink-mid);
  font-weight: 600;
}

/* ── Email live-check status ─────────────────────────────────── */
.fp-email-status {
  display: block;
  font-size: 0.77rem;
  font-weight: 500;
  margin-top: 0.38rem;
  min-height: 1.1rem;
  transition: color 0.15s ease;
}

.fp-email-status--loading { color: var(--ink-light); }
.fp-email-status--found   { color: #1a6b35; }
.fp-email-status--notfound { color: var(--red-bright, #8a1220); }

/* ── OTP input row ───────────────────────────────────────────── */
.otp-row {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.otp-input {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  caret-color: var(--red);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  /* remove native number arrows */
  -moz-appearance: textfield;
}

.otp-input::-webkit-inner-spin-button,
.otp-input::-webkit-outer-spin-button { appearance: none; margin: 0; }

.otp-input:hover { border-color: rgba(20,20,20,0.28); }

.otp-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.otp-input.is-filled {
  border-color: var(--red);
  background: rgba(102,8,16,0.04);
}

.otp-input.is-error {
  border-color: var(--red-bright, #8a1220) !important;
  background: #fdf5f5;
  animation: shake-error 0.32s ease;
}

/* ── OTP timer / resend ──────────────────────────────────────── */
.fp-resend {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-light);
  margin-bottom: 1.4rem;
}

.fp-resend__timer {
  font-weight: 600;
  color: var(--red);
}

.fp-resend__btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--red);
  font-weight: 600;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  padding: 0;
  text-decoration: underline;
  display: none;
}

.fp-resend__btn:hover { color: var(--red-deep); }
.fp-resend__btn--visible { display: inline; }

/* ── Back link ───────────────────────────────────────────────── */
.fp-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-mid);
  text-decoration: none;
  margin-top: 1.2rem;
  width: fit-content;
  transition: color var(--transition);
}

.fp-back:hover { color: var(--red); }

.fp-back svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Success panel ───────────────────────────────────────────── */
.fp-success {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.fp-success__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.2rem;
  background: var(--success-light, #dff6dd);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fp-success__icon svg {
  width: 40px;
  height: 40px;
  color: var(--success, #2e7d32);
}

.fp-success__heading {
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.fp-success__text {
  font-size: 0.875rem;
  color: var(--ink-light);
  margin-bottom: 1.8rem;
  line-height: 1.55;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 520px) {
  .fp-body { padding: 0.9rem; }
  .fp-card { padding: 2rem 1.4rem 2.25rem; }
  .otp-input { width: 42px; height: 52px; font-size: 1.25rem; }
  .otp-row { gap: 0.4rem; }
}

@media (max-width: 380px) {
  .otp-input { width: 36px; height: 46px; font-size: 1.1rem; }
}
