/* =================== Lead Overlay — Register Modal Theme (FINAL) =================== */
/* RG2 palette (scoped to #leadOverlay only) */
#leadOverlay {
  --rg2-bg: #020b0f;
  --rg2-card: #051b1f;
  --rg2-card-2: #07242b;
  --rg2-text: #eaf7ff;
  --rg2-muted: #97b6c3;
  --rg2-border: rgba(255, 255, 255, 0.14);
  --rg2-focus: #38bdf8;
  --rg2-good: #22c55e;
  --rg2-bad: #ef4444;
  --rg2-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  --rg2-radius: 18px;
  --rg2-radius-lg: 22px;
  --rg2-font: "DM Sans", "Inter", system-ui, -apple-system, Segoe UI, Roboto,
    Arial, sans-serif;
}

/* ---------- Overlay ---------- */
#leadOverlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  font-family: var(--rg2-font);
}
#leadOverlay.is-open[aria-hidden="false"] {
  display: flex;
}

/* ---------- Card ---------- */
#leadOverlay .modal-shell {
  position: relative;
  width: min(620px, 94vw);
  color: var(--rg2-text);
  background: linear-gradient(
    160deg,
    var(--rg2-card) 0%,
    var(--rg2-card-2) 100%
  );
  border: 1px solid var(--rg2-border);
  border-radius: var(--rg2-radius-lg);
  box-shadow: var(--rg2-shadow);
  padding: 22px 22px 26px;
  overflow: hidden;
  isolation: isolate;
}

/* ---------- Close ---------- */
#leadOverlay .modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  color: #9fd3e2;
  background: #0a2a30;
  border: 1px solid var(--rg2-border);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
#leadOverlay .modal-close:hover {
  background: #0d3640;
  color: #c8f3ff;
  transform: scale(1.06);
}

/* ---------- Header ---------- */
#leadOverlay .lead-head {
  padding-top: 6px;
  text-align: center; /* ← changed from left */
}
#leadOverlay .lead-head h2 {
  margin: 0 0 10px;
  font: 800 24px/1.25 var(--rg2-font);
  letter-spacing: 0.2px;
}
#leadOverlay .lead-sub {
  margin: 10px 0 12px;
  color: #cde9f5;
  font-size: 14px;
  text-align: center; /* ← changed from left */
}
#leadOverlay .lead-underline {
  height: 2px;
  width: 96%;
  margin: 12px auto 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    #00e0ff55 20%,
    #00e0ff,
    #00e0ff55 80%,
    transparent
  );
}

/* ---------- Fields ---------- */
#leadOverlay .lead-label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
  font-size: 14px;
  color: #dfe9ff;
}
#leadOverlay .lead-field {
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 14px;
  padding: 0;
}
#leadOverlay .lead-field input,
#leadOverlay .lead-field select {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  background: #fff;
  color: #0a0f12;
  border: 1px solid var(--rg2-border);
  border-radius: 14px;
  outline: 0;
  font: 600 15px/1 var(--rg2-font);
  transition: box-shadow 0.15s ease, border-color 0.15s ease,
    transform 0.04s ease;
}
#leadOverlay .lead-field input::placeholder {
  color: #445260;
  font-weight: 500;
}
#leadOverlay .lead-field:focus-within input,
#leadOverlay .lead-field:focus-within select {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
  border-color: #7dd3fc;
}

/* Layout */
#leadOverlay .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* intl-tel-input */
#leadOverlay .iti {
  width: 100%;
}
#leadOverlay .iti__selected-flag {
  height: 52px;
  padding: 0 10px;
}
#leadOverlay #mobile {
  height: 52px;
}

/* ---------- OTP ---------- */
#leadOverlay .otp-wrap {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}
#leadOverlay .otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
#leadOverlay .otp-grid input {
  width: 50px;
  height: 54px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  background: #fff;
  color: #0a0f12;
  border: 1px solid var(--rg2-border);
  border-radius: 14px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
#leadOverlay .otp-grid input:focus {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
  border-color: #7dd3fc;
}

/* ---------- Error ---------- */
#leadOverlay .lead-err {
  margin-top: 10px;
  color: var(--rg2-bad);
  font-size: 13px;
}

/* ---------- reCAPTCHA ---------- */
#recaptcha-container {
  margin-top: 10px;
}

/* ---------- Submit (Uiverse style restored) ---------- */
#leadOverlay .cssbuttons-io-button {
  background: #a370f0 !important;
  color: #fff !important;
  font: 500 17px/1 inherit;
  border: none;
  border-radius: 999px;
  height: 48px;
  min-width: 180px;
  padding: 0 3.2em 0 1.4em;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  box-shadow: 0 12px 30px rgba(167, 112, 240, 0.18),
    inset 0 0 1.6em -0.6em #714da6;
  position: relative;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
