/* =============================================================================
   fxFundedSim — waitlist overlay styles
   Self-contained, framework-free. Loaded alongside the compiled site bundle.
   All selectors are `fxw-` prefixed so they never collide with the site.

   1-to-1 with the LIVE theme: the buttons REUSE the site's own global classes
   (`.btn-futuristic-filled` / `.btn-futuristic`) for their look, and the modal
   uses the site's global design tokens (`--background`, `--card`, `--border`,
   `--foreground`) + its fonts (Unbounded headings, Jura UI, Inter body) + the
   coral pair #ff8a8c / #ff4d4f. So our `fxw-*` rules set ONLY layout — the
   site's classes own every visual property (this also avoids cascade fights,
   since this sheet loads after the site sheet).
   ============================================================================= */

/* ---- Injected trigger button -------------------------------------------------
   Visuals come entirely from `.btn-futuristic-filled` (gradient coral, black
   uppercase Jura). We only add layout so it sits cleanly beside the site CTA. */
.fxw-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 0.6rem 0.6rem 0;
  vertical-align: middle;
}
.fxw-cta:focus-visible { outline: 2px solid #ff8a8c; outline-offset: 3px; }

/* ---- Overlay / backdrop --------------------------------------------------- */
.fxw-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  font-family: Inter, system-ui, sans-serif;
}
.fxw-overlay.fxw-open { opacity: 1; pointer-events: auto; }

/* ---- Dialog (site tokens) ------------------------------------------------- */
.fxw-dialog {
  position: relative;
  width: 100%;
  max-width: 452px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--card, oklch(12% 0.005 0));
  border: 1px solid #ff8a8c26; /* faint coral hairline — echoes .btn-futuristic */
  border-radius: var(--radius, 0.5rem);
  padding: 34px 32px 30px;
  color: var(--foreground, #fcf5e8);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.92), 0 0 60px -20px #ff8a8c1a;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.fxw-overlay.fxw-open .fxw-dialog { transform: translateY(0); opacity: 1; }

/* faint coral glow along the top edge — matches the site's coral accenting */
.fxw-dialog::before {
  content: '';
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 110px;
  border-radius: var(--radius, 0.5rem) var(--radius, 0.5rem) 0 0;
  background: radial-gradient(120% 100% at 50% 0%, #ff8a8c1f, transparent 70%);
  pointer-events: none;
}

.fxw-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius, 0.5rem) - 4px);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: transparent;
  color: var(--muted-foreground, #999);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.fxw-close:hover { color: #fcf5e8; border-color: #ff8a8c4d; background: #ff8a8c0d; }
.fxw-close:focus-visible { outline: 2px solid #ff8a8c; outline-offset: 2px; }

/* ---- Typography (site fonts) ---------------------------------------------- */
.fxw-eyebrow {
  font-family: Jura, sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ff8a8c;
  margin: 0 0 12px;
}
.fxw-title {
  font-family: Unbounded, sans-serif; /* = site .font-brand */
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.18;
  color: #fcf5e8;
  margin: 0 0 12px;
}
.fxw-sub {
  font-family: Inter, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted-foreground, #9a9a9a);
  margin: 0 0 22px;
}

/* ---- Form ----------------------------------------------------------------- */
.fxw-form { display: flex; flex-direction: column; gap: 14px; }
.fxw-field { display: flex; flex-direction: column; gap: 6px; }
.fxw-row { display: flex; gap: 12px; }
.fxw-row .fxw-field { flex: 1 1 0; min-width: 0; }

.fxw-label {
  font-family: Jura, sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cfc7ba;
}
.fxw-label span { color: var(--muted-foreground, #777); font-weight: 500; text-transform: none; letter-spacing: 0; }

.fxw-input,
.fxw-select {
  width: 100%;
  box-sizing: border-box;
  font-family: Inter, sans-serif;
  font-size: 0.95rem;
  color: #fcf5e8;
  background: var(--background, oklch(8% 0 0));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: calc(var(--radius, 0.5rem) - 2px);
  padding: 12px 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.fxw-input::placeholder { color: var(--muted-foreground, #6b6b6b); }
.fxw-input:focus,
.fxw-select:focus {
  outline: none;
  border-color: #ff8a8c;
  box-shadow: 0 0 0 3px #ff8a8c26; /* matches .btn-futuristic hover glow */
}
.fxw-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ff8a8c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}
.fxw-select option { background: oklch(12% 0.005 0); color: #fcf5e8; }

/* honeypot — off-screen, not display:none (bots skip those) */
.fxw-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Submit + Discord buttons get their LOOK from .btn-futuristic* — we add layout only. */
.fxw-submit { width: 100%; margin-top: 6px; cursor: pointer; }
.fxw-submit:disabled { cursor: not-allowed; opacity: 0.6; }
.fxw-submit:focus-visible { outline: 2px solid #ff8a8c; outline-offset: 3px; }

.fxw-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(0, 0, 0, 0.35);
  border-top-color: #000;
  border-radius: 50%;
  animation: fxw-spin 0.7s linear infinite;
}
@keyframes fxw-spin { to { transform: rotate(360deg); } }

.fxw-error {
  font-family: Jura, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #ff8a8c;
  margin: 2px 0 0;
  min-height: 1em;
}

.fxw-fineprint {
  font-family: Inter, sans-serif;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--muted-foreground, #6b6b6b);
  text-align: center;
  margin: 14px 0 0;
}

/* ---- Success state -------------------------------------------------------- */
.fxw-success { display: none; text-align: center; padding: 6px 0 2px; }
.fxw-dialog.fxw-done .fxw-form { display: none; }
.fxw-dialog.fxw-done .fxw-success { display: block; }

.fxw-success__mark {
  width: 54px;
  height: 54px;
  margin: 4px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ff8a8c1f;
  border: 1px solid #ff8a8c66;
  color: #ff8a8c;
  font-size: 24px;
}
.fxw-success__title {
  font-family: Unbounded, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fcf5e8;
  margin: 0 0 10px;
}
.fxw-success__sub {
  font-family: Inter, sans-serif;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--muted-foreground, #9a9a9a);
  margin: 0 0 22px;
}
.fxw-discord { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.fxw-discord:focus-visible { outline: 2px solid #ff8a8c; outline-offset: 3px; }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 520px) {
  .fxw-dialog { padding: 30px 22px 26px; }
  .fxw-title { font-size: 1.35rem; }
  .fxw-row { flex-direction: column; gap: 14px; }
}

/* ---- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .fxw-overlay, .fxw-dialog, .fxw-close { transition: none; }
  .fxw-dialog { transform: none; }
  .fxw-spinner { animation-duration: 1.4s; }
}
