.lead-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.lead-modal--visible {
  display: flex;
}

.lead-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 14, 19, 0.65);
  backdrop-filter: blur(2px);
}

.lead-modal__dialog {
  position: relative;
  width: min(420px, 90vw);
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem 1.25rem 1.5rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
  font-family: 'Poppins', sans-serif;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.lead-modal--visible .lead-modal__dialog {
  transform: translateY(0);
  opacity: 1;
}

.lead-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  color: #4b5563;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lead-modal__close:hover {
  background: #e5e7eb;
  color: #111827;
}

.lead-modal__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #f6547a;
  text-align: center;
}

.lead-modal__subtitle {
  margin-top: 0.15rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #6b7280;
  text-align: center;
}

.lead-modal__form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.lead-modal__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
}

.lead-modal__input,
.lead-modal__phone-input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lead-modal__input--error {
  border-color: #f6547a !important;
  box-shadow: 0 0 0 3px rgba(246, 84, 122, 0.3) !important;
  animation: leadFieldPulse 1.4s ease-in-out forwards;
}

@keyframes leadFieldPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(246, 84, 122, 0.15);
  }
  12% {
    box-shadow: 0 0 0 4px rgba(246, 84, 122, 0.45);
  }
  25% {
    box-shadow: 0 0 0 1px rgba(246, 84, 122, 0.2);
  }
  37% {
    box-shadow: 0 0 0 4px rgba(246, 84, 122, 0.45);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(246, 84, 122, 0.2);
  }
  62% {
    box-shadow: 0 0 0 4px rgba(246, 84, 122, 0.45);
  }
  75% {
    box-shadow: 0 0 0 1px rgba(246, 84, 122, 0.2);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(246, 84, 122, 0.35);
  }
}

.lead-modal__input:focus,
.lead-modal__phone-input:focus {
  outline: none;
  border-color: #f86e86;
  box-shadow: 0 0 0 3px rgba(248, 110, 134, 0.15);
}

.lead-modal__phone-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lead-modal__ddi-wrapper {
  position: relative;
  display: inline-flex;
}

.lead-modal__country {
  position: relative;
  z-index: 1;
  background: #fdf2f7;
  color: #c02660;
  border: 1px solid #fbc0d1;
  border-radius: 999px;
  padding: 0.7rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.lead-modal__country-input {
  display: none;
  width: 80px;
  text-align: center;
}

.lead-modal__ddi-wrapper--custom .lead-modal__country {
  display: none;
}

.lead-modal__ddi-wrapper--custom .lead-modal__country-input {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.lead-modal__ddi-wrapper select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
  border: none;
}

.lead-modal__submit {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  background: linear-gradient(90deg, #f86e86, #f6547a);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 15px 30px rgba(246, 84, 122, 0.25);
}

.lead-modal__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 35px rgba(246, 84, 122, 0.3);
}

.lead-modal__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.lead-modal__fineprint {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
}

.lead-modal__field-error {
  font-size: 0.75rem;
  color: #c02660;
  margin-top: -0.25rem;
  padding-left: 0.5rem;
}

.lead-modal__honeypot {
  position: absolute;
  left: -5000px;
  opacity: 0;
  pointer-events: none;
}

body.lead-modal-open {
  overflow: hidden;
}

.lead-modal__toast {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  backdrop-filter: blur(2px);
}

.lead-modal__toast-content {
  position: relative;
  background: #fff;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
  max-width: 320px;
  font-size: 0.95rem;
  color: #111827;
}

.lead-modal__toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  color: #6b7280;
  cursor: pointer;
}
.lead-modal__toast[hidden] {
  display: none;
}

/* ==========================================================================
   TELA DE ESPERA / OVERLAY DE CARREGAMENTO (RODADA 06)
   ========================================================================== */
.submission-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(13, 14, 19, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.submission-overlay--active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.submission-overlay[hidden] {
  display: none !important;
}

.submission-overlay__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 380px;
  width: 100%;
}

.submission-overlay__spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: submission-spin 0.8s linear infinite;
  margin-bottom: 1.25rem;
}

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

@media (prefers-reduced-motion: reduce) {
  .submission-overlay__spinner {
    animation: none;
    border-color: #ffffff;
    opacity: 0.85;
  }
}

.submission-overlay__title {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.submission-overlay__description {
  margin: 0.5rem 0 0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
}
