/* ──────────────────────────────────────────────────
   WP Lead Popup — Premium Popup Styling
   Glassmorphism design, mobile-first
   v1.2 — High-end SaaS Aesthetics & POP-OUT Teaser
   ────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────── */
:root {
  --wlp-font: 'Montserrat', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --wlp-accent: #ffd700; /* Gold/yellow accent to match casino theme */
  --wlp-accent-hover: #ffc800;
  --wlp-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); /* Gold gradient for CTA buttons */
  --wlp-bg: #1b1e36; /* Dark navy card background matching screenshot */
  --wlp-text: #ffffff; /* White text */
  --wlp-text-muted: #94a3b8; /* Slate gray muted text */
  --wlp-border: #323854; /* Border matching casino card borders */
  --wlp-overlay: rgba(18, 21, 38, 0.85); /* Dark navy blur overlay */
  --wlp-shadow: 0 30px 80px rgba(10, 12, 22, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --wlp-radius: 16px;
  --wlp-success: #10b981;
  --wlp-error: #ef4444;
  --wlp-teaser-bg: #1b1e36; /* Dark navy card matching screenshot cards */
}

/* ── Overlay ───────────────────────────────────── */
.wlp-overlay {
  position: fixed;
  inset: 0;
  background: var(--wlp-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s ease;
}

.wlp-overlay.wlp-active {
  opacity: 1;
  visibility: visible;
}

/* ── Popup Container ───────────────────────────── */
.wlp-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  z-index: 999999;
  width: 92vw;
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--wlp-bg);
  border-radius: var(--wlp-radius);
  box-shadow: var(--wlp-shadow);
  border: 1px solid var(--wlp-border); /* Added native border */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.5s ease;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  font-family: var(--wlp-font);
}

.wlp-popup.wlp-active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.wlp-popup.wlp-no-image {
  grid-template-columns: 1fr;
  max-width: 480px;
}

/* ── Close Button ──────────────────────────────── */
.wlp-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); /* White transparency for dark theme */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  line-height: 1;
}

.wlp-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transform: rotate(90deg);
}

/* ── Image Side ────────────────────────────────── */
.wlp-image {
  position: relative;
  overflow: hidden;
  min-height: 380px;
}

.wlp-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.wlp-popup:hover .wlp-image img {
  transform: scale(1.03);
}

.wlp-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.25) 100%);
  pointer-events: none;
}

/* Desktop/Mobile image toggle */
.wlp-img-mobile {
  display: none !important;
}

/* ── Content Side ──────────────────────────────── */
.wlp-content {
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.wlp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.08) 0%, rgba(142, 45, 226, 0.08) 100%);
  color: var(--wlp-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  width: fit-content;
  margin-bottom: 2px;
  border: 1px solid rgba(108, 92, 231, 0.15);
}

.wlp-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--wlp-text);
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.8px;
}

.wlp-description {
  font-size: 14px;
  color: var(--wlp-text-muted);
  line-height: 1.6;
  margin: 0 0 10px 0;
}

/* ── Form ──────────────────────────────────────── */
.wlp-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wlp-field {
  position: relative;
}

.wlp-field input,
.wlp-field textarea {
  width: 100% !important;
  padding: 14px 16px 14px 44px !important; /* Forces enough left padding for the icon */
  border: 1.5px solid #323854 !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  color: #ffffff !important;
  background: #121526 !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  box-sizing: border-box !important;
}

.wlp-field textarea {
  resize: vertical !important;
  min-height: 80px !important;
  padding-top: 14px !important;
}

.wlp-field input:hover,
.wlp-field textarea:hover {
  border-color: #4b537d !important;
  background: #16192d !important;
}

.wlp-field input:focus,
.wlp-field textarea:focus {
  border-color: var(--wlp-accent) !important; /* Gold */
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15) !important;
  background: #121526 !important;
}

.wlp-field input.wlp-invalid,
.wlp-field textarea.wlp-invalid {
  border-color: var(--wlp-error) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12) !important;
  background: #1c121b !important;
}

.wlp-field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #94a3b8;
  pointer-events: none;
  line-height: 1;
  transition: color 0.3s;
}

.wlp-field input:focus ~ .wlp-field-icon,
.wlp-field textarea:focus ~ .wlp-field-icon {
  color: var(--wlp-accent);
}

.wlp-field textarea ~ .wlp-field-icon {
  top: 18px;
  transform: none;
}

/* ── Consent Checkbox ──────────────────────────── */
.wlp-consent {
  margin: 6px 0 4px;
}

.wlp-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--wlp-text-muted);
}

.wlp-consent-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wlp-consent-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1.5px solid #323854;
  border-radius: 7px;
  background: #121526;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  margin-top: 1px;
}

