/* --- Modal de Captura de Lead B2B --- */
.lead-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 17, 22, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.lead-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lead-modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  width: min(580px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-8);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: 6px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.modal-header h3 {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  margin: var(--space-2) 0 var(--space-1);
}

.modal-header p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-primary);
}

.form-group input,
.form-group select {
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  padding: 0 var(--space-3);
  transition: border-color var(--transition-fast);
}

.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group input:user-invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 0 2px var(--accent-red-subtle) !important;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-blue-subtle);
}

.form-group input:focus-visible,
.form-group select:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 1px;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-blue-subtle);
}

.form-alert-error {
  background: var(--accent-red-subtle);
  border: 1px solid var(--accent-red);
  color: var(--accent-red-ink);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  margin-bottom: var(--space-4);
  line-height: 1.4;
}

/* Spinner no botão durante submit */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: btnSpin 0.7s linear infinite;
  margin-right: 8px;
}

@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

.btn-loading {
  cursor: wait !important;
  opacity: 0.85;
}

.form-privacy-note {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: center;
  justify-content: center;
  margin-top: var(--space-2);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.lead-success-feedback {
  text-align: center;
  padding: var(--space-6) 0;
}

.success-icon-badge {
  width: 56px;
  height: 56px;
  background: var(--accent-green-subtle);
  color: var(--accent-green-ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.lead-success-feedback h4 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.lead-success-feedback p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* Speed-to-Lead WhatsApp Callout no Card de Sucesso */
.success-whatsapp-bridge {
  margin-top: var(--space-4);
  margin-bottom: var(--space-5);
}

.success-whatsapp-bridge .btn-whatsapp-direct {
  background: #25D366;
  color: #FFFFFF;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  text-decoration: none;
  font-size: var(--text-sm);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}

.success-whatsapp-bridge .btn-whatsapp-direct:hover {
  background: #20BA5A;
  transform: translateY(-1px);
}


/* --- WhatsApp Floating Speed-Lead Widget --- */
.whatsapp-lead-floating {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.whatsapp-lead-bubble {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  width: 240px;
  position: relative;
  animation: fadeInBubble 0.3s ease-out;
}

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

.whatsapp-bubble-close {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-tertiary);
  cursor: pointer;
}

.bubble-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.bubble-header strong {
  font-size: 12px;
  color: var(--text-primary);
}

.online-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
}

.whatsapp-lead-bubble p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
  margin: 0;
}

.whatsapp-floating-btn {
  width: 54px;
  height: 54px;
  background: #25D366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.whatsapp-floating-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.floating-badge-ping {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: var(--accent-red);
  border: 2px solid #ffffff;
  border-radius: 50%;
}

