/* ══════════════════════════════════════
   forgot_password.css
   ต่อขยายจาก auth.css (split layout)
   ไม่ override class หลัก — เพิ่มเฉพาะ
   fp-* classes ใหม่เท่านั้น
══════════════════════════════════════ */

/* ── Step bar (above form) ── */
.fp-steps-bar {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}

.fp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.fp-step__dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--dark-3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s;
}

.fp-step span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .3s;
}

.fp-step--active .fp-step__dot {
  background: var(--red-dim);
  border-color: var(--border-red);
  color: var(--red);
  box-shadow: 0 0 14px rgba(232,0,26,.28);
}
.fp-step--active span { color: var(--red); }

.fp-step--done .fp-step__dot {
  background: rgba(34,197,94,.08);
  border-color: rgba(34,197,94,.35);
  color: #22c55e;
}
.fp-step--done span { color: #22c55e; }

.fp-step__line {
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 28px;
  margin-bottom: 18px;
  transition: background .3s;
}
.fp-step__line--done { background: rgba(34,197,94,.35); }

/* ── Panels ── */
.fp-panel {
  animation: fpIn .28s cubic-bezier(.4,0,.2,1) both;
}
@keyframes fpIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fp-panel--hidden { display: none !important; }

/* ── OTP boxes ── */
.fp-otp-group {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  width: fit-content;
}

.fp-otp-box {
  width: 52px;
  height: 56px;
  flex: 0 0 52px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: 0;
  color: #fff;
  font-family: 'Kanit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  outline: none;
  caret-color: var(--red);
  clip-path: polygon(5px 0%, 100% 0%, calc(100% - 5px) 100%, 0% 100%);
  transition: border-color .2s, box-shadow .2s, background .2s, transform .15s;
}
.fp-otp-box:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232,0,26,.12);
  background: rgba(232,0,26,.04);
  transform: translateY(-2px);
}
.fp-otp-box.filled {
  border-color: rgba(232,0,26,.45);
  color: var(--red);
  background: rgba(232,0,26,.04);
}
.fp-otp-box.otp-err {
  border-color: var(--red) !important;
  background: rgba(232,0,26,.08) !important;
  animation: shake .3s;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-4px); }
  40%,80%  { transform: translateX(4px); }
}

/* ── PW rules ── */
.fp-pw-rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -4px;
}
.fp-pw-rule {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  transition: color .2s;
}
.fp-pw-rule i { font-size: 11px; color: var(--muted); transition: color .2s; }
.fp-pw-rule.pass { color: var(--text); }
.fp-pw-rule.pass i { color: #22c55e; }

/* ── Field error ── */
.fp-field-err {
  font-size: 11px;
  color: #ff4d5e;
  min-height: 16px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.fp-field-err:not(:empty)::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #ff4d5e;
  flex-shrink: 0;
}

/* ── Countdown ── */
.fp-countdown {
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

/* ── Resend / link button ── */
.fp-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
  padding: 4px 0;
}
.fp-link-btn:hover:not(:disabled) { color: var(--text); }
.fp-link-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Green button variant ── */
.fp-btn--green {
  background: #22c55e !important;
}
.fp-btn--green:hover {
  background: #16a34a !important;
  box-shadow: 0 0 28px rgba(34,197,94,.4) !important;
}

/* ── Success title ── */
.fp-title--green { color: #22c55e; }
.auth-form-header h2.fp-title--green::after { background: #22c55e; box-shadow: 0 0 10px rgba(34,197,94,.4); }

/* ── Left panel step list ── */
.fp-left-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fp-ls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  transition: border-color .3s, background .3s;
}
.fp-ls--active {
  border-color: var(--border-red) !important;
  background: var(--red-dim) !important;
}
.fp-ls__num {
  font-size: 18px;
  font-weight: 900;
  color: var(--muted);
  min-width: 28px;
  letter-spacing: .04em;
  transition: color .3s;
}
.fp-ls--active .fp-ls__num { color: var(--red); }
.fp-ls__title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.fp-ls__sub   { font-size: 11px; color: #707070; font-weight: 300; }

/* สไตล์พื้นฐานของข้อความแจ้งเตือน */
.fp-match-msg {
    font-size: 13px;
    margin-top: 5px;
    transition: all 0.3s ease;
    min-height: 18px;
}

/* เมื่อรหัสผ่านตรงกัน (สีเขียว) */
.fp-match-msg.ok {
    color: #22c55e !important; /* สีเขียวสด */
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

/* เมื่อรหัสผ่านไม่ตรงกัน (สีแดง) */
.fp-match-msg.err {
    color: #e8001a !important; /* สีแดงสไตล์ WarZ */
    text-shadow: 0 0 8px rgba(232, 0, 26, 0.3);
}