/**
 * ====================================================================
 * Rapid Extreme - Forgot Password / Account Recovery Stylesheet
 * Matching Figma Nodes:
 * - 48:12044 (Forgot Password - Empty / Input Step)
 * - 48:12168 (Forgot Password - Check Your Email / Next Step)
 * ====================================================================
 */

:root {
  --auth-bg-page: #101310;
  --auth-bg-card: #151916;
  --auth-bg-input: #101310;
  --auth-border-subtle: #262b27;
  --auth-border-input: #2e332f;
  --auth-border-footer: #222722;
  --auth-border-focus: #c6ff00;
  --auth-accent-lime: #c6ff00;
  --auth-accent-lime-hover: #d4ff33;
  --auth-accent-cyan: #29dce8;
  --auth-text-white: #f4f3ee;
  --auth-text-dim: #a3a8a2;
  --auth-text-placeholder: #757575;
  --auth-font-body: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --auth-font-display: 'Barlow Condensed', 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ====================================================================
   Page Layout
   ==================================================================== */
body.forgot-page {
  background-color: var(--auth-bg-page);
  color: var(--auth-text-white);
  font-family: var(--auth-font-body);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.forgot-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  position: relative;
  background-color: var(--auth-bg-page);
}

/* ====================================================================
   Header (Figma Nodes 48:12046 & 48:12170)
   ==================================================================== */
.forgot-header {
  height: 96px;
  background-color: var(--auth-bg-page);
  border-bottom: 1px solid var(--auth-border-subtle);
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  z-index: 50;
  flex-shrink: 0;
}

.forgot-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.forgot-header__brand:hover {
  opacity: 0.9;
}

.forgot-header__logo {
  height: 40px;
  width: auto;
  display: block;
}

.forgot-header__nav {
  display: flex;
  align-items: center;
  gap: 44px;
}

.forgot-header__nav-list {
  display: flex;
  align-items: center;
  gap: 44px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.forgot-header__nav-link {
  font-family: var(--auth-font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--auth-text-white);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
  position: relative;
  padding-bottom: 4px;
}

.forgot-header__nav-link:hover,
.forgot-header__nav-link:focus-visible {
  color: var(--auth-accent-lime);
}

.forgot-header__nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--auth-accent-lime);
  transition: width 0.25s ease;
}

.forgot-header__nav-link:hover::after {
  width: 100%;
}

.forgot-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 200px;
}

.forgot-header__back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--auth-font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--auth-text-white);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.forgot-header__back-link:hover,
.forgot-header__back-link:focus-visible {
  color: var(--auth-accent-lime);
  transform: translateX(-3px);
}

.forgot-header__back-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.forgot-header__back-link:hover .forgot-header__back-icon {
  transform: translateX(-2px);
}

/* ====================================================================
   Main Center Viewport (Nodes 48:12131 & 48:12255)
   ==================================================================== */
.forgot-main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 64px;
  width: 100%;
  position: relative;
  z-index: 10;
}

/* Card Container (Nodes 48:12132 & 48:12256) */
.forgot-card {
  width: 560px;
  max-width: 100%;
  background-color: var(--auth-bg-card);
  border: 1px solid var(--auth-border-subtle);
  padding: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle corner accent bracket */
.forgot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 2px;
  background-color: var(--auth-accent-lime);
  opacity: 0.8;
}

/* ====================================================================
   Step 1: Empty / Input State (Node 48:12044)
   ==================================================================== */