.wlp-consent-check::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: solid #121526; /* Dark checkmark on gold background */
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: -2px;
}

.wlp-consent-checkbox:checked + .wlp-consent-check {
  background: var(--wlp-accent);
  border-color: var(--wlp-accent);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.25);
}

.wlp-consent-checkbox:checked + .wlp-consent-check::after {
  transform: rotate(45deg) scale(1);
}

.wlp-consent-check.wlp-invalid {
  border-color: var(--wlp-error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.wlp-consent-text {
  flex: 1;
}

.wlp-consent-text a,
.wlp-modal-link {
  color: var(--wlp-accent);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.wlp-consent-text a:hover,
.wlp-modal-link:hover {
  color: var(--wlp-accent-hover);
}

/* ── Submit Button ─────────────────────────────── */
.wlp-submit {
  width: 100%;
  padding: 15px 20px;
  background: var(--wlp-gradient);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
  margin-top: 6px;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.wlp-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(108, 92, 231, 0.45);
}

.wlp-submit:active {
  transform: translateY(0);
}

.wlp-submit.wlp-loading {
  pointer-events: none;
  opacity: 0.8;
}

.wlp-submit.wlp-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wlp-spin 0.6s linear infinite;
}

@keyframes wlp-spin {
  to { transform: rotate(360deg); }
}

/* ── Success State ─────────────────────────────── */
.wlp-success {
  display: none;
  text-align: center;
  padding: 40px 32px;
  animation: wlp-fadeIn 0.5s ease;
}

.wlp-success.wlp-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.wlp-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  animation: wlp-bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wlp-success-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--wlp-text);
  margin: 0;
}

.wlp-success-text {
  font-size: 14px;
  color: var(--wlp-text-muted);
  margin: 0;
  line-height: 1.5;
}

@keyframes wlp-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wlp-bounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ── Teaser Bar (Centered Floating Card Style) ── */
.wlp-teaser {
  position: fixed;
  bottom: 24px; /* Floating above the screen bottom */
  left: 50%;
  transform: translate(-50%, 150%);
  width: 90vw;
  max-width: 480px; /* Made narrower horizontally */
  height: auto;
  z-index: 999997;
  display: flex;
  align-items: flex-end; /* Align elements to the bottom so image sits on baseline */
  overflow: visible;
  font-family: var(--wlp-font);
  background: transparent; /* Container is transparent, the card is orange */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none; /* Let clicks pass through container gaps */
}

.wlp-teaser.wlp-active {
  transform: translate(-50%, 0);
}

/* Orange Card */
.wlp-teaser-card {
  pointer-events: auto;
  flex: 1;
  background: linear-gradient(135deg, #1b1e36 0%, #252a48 100%);
  border-radius: 12px;
  padding: 18px 120px 18px 22px;
  position: relative;
  border: 1.5px solid rgba(255, 165, 0, 0.4);
  cursor: pointer;
  box-sizing: border-box;
  box-shadow:
    0 0 20px rgba(255, 165, 0, 0.15),
    0 0 60px rgba(255, 165, 0, 0.08),
    0 10px 30px rgba(15, 23, 42, 0.3);
  animation: wlp-teaser-glow 2s ease-in-out infinite alternate;
}

@keyframes wlp-teaser-glow {
  0%   { box-shadow: 0 0 20px rgba(255,165,0,0.15), 0 0 60px rgba(255,165,0,0.08), 0 10px 30px rgba(15,23,42,0.3); }
  100% { box-shadow: 0 0 25px rgba(255,165,0,0.25), 0 0 80px rgba(255,165,0,0.12), 0 10px 30px rgba(15,23,42,0.3); }
}

.wlp-teaser-card:hover {
  filter: brightness(1.08);
  border-color: rgba(255, 165, 0, 0.7);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* Teaser content */
.wlp-teaser-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wlp-teaser-title {
  font-size: 19px; /* Slightly smaller to fit compact card */
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  text-align: left;
  letter-spacing: -0.4px;
}

.wlp-teaser-desc {
  font-size: 13px; /* Slightly smaller description scale */
  font-weight: 500;
  line-height: 1.4;
  color: #ffffff;
  text-align: left;
}

.wlp-teaser-text {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  text-align: left;
}

/* Teaser image (aligned to the right side of the card, popping out) */
.wlp-teaser-image {
  pointer-events: none; /* Avoid blocking clicks */
  position: absolute;
  bottom: 0;
  right: 12px;
  width: 130px;
  height: 130px; /* Scaled down image to match thinner card */
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}

.wlp-teaser-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.18));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom center;
}

.wlp-teaser:hover .wlp-teaser-image img {
  transform: scale(1.04) translateY(-3px);
}

