/* ============================================================
   Webix modern popup  (webix-popup.css)
   Self-contained — all classes prefixed with wxp-
   ============================================================ */

.wxp-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 8, 12, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.32s ease;
  font-family: "DM Sans", sans-serif;
}

.wxp-overlay.wxp-open { opacity: 1; }

.wxp-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  border-radius: 26px;
  padding: 2px; /* gradient border */
  background: linear-gradient(135deg, #d6fd70 0%, #7dd956 40%, #1c2b1a 75%, #d6fd70 100%);
  background-size: 220% 220%;
  animation: wxp-border-pan 5s ease infinite;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(214, 253, 112, 0.12);
  transform: translateY(26px) scale(0.94);
  transition: transform 0.42s cubic-bezier(0.22, 1.4, 0.36, 1);
  overflow: hidden;
}

.wxp-overlay.wxp-open .wxp-card { transform: translateY(0) scale(1); }

@keyframes wxp-border-pan {
  0%, 100% { background-position: 0% 20%; }
  50% { background-position: 100% 80%; }
}

.wxp-card.wxp-error {
  background: linear-gradient(135deg, #d6fd70 0%, #7dd956 40%, #1c2b1a 75%, #d6fd70 100%);
  background-size: 220% 220%;
}

.wxp-inner {
  position: relative;
  border-radius: 24px;
  background: radial-gradient(120% 90% at 50% 0%, #171a20 0%, #0b0d12 55%, #07080c 100%);
  padding: 44px 36px 30px;
  text-align: center;
  overflow: hidden;
}

/* soft glow orbs */
.wxp-inner::before,
.wxp-inner::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
}
.wxp-inner::before { background: #d6fd70; top: -90px; left: -70px; opacity: 0.16; }
.wxp-inner::after { background: #0d6efd; bottom: -110px; right: -70px; opacity: 0.14; }
.wxp-card.wxp-error .wxp-inner::before { background: #d6fd70; opacity: 0.16; }

.wxp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.wxp-close:hover { background: rgba(255, 255, 255, 0.16); transform: rotate(90deg); }

/* animated check / cross badge */
.wxp-badge { position: relative; z-index: 2; width: 96px; height: 96px; margin: 0 auto 22px; }

.wxp-badge svg { width: 96px; height: 96px; overflow: visible; }

.wxp-ring {
  fill: none;
  stroke: #d6fd70;
  stroke-width: 3;
  stroke-dasharray: 290;
  stroke-dashoffset: 290;
  animation: wxp-draw 0.9s ease forwards;
  filter: drop-shadow(0 0 12px rgba(214, 253, 112, 0.45));
}
.wxp-card.wxp-error .wxp-ring { stroke: #d6fd70; filter: drop-shadow(0 0 12px rgba(214, 253, 112, 0.45)); }

.wxp-mark {
  fill: none;
  stroke: #d6fd70;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: wxp-draw 0.55s ease 0.55s forwards;
}
.wxp-card.wxp-error .wxp-mark { stroke: #d6fd70; }

@keyframes wxp-draw { to { stroke-dashoffset: 0; } }

.wxp-pop {
  transform-origin: center;
  animation: wxp-pop 0.5s cubic-bezier(0.22, 1.6, 0.36, 1) 0.15s backwards;
}
@keyframes wxp-pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.wxp-kicker {
  position: relative;
  z-index: 2;
  display: inline-block;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #d6fd70;
  margin-bottom: 12px;
}
.wxp-card.wxp-error .wxp-kicker { color: #d6fd70; }

.wxp-title {
  position: relative;
  z-index: 2;
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #ffffff;
  line-height: 1.1;
}

.wxp-text {
  position: relative;
  z-index: 2;
  margin: 0 0 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.wxp-email-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 100px;
  background: rgba(214, 253, 112, 0.1);
  border: 1px solid rgba(214, 253, 112, 0.3);
  color: #d6fd70;
  font-family: "DM Sans", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  max-width: 100%;
  word-break: break-all;
}
.wxp-email-pill svg { flex: 0 0 auto; }

.wxp-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
}
.wxp-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #d6fd70, #7dd956);
  transform-origin: left;
  animation: wxp-progress linear forwards;
}
.wxp-card.wxp-error .wxp-progress span { background: linear-gradient(90deg, #d6fd70, #7dd956); }
@keyframes wxp-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* confetti particles */
.wxp-confetti {
  position: absolute;
  top: 44px;
  left: 50%;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  animation: wxp-confetti 1.6s ease-out forwards;
}
@keyframes wxp-confetti {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--wx, 0), var(--wy, 140px)) rotate(var(--wr, 360deg)); opacity: 0; }
}

@media (max-width: 480px) {
  .wxp-inner { padding: 38px 26px 28px; }
  .wxp-title { font-size: 23px; }
}
