/* ==========================================================================
   TYPEFORM MULTI-STEP FUNNEL - GFP ENGENHARIA
   Estilo Interativo Minimalista, Alta Conversão & Suporte Mobile
   ========================================================================== */

.funnel-container {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

/* Modo escuro opcional quando inserido no Hero ou seções Dark */
.funnel-container.funnel-dark {
  background: #0F141C;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  color: #FFFFFF;
}

/* Barra de Progresso */
.funnel-progress {
  width: 100%;
  height: 6px;
  background: #E5E7EB;
  position: relative;
  overflow: hidden;
}

.funnel-dark .funnel-progress {
  background: rgba(255, 255, 255, 0.08);
}

.funnel-progress-bar {
  height: 100%;
  width: 25%;
  background: var(--accent, #FEE600);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Honeypot Anti-Spam */
.funnel-hp {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  height: 0;
  width: 0;
}

/* Corpo dos Passos (Steps) */
.funnel-body {
  padding: 40px 36px 32px;
}

@media (max-width: 640px) {
  .funnel-body {
    padding: 26px 20px 24px;
  }
}

.funnel-step {
  display: none;
  animation: funnelFadeIn 0.3s ease forwards;
}

.funnel-step.active {
  display: block;
}

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

.step-meta-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.funnel-dark .step-meta-label {
  color: #9CA3AF;
}

.step-meta-label.approved {
  color: #10B981;
}

.funnel-title {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
  color: #111827;
  margin-bottom: 10px;
}

.funnel-dark .funnel-title {
  color: #FFFFFF;
}

.funnel-subtitle {
  font-size: 0.95rem;
  color: #4B5563;
  line-height: 1.5;
  margin-bottom: 24px;
}

.funnel-dark .funnel-subtitle {
  color: #9CA3AF;
}

/* Opções Tipo Typeform (Cards Clicáveis) */
.funnel-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.funnel-opt-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  background: #F9FAFB;
  border: 1.5px solid #E5E7EB;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 600;
  color: #1F2937;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.funnel-opt-btn:focus-visible {
  outline: 2px solid var(--accent, #EAB308) !important;
  outline-offset: 2px !important;
}

.funnel-dark .funnel-opt-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #F3F4F6;
}

.funnel-opt-btn:hover {
  background: #F3F4F6;
  border-color: #D1D5DB;
  transform: translateY(-1px);
}

.funnel-dark .funnel-opt-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.funnel-opt-btn.selected {
  background: #FEFCE8;
  border-color: #EAB308;
  color: #854D0E;
  box-shadow: 0 0 0 1px #EAB308;
}

.funnel-dark .funnel-opt-btn.selected {
  background: rgba(254, 230, 0, 0.12);
  border-color: var(--accent, #FEE600);
  color: #FFFFFF;
}

/* Tecla Teclado (A, B, C...) */
.funnel-opt-key {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #4B5563;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.funnel-dark .funnel-opt-key {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #E5E7EB;
}

.funnel-opt-btn.selected .funnel-opt-key {
  background: var(--accent, #FEE600);
  color: #000000;
  border-color: transparent;
}

.funnel-opt-text {
  flex-grow: 1;
  line-height: 1.35;
}

.funnel-opt-sub {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: #6B7280;
  margin-top: 2px;
}

.funnel-dark .funnel-opt-sub {
  color: #9CA3AF;
}

/* Formulário de Contato e Inputs */
.funnel-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

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

.funnel-field-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
}

.funnel-dark .funnel-field-group label {
  color: #D1D5DB;
}

.funnel-input {
  width: 100%;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1.5px solid #D1D5DB;
  border-radius: 12px;
  font-size: 1rem;
  color: #111827;
  transition: all 0.2s ease;
}

.funnel-input:focus-visible {
  outline: 2px solid var(--accent, #EAB308) !important;
  outline-offset: 2px !important;
}

.funnel-dark .funnel-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.funnel-input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.funnel-dark .funnel-input:focus {
  border-color: var(--accent, #FEE600);
  box-shadow: 0 0 0 3px rgba(254, 230, 0, 0.2);
}

.funnel-input.error {
  border-color: #EF4444 !important;
  background: #FEF2F2 !important;
}

.funnel-dark .funnel-input.error {
  background: rgba(239, 68, 68, 0.1) !important;
}

.funnel-error-msg {
  font-size: 0.8rem;
  color: #EF4444;
  display: none;
  font-weight: 600;
  margin-top: 4px;
}

.funnel-phone-wrapper {
  display: flex;
  gap: 10px;
}

.funnel-ddi-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: #F3F4F6;
  border: 1.5px solid #D1D5DB;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
  white-space: nowrap;
}

.funnel-dark .funnel-ddi-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #E5E7EB;
}

/* Navegação do Funil (Voltar & Continuar) */
.funnel-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid #E5E7EB;
  margin-top: 24px;
}

.funnel-dark .funnel-nav {
  border-color: rgba(255, 255, 255, 0.08);
}

.funnel-btn-back {
  background: transparent;
  border: none;
  color: #6B7280;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.funnel-dark .funnel-btn-back {
  color: #9CA3AF;
}

.funnel-btn-back:hover {
  color: #111827;
}

.funnel-dark .funnel-btn-back:hover {
  color: #FFFFFF;
}

.funnel-btn-next {
  background: var(--accent, #FEE600);
  color: #000000;
  border: none;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 13px 24px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(254, 230, 0, 0.25);
}

.funnel-btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(254, 230, 0, 0.35);
}

.funnel-btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   TICKET DE APROVAÇÃO E FINALIZAÇÃO DO LEAD
   ========================================================================== */
.funnel-ticket {
  background: #F9FAFB;
  border: 1px dashed #D1D5DB;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  animation: funnelTicketPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.funnel-dark .funnel-ticket {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

@keyframes funnelTicketPop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.ticket-seal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECFDF5;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.funnel-dark .ticket-seal {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
}

.ticket-code {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #111827;
  margin: 12px 0 16px;
  background: #FFFFFF;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

.funnel-dark .ticket-code {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.ticket-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
  text-align: left;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px;
}

.funnel-dark .ticket-meta-grid {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.ticket-meta-item dt {
  font-size: 0.72rem;
  color: #6B7280;
  font-weight: 700;
  text-transform: uppercase;
}

.funnel-dark .ticket-meta-item dt {
  color: #9CA3AF;
}

.ticket-meta-item dd {
  font-size: 0.9rem;
  color: #111827;
  font-weight: 800;
  margin: 2px 0 0;
}

.funnel-dark .ticket-meta-item dd {
  color: #FFFFFF;
}

.btn-ticket-wpp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #25D366;
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 16px 24px;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
  transition: all 0.2s ease;
  margin-top: 12px;
}

.btn-ticket-wpp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn-ticket-wpp svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