#leadOverlay .cssbuttons-io-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(167, 112, 240, 0.24),
    inset 0 0 1.6em -0.6em #714da6;
}
#leadOverlay .cssbuttons-io-button .icon {
  position: absolute;
  right: 0.35em;
  width: 2.2em;
  height: 2.2em;
  border-radius: 0.9em;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.1em 0.6em 0.2em #7b52b9;
  transition: all 0.3s;
}
#leadOverlay .cssbuttons-io-button:hover .icon {
  width: calc(100% - 0.7em);
}
#leadOverlay .cssbuttons-io-button .icon svg {
  width: 1.1em;
  color: #7b52b9;
  transition: transform 0.3s;
}
#leadOverlay .cssbuttons-io-button:hover .icon svg {
  transform: translateX(0.1em);
}

/* Actions wrapper */
#leadOverlay .lead-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Duplicate Overlay ---------- */
.dup-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1100;
  backdrop-filter: blur(6px);
}
.dup-overlay.is-open {
  display: flex;
}
.dup-card {
  width: min(520px, 94vw);
  background: linear-gradient(
    160deg,
    var(--rg2-card) 0%,
    var(--rg2-card-2) 100%
  );
  color: var(--rg2-text);
  border: 1px solid var(--rg2-border);
  border-radius: 20px;
  box-shadow: var(--rg2-shadow);
  padding: 24px 22px;
  position: relative;
  text-align: center;
}
.dup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: #0a2a30;
  border: 1px solid var(--rg2-border);
  color: #9fd3e2;
  font-size: 22px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.dup-title {
  margin: 2px 0 6px;
  font: 700 22px/1.3 var(--rg2-font);
}
.dup-sub {
  margin: 0 0 12px;
  color: var(--rg2-muted);
  font-size: 14px;
}
.dup-app {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px dashed var(--rg2-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.dup-app .lbl {
  color: var(--rg2-muted);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.dup-app .val {
  font-size: 18px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rg2-border);
}
.dup-note {
  color: var(--rg2-muted);
  font-size: 13px;
  margin: 6px 0 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  #leadOverlay .modal-shell {
    border-radius: 20px;
  }
  #leadOverlay .grid-2 {
    grid-template-columns: 1fr;
  }
  #leadOverlay .otp-grid {
    grid-template-columns: repeat(6, minmax(32px, 1fr));
    gap: 8px;
  }
  #leadOverlay .otp-grid input {
    width: 42px;
    height: 50px;
  }
}

/* Already Submitted Duplicate Modal Css */

:root {
  --dup-bg: rgba(2, 10, 18, 0.72);
  --dup-card: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  --dup-ink: #eaf7ff;
  --dup-muted: #9fb2d7;
  --dup-ring: rgba(16, 185, 129, 0.35);
  --dup-radius: 18px;

  /* brand accents (same as Thank You page) */
  --btn-green: #10b981;
  --btn-ink: #032018;

  /* name/accent colors */
  --dup-label: #ffd700; /* yellow for labels */
  --dup-value: #ff4da6; /* pink for values */
}

/* overlay */
.dup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: radial-gradient(
    1200px 700px at 50% -200px,
    rgba(8, 24, 38, 0.85) 0,
    rgba(5, 16, 26, 0.85) 60%,
    rgba(4, 12, 20, 0.9) 100%
  );
  backdrop-filter: blur(2px);
}
.dup-overlay[hidden] {
  display: none !important;
}

/* card */
.dup-card {
  width: min(560px, 92vw);
  background: var(--dup-card);
  color: var(--dup-ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--dup-radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  padding: clamp(18px, 3vw, 28px);
  position: relative;
  transform: translateY(8px);
  opacity: 0;
}
.dup-overlay.is-open .dup-card.anim-in {
  animation: dupIn 0.18s ease-out forwards;
}
.dup-card.anim-out {
  animation: dupOut 0.15s ease-in forwards;
}
@keyframes dupIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes dupOut {
  to {
    transform: translateY(8px);
    opacity: 0;
  }
}

/* close */
.dup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--dup-ink);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 18px;
  line-height: 30px;
  cursor: pointer;
}

/* titles */
.dup-title {
  margin: 6px 0 4px;
  font-size: clamp(20px, 2.2vw, 24px);
  text-align: center;
  font-weight: 800;
}
.dup-name {
  color: var(--dup-value);
  font-weight: 900;
} /* pink value */
.dup-sub {
  margin: 0 0 12px;
  color: var(--dup-muted);
  text-align: center;
}

/* app no box */
.dup-app {
  margin: 10px auto 16px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 8px;
  justify-items: center;
}
.dup-app .lbl {
  color: var(--dup-label); /* yellow label */
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.dup-app .val {
  color: var(--dup-value); /* pink value */
  border: 1px solid rgba(255, 77, 166, 0.35);
  background: rgba(255, 77, 166, 0.06);
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

/* note */
.dup-note {
  color: var(--dup-muted);
  text-align: center;
  margin: 0 0 12px;
  font-size: 14px;
}

/* WhatsApp button – same look as Thank You page */
.dup-wa-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  background: var(--btn-green);
  color: var(--btn-ink);
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 18px var(--dup-ring, var(--dup-ring)),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
  width: max(220px, 60%); /* nice width */
  margin: 0 auto;
}
.dup-wa-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.dup-wa-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}
