/*
 * wa-forgot.css — Forgot password & reset password pages
 *
 * Standalone CSS (no wa-app.css dependency).
 * Design tokens mirror index.php — dark theme, gold accent, same fonts.
 */

/* ── Reset & tokens ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #0a0a0c;
  --ink2:       #111116;
  --surface:    #18181f;
  --surface2:   #1e1e28;
  --border:     rgba(255,255,255,0.08);
  --border2:    rgba(255,255,255,0.12);
  --gold:       #c9a84c;
  --gold-dim:   #8a6e2f;
  --gold-pale:  rgba(201,168,76,0.12);
  --text:       #eae5dc;
  --text2:      #a0998e;
  --muted:      #5a5a68;
  --green:      #2ec27e;
  --red:        #e05a5a;
  --font-d:     'Cormorant Garamond', Georgia, serif;
  --font-b:     'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Noise texture */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ── Nav bar ─────────────────────────────────────────────── */
.fp-nav {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,12,0.96);
  backdrop-filter: blur(20px);
  flex-shrink: 0;
}

.fp-logo {
  display: flex; align-items: baseline; gap: 2px;
  text-decoration: none;
}
.fp-logo-text {
  font-family: var(--font-d);
  font-size: 26px; font-weight: 400;
  color: var(--text); letter-spacing: -0.01em;
}
.fp-logo-text span { color: var(--gold); }
.fp-logo-tld {
  font-family: var(--font-b);
  font-size: 12px; font-weight: 300;
  color: var(--gold); letter-spacing: 0.04em;
  margin-left: 1px; opacity: 0.8;
}

.fp-nav-link {
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--text2); text-decoration: none;
  padding: 6px 4px;
  transition: color 0.2s;
}
.fp-nav-link:hover { color: var(--gold); }

/* ── Page body — centered card ───────────────────────────── */
.fp-body {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
}

/* ── Card ────────────────────────────────────────────────── */
.fp-card {
  width: 100%;
  max-width: 440px;
  background: var(--ink2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 48px 44px;
  animation: fpFadeUp 0.55s ease both;
}

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

/* ── Step transitions ────────────────────────────────────── */
.fp-step {
  display: none;
}
.fp-step.active {
  display: block;
  animation: fpFadeUp 0.35s ease both;
}

/* ── Eyebrow (icon row) ──────────────────────────────────── */
.fp-eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.fp-eyebrow-line { width: 28px; height: 1px; background: var(--gold); opacity: 0.5; flex-shrink: 0; }
.fp-eyebrow span {
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold);
}

/* ── Title / subtitle ────────────────────────────────────── */
.fp-title {
  font-family: var(--font-d);
  font-size: 34px; font-weight: 300;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.fp-sub {
  font-size: 13px; color: var(--muted);
  margin-bottom: 32px; line-height: 1.6;
}
.fp-sub strong { color: var(--text2); font-weight: 400; }

/* ── Fields ──────────────────────────────────────────────── */
.fp-field { margin-bottom: 18px; position: relative; }

.fp-label {
  display: block;
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 7px;
}

.fp-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-family: var(--font-b);
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fp-input::placeholder { color: var(--muted); }
.fp-input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px var(--gold-pale);
}
.fp-input.has-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224,90,90,0.12);
}
.fp-input.has-ok {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46,194,126,0.1);
}

/* Password field with toggle */
.fp-pwd-wrap { position: relative; }
.fp-pwd-wrap .fp-input { padding-right: 44px; }
.fp-pwd-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-size: 13px; padding: 4px;
  transition: color 0.2s;
}
.fp-pwd-toggle:hover { color: var(--text2); }

/* OTP input — large centred */
.fp-otp-input {
  font-size: 30px !important;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 16px 10px !important;
  font-variant-numeric: tabular-nums;
}

/* Field hint (ok / error) */
.fp-hint {
  font-size: 11px; margin-top: 5px;
  min-height: 14px;
}
.fp-hint.ok  { color: var(--green); }
.fp-hint.err { color: var(--red); }

/* ── Password strength bar ───────────────────────────────── */
.fp-strength {
  margin-top: 8px;
  display: none;
}
.fp-strength.visible { display: block; }
.fp-strength-bar {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 5px;
}
.fp-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.fp-strength-label {
  font-size: 11px; color: var(--muted);
}

/* ── Submit button ───────────────────────────────────────── */
.fp-submit {
  width: 100%; margin-top: 6px;
  background: var(--gold);
  border: none; border-radius: 5px;
  color: #0a0a0c;
  font-family: var(--font-b);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.fp-submit:hover:not(:disabled) {
  background: #d4b060;
  box-shadow: 0 4px 24px rgba(201,168,76,0.28);
}
.fp-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* Spinner inside button */
.fp-spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: fpSpin 0.65s linear infinite;
}
@keyframes fpSpin { to { transform: rotate(360deg); } }

/* ── Inline error / success messages ─────────────────────── */
.fp-error {
  font-size: 12px; color: var(--red);
  margin-top: 12px; display: none;
  line-height: 1.5;
}
.fp-success-msg {
  font-size: 12px; color: var(--green);
  margin-top: 12px; display: none;
}

/* ── Footer row (back link, resend, etc.) ────────────────── */
.fp-footer-row {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-top: 20px;
  font-size: 12px; color: var(--muted);
}
.fp-footer-sep { color: var(--border2); }

.fp-text-btn {
  background: none; border: none;
  color: var(--muted); font-family: var(--font-b);
  font-size: 12px; cursor: pointer;
  padding: 4px; transition: color 0.2s;
  text-decoration: underline; text-underline-offset: 2px;
}
.fp-text-btn:hover { color: var(--gold); }
.fp-text-btn:disabled { opacity: 0.45; cursor: not-allowed; text-decoration: none; }

.fp-back-link {
  display: inline-block; margin-top: 20px;
  font-size: 12px; color: var(--muted);
  text-decoration: none; letter-spacing: 0.04em;
  transition: color 0.2s;
}
.fp-back-link:hover { color: var(--gold); }

/* ── Success state (final step) ──────────────────────────── */
.fp-success-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(46,194,126,0.12);
  border: 1px solid rgba(46,194,126,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--green);
  margin-bottom: 24px;
}

/* ── Error state (invalid token) ─────────────────────────── */
.fp-error-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(224,90,90,0.1);
  border: 1px solid rgba(224,90,90,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--red);
  margin-bottom: 24px;
}

/* ── Footer ──────────────────────────────────────────────── */
.fp-page-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 20px 48px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.fp-footer-logo {
  font-family: var(--font-d);
  font-size: 16px; font-weight: 300;
  color: var(--muted);
}
.fp-footer-logo span { color: var(--gold-dim); }
.fp-footer-note {
  font-size: 11px; color: var(--muted); opacity: 0.4;
}

/* ── Shake animation on wrong OTP ────────────────────────── */
@keyframes fpShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.fp-shake { animation: fpShake 0.4s ease; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .fp-nav    { padding: 0 20px; }
  .fp-card   { padding: 36px 24px; }
  .fp-title  { font-size: 28px; }
  .fp-page-footer { padding: 16px 20px; flex-direction: column; gap: 6px; text-align: center; }
}