.forgot-step {
  display: none;
  flex-direction: column;
  gap: 21px;
  width: 100%;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.forgot-step--active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.forgot-card__eyebrow {
  font-family: var(--auth-font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--auth-text-dim);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.forgot-card__eyebrow-dot {
  width: 6px;
  height: 6px;
  background-color: var(--auth-accent-lime);
  display: inline-block;
  border-radius: 50%;
}

.forgot-card__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.forgot-card__heading {
  font-family: var(--auth-font-display);
  font-weight: 800;
  font-size: 44px;
  line-height: 40.48px;
  letter-spacing: 0.22px;
  text-transform: uppercase;
  color: var(--auth-text-white);
  margin: 0;
}

.forgot-card__heading--center {
  text-align: center;
}

.forgot-card__desc {
  font-family: var(--auth-font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 24px;
  color: var(--auth-text-dim);
  margin: 0;
}

.forgot-card__desc--center {
  text-align: center;
}

.forgot-target-email {
  color: var(--auth-text-white);
  font-weight: 600;
  word-break: break-all;
}

/* Form Styles */
.forgot-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.forgot-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.forgot-field__label {
  font-family: var(--auth-font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--auth-text-dim);
}

.forgot-input-wrap {
  width: 100%;
  position: relative;
}

.forgot-input {
  width: 100%;
  height: 52px;
  background-color: var(--auth-bg-input);
  border: 1px solid var(--auth-border-input);
  padding: 14px 16px;
  font-family: var(--auth-font-body);
  font-weight: 400;
  font-size: 16px;
  color: var(--auth-text-white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  border-radius: 0;
}

.forgot-input::placeholder {
  color: var(--auth-text-placeholder);
  opacity: 1;
}

.forgot-input:hover {
  border-color: #3e453f;
}

.forgot-input:focus,
.forgot-input.is-focused {
  border-color: var(--auth-accent-lime);
  background-color: #121612;
  box-shadow: 0 0 0 1px rgba(198, 255, 0, 0.25);
}

.forgot-input.is-invalid {
  border-color: #ff4757;
  box-shadow: 0 0 0 1px rgba(255, 71, 87, 0.25);
}

/* Submit & Action Button */
.forgot-submit-btn,
.woocommerce .forgot-submit-btn,
.woocommerce-page .forgot-submit-btn,
button.forgot-submit-btn,
input[type="submit"].forgot-submit-btn {
  height: 56px !important;
  width: 100% !important;
  background-color: var(--auth-accent-lime, #c6ff00) !important;
  background: var(--auth-accent-lime, #c6ff00) !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  font-family: var(--auth-font-body) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #101310 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
  user-select: none !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.forgot-submit-btn:hover,
.woocommerce .forgot-submit-btn:hover,
.woocommerce-page .forgot-submit-btn:hover {
  background-color: var(--auth-accent-lime-hover, #d4ff33) !important;
  background: var(--auth-accent-lime-hover, #d4ff33) !important;
  color: #101310 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(198, 255, 0, 0.25) !important;
}

.forgot-submit-btn:active,
.woocommerce .forgot-submit-btn:active,
.woocommerce-page .forgot-submit-btn:active {
  transform: translateY(0) !important;
}

.forgot-submit-btn__arrow {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.forgot-submit-btn:hover .forgot-submit-btn__arrow {
  transform: translateX(3px);
}

/* Bottom Links Row (Node 48:12151) */
.forgot-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
  flex-wrap: wrap;
}

.forgot-back-link {
  font-family: var(--auth-font-body);
  font-weight: 700;
  font-size: 13px;
  color: var(--auth-accent-lime);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.forgot-back-link:hover,
.forgot-back-link:focus-visible {
  color: var(--auth-accent-lime-hover);
  text-decoration: underline;
}

.forgot-otp-info {
  font-family: var(--auth-font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--auth-text-dim);
}

.forgot-otp-link {
  font-family: var(--auth-font-body);
  font-weight: 600;
  color: var(--auth-text-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-otp-link:hover,
.forgot-otp-link:focus-visible {
  color: var(--auth-accent-lime);
  text-decoration: underline;
}

/* ====================================================================
   Step 2: Check Email / Sent State (Node 48:12168)
   ==================================================================== */
.forgot-step-sent {
  align-items: center;
  text-align: center;
}

.forgot-mail-icon-wrap {
  width: 83px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  animation: mailPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes mailPopIn {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.forgot-mail-svg {
  width: 83px;
  height: 60px;
  display: block;
  filter: drop-shadow(0 0 12px rgba(198, 255, 0, 0.3));
}

.forgot-sent-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Resend Action in Sent State */
.forgot-resend-wrap {
  margin-top: -6px;
  font-family: var(--auth-font-body);
  font-size: 13px;
  color: var(--auth-text-dim);
}

.forgot-resend-btn {
  background: none;
  border: none;
  color: var(--auth-text-white);
  font-family: var(--auth-font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.forgot-resend-btn:hover {
  color: var(--auth-accent-lime);
}

/* ====================================================================
   Footer (Figma Nodes 48:12156 & 48:12275)
   ==================================================================== */
.forgot-footer {
  height: 72px;
  background-color: var(--auth-bg-page);
  border-top: 1px solid var(--auth-border-footer);
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  z-index: 50;
  flex-shrink: 0;
}

.forgot-footer__copyright {
  font-family: var(--auth-font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--auth-text-white);
  margin: 0;
}

.forgot-footer__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.forgot-footer__link {
  font-family: var(--auth-font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--auth-text-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-footer__link:hover,
.forgot-footer__link:focus-visible {
  color: var(--auth-accent-lime);
}

/* ====================================================================
   Interactive State Switcher Badge (Empty vs Next Step)
   Matches the style from signin.html for live Figma verification
   ==================================================================== */
.auth-state-switcher {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1000;
  background-color: rgba(16, 19, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2e332f;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.auth-state-switcher__label {
  font-family: var(--auth-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--auth-text-dim);
  margin-right: 4px;
}

.auth-state-btn {
  background: transparent;
  border: 1px solid #2e332f;
  color: var(--auth-text-white);
  font-family: var(--auth-font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-state-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #4a524c;
}

.auth-state-btn--active {
  background-color: var(--auth-accent-lime);
  color: #101310;
  border-color: var(--auth-accent-lime);
}

.auth-state-btn--active:hover {
  background-color: var(--auth-accent-lime-hover);
  border-color: var(--auth-accent-lime-hover);
}

/* ====================================================================
   Toast Notification Element
   ==================================================================== */
.auth-toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background-color: #1a1e1b;
  border: 1px solid var(--auth-border-subtle);
  border-left: 4px solid var(--auth-accent-lime);
  color: var(--auth-text-white);
  padding: 14px 20px;
  border-radius: 4px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  z-index: 2000;
  transform: translateY(60px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s;
  pointer-events: none;
  max-width: 360px;
}

.auth-toast--visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.auth-toast__text {
  font-family: var(--auth-font-body);
  font-size: 14px;
  margin: 0;
  line-height: 1.4;
}

/* ====================================================================
   Responsive Styles
   ==================================================================== */
@media (max-width: 1024px) {
  .forgot-header {
    padding: 0 32px;
  }
  .forgot-footer {
    padding: 0 32px;
  }
  .forgot-main {
    padding: 40px 32px;
  }
}

@media (max-width: 768px) {
  .forgot-header {
    padding: 0 20px;
    height: 80px;
  }
  .forgot-header__nav {
    display: none;
  }
  .forgot-header__logo {
    height: 32px;
  }
  .forgot-main {
    padding: 32px 16px;
  }
  .forgot-card {
    padding: 32px 20px;
  }
  .forgot-card__heading {
    font-size: 34px;
    line-height: 34px;
  }
  .forgot-footer {
    height: auto;
    padding: 24px 20px;
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .forgot-footer__nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  .forgot-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .auth-state-switcher {
    bottom: 12px;
    left: 12px;
    padding: 6px 10px;
  }
}

/* ====================================================================
   WooCommerce Integration & Reset Password Enhancements
   ==================================================================== */
body.woocommerce-lost-password .site-main,
body.woocommerce-account .site-main:has(.forgot-wrapper) {
  padding: 40px 16px !important;
  max-width: 100% !important;
}

body.woocommerce-lost-password .tactical-page-entry > .entry-header,
body.woocommerce-account .tactical-page-entry:has(.forgot-wrapper) > .entry-header {
  display: none !important;
}

body.woocommerce-lost-password .entry-content,
body.woocommerce-account .entry-content:has(.forgot-wrapper) {
  width: 100% !important;
}

body.woocommerce-lost-password .forgot-wrapper {
  min-height: auto;
  padding: 40px 0;
}

/* Input Password Visibility Toggle */
.auth-input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--auth-text-dim);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  border-radius: 4px;
  z-index: 5;
}

.auth-input-toggle:hover {
  color: var(--auth-accent-lime);
}

.auth-input-toggle svg {
  width: 18px;
  height: 18px;
}

/* Password Strength Meter Integration */
.woocommerce-password-strength {
  margin-top: 10px;
  padding: 8px 12px;
  font-family: var(--auth-font-body);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  background-color: #101310;
  border: 1px solid var(--auth-border-input);
}

.woocommerce-password-strength.short,
.woocommerce-password-strength.bad {
  color: #ff4757;
  border-color: rgba(255, 71, 87, 0.4);
}

.woocommerce-password-strength.good {
  color: #ffd32a;
  border-color: rgba(255, 211, 42, 0.4);
}

.woocommerce-password-strength.strong {
  color: var(--auth-accent-lime);
  border-color: rgba(198, 255, 0, 0.4);
}

.woocommerce-password-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--auth-text-dim);
  line-height: 1.4;
}