/* Close button - now on the top-left of the orange card */
.wlp-teaser-close {
  position: absolute;
  top: -12px; /* Adjusted to sit centered over new card height */
  left: -12px;
  right: auto;
  background: #374151; /* Dark charcoal */
  border: 2px solid #ffffff; /* Thick white border like the screenshot */
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
  line-height: 1;
}

.wlp-teaser-close:hover {
  background: #1f2937;
  transform: scale(1.1);
}


/* ── Info Modals (Partners / Services) ─────────── */
.wlp-info-modal {
  position: fixed;
  inset: 0;
  z-index: 1000001;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wlp-info-modal.wlp-active {
  opacity: 1;
  visibility: visible;
}

.wlp-info-modal-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px;
  max-width: 520px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.3);
  position: relative;
  font-family: var(--wlp-font);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wlp-info-modal.wlp-active .wlp-info-modal-content {
  transform: scale(1);
}

.wlp-info-modal-content h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--wlp-text);
  margin: 0 0 18px 0;
  padding-right: 32px;
  letter-spacing: -0.5px;
}

.wlp-info-modal-body {
  font-size: 14px;
  color: #475569;
  line-height: 1.7;
}

.wlp-info-modal-body p {
  margin: 0 0 14px 0;
}

.wlp-info-modal-body ul {
  margin: 10px 0;
  padding-left: 22px;
}

.wlp-info-modal-body li {
  margin-bottom: 8px;
}

.wlp-info-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--wlp-text-muted);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

.wlp-info-modal-close:hover {
  background: rgba(15, 23, 42, 0.1);
  transform: rotate(90deg);
}

/* ── Privacy Text ──────────────────────────────── */
.wlp-privacy {
  font-size: 11px;
  color: var(--wlp-text-muted);
  text-align: center;
  line-height: 1.5;
  margin-top: 4px;
}

.wlp-privacy a {
  color: var(--wlp-accent);
  text-decoration: underline;
}

/* ── Mobile ────────────────────────────────────── */
@media (max-width: 640px) {
  .wlp-popup {
    grid-template-columns: 1fr;
    max-width: 94vw;
    max-height: 84vh;
    border-radius: 20px;
  }

  .wlp-image {
    min-height: 160px;
    max-height: 180px;
  }

  .wlp-img-desktop { display: none !important; }
  .wlp-img-mobile { display: block !important; }

  .wlp-content {
    padding: 32px 24px;
  }

  .wlp-title {
    font-size: 22px;
  }

  .wlp-description {
    font-size: 13.5px;
  }

  .wlp-field input,
  .wlp-field textarea {
    padding: 12px 14px 12px 40px !important;
    font-size: 16px !important; /* Prevents iOS auto-zoom */
    border-radius: 12px !important;
  }

  .wlp-submit {
    padding: 14px 18px;
    font-size: 15px;
    border-radius: 12px;
  }

  .wlp-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }

  /* Teaser mobile */
  .wlp-teaser {
    bottom: 12px;
    width: 94vw;
    max-width: 440px;
    transform: translate(-50%, 150%);
  }

  .wlp-teaser.wlp-active {
    transform: translate(-50%, 0);
  }

  .wlp-teaser-card {
    border-radius: 12px;
    padding: 16px 95px 16px 18px;
  }

  .wlp-teaser-title {
    font-size: 14px;
  }

  .wlp-teaser-desc {
    font-size: 11.5px;
  }

  .wlp-teaser-text {
    font-size: 13px;
  }

  .wlp-teaser-image {
    right: 8px;
    left: auto;
    width: 100px;
    height: 100px;
  }

  .wlp-teaser-close {
    top: -10px;
    left: -10px;
    width: 24px;
    height: 24px;
    font-size: 11px;
  }



  /* Info modals mobile */
  .wlp-info-modal-content {
    padding: 28px 20px;
    border-radius: 16px;
  }

  .wlp-info-modal-content h3 {
    font-size: 18px;
  }
}

/* ── Animations ────────────────────────────────── */
@keyframes wlp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.wlp-field.wlp-shake input,
.wlp-field.wlp-shake textarea {
  animation: wlp-shake 0.3s ease;
}

.wlp-consent.wlp-shake {
  animation: wlp-shake 0.3s ease;
}

/* ── Scrollbar (popup) ─────────────────────────── */
.wlp-popup::-webkit-scrollbar { width: 4px; }
.wlp-popup::-webkit-scrollbar-track { background: transparent; }
.wlp-popup::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }

.wlp-info-modal-content::-webkit-scrollbar { width: 4px; }
.wlp-info-modal-content::-webkit-scrollbar-track { background: transparent; }
.wlp-info-modal-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }

/* Honeypot — invisible to humans */
.wlp-hp,
.wlp-hp input {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}
