/* WhatsApp Lead Capture Popup */

@keyframes wa-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* ── Overlay (backdrop only, full-screen) ── */
.wa-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99998;
}

.wa-popup-overlay.is-hidden {
  display: none;
}

/* ── Card — posicionado acima do botão WhatsApp (canto inferior direito) ── */
.wa-popup {
  position: absolute;
  bottom: 90px;
  right: 20px;
  width: 320px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 36px 28px 28px;
  box-sizing: border-box;
  animation: wa-slide-up 0.22s ease both;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  text-align: center;
}

/* ── Close button ── */
.wa-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  box-sizing: border-box !important;
  aspect-ratio: 1 !important;
  background: #f0f0f0 !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer;
  color: #666;
  font-size: 11px;
  line-height: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  flex-shrink: 0;
  transition:
    background 0.15s,
    color 0.15s;
}
.wa-popup__close:hover {
  background: #e4e4e4 !important;
  color: #333;
}

/* ── WhatsApp icon circle ── */
.wa-popup__wa-icon {
  width: 64px;
  height: 64px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}
.wa-popup__wa-icon svg {
  width: 34px;
  height: 34px;
  fill: #fff;
}

/* ── Title ── */
.wa-popup__title {
  font-size: 20px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 8px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* ── Subtitle ── */
.wa-popup__subtitle {
  font-size: 13px;
  color: #777;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ── Input wrapper (icon + input) ── */
.wa-popup__field {
  margin-bottom: 10px;
  text-align: left;
}

.wa-popup__input-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid #e5e5e5;
  border-radius: 10px;
  background: #f8f8f8;
  padding-left: 12px;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.wa-popup__input-wrapper:focus-within {
  border-color: #25d366;
  background: #fff;
}

.wa-popup__input-wrapper.has-error {
  border-color: #e53935;
  background: #fff8f8;
}

.wa-popup__field-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  pointer-events: none;
  opacity: 0.55;
  flex-shrink: 0;
  margin-right: 10px;
}

.wa-popup__input {
  flex: 1;
  padding: 12px 14px 12px 0 !important;
  border: none !important;
  background: transparent !important;
  font-size: 14px;
  color: #1a1a1a;
  outline: none !important;
  box-sizing: border-box !important;
  width: 100%;
}
.wa-popup__input::placeholder {
  color: #b0b0b0;
}

/* ── Inline error ── */
.wa-popup__error {
  display: none;
  font-size: 11px;
  color: #e53935;
  margin-top: 4px;
  padding-left: 4px;
}
.wa-popup__error.is-visible {
  display: block;
}

/* ── Security note ── */
.wa-popup__security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 16px;
}
.wa-popup__security img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  opacity: 0.6;
}
.wa-popup__security span {
  font-size: 11px;
  color: #999;
  line-height: 1.4;
}

/* ── Submit button ── */
.wa-popup__submit {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 14px;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.15s,
    opacity 0.15s;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.01em;
}
.wa-popup__submit:hover {
  background: #1fbc5a;
}
.wa-popup__submit.is-loading {
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
}
.wa-popup__submit svg {
  width: 18px;
  height: 18px;
  fill: #fff;
  flex-shrink: 0;
}

/* ── Spinner ── */
.wa-popup__spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wa-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.wa-popup__submit.is-loading .wa-popup__spinner {
  display: inline-block;
}

/* ── Quick response note ── */
.wa-popup__quick {
  font-size: 12px;
  color: #aaa;
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.wa-popup__quick svg {
  width: 12px;
  height: 12px;
  fill: #aaa;
}

/* ── Mobile ── */
@media (max-width: 420px) {
  .wa-popup {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 80px;
    padding: 30px 16px 22px;
  }
  .wa-popup__title {
    font-size: 18px;
  }
}
