/* ==========================================================================
   ARQUIVO CSS EXCLUSIVO DO MODAL DE TRIAGEM & QUALIFICAÇÃO DE LEADS
   Criado separadamente para evitar conflitos de cache na Hostinger
   Contém: Estilos de layout, backdrop, formulário, botões e responsividade móvel
   ========================================================================== */

/* ==========================================================================
   MODAL DE TRIAGEM & QUALIFICAÇÃO DE LEADS (FILTRO DE ATENDIMENTO CRIMINAL)
   Identidade: Fundo escuro luxuoso (#171513), acentos em Laranja Institucional
   (#f83801) e Verde de Conversão WhatsApp (#25D366).
   ========================================================================== */

/* Trava a rolagem da página quando o modal estiver aberto */
body.modal-open {
  overflow: hidden;
  touch-action: none;
}

/* Fundo escurecido (Backdrop) com desfoque de vidro fosco */
.lead-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-premium, cubic-bezier(0.16, 1, 0.3, 1)),
              visibility 0.35s var(--ease-premium, cubic-bezier(0.16, 1, 0.3, 1));
}

/* Estado ativo do backdrop (quando o modal é aberto pelo usuário) */
.lead-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Caixa principal do Modal com efeito de elevação e gradiente premium */
.lead-modal-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(165deg, #181614 0%, #0e0d0c 100%);
  border: 1px solid rgba(248, 56, 1, 0.28);
  border-top: 3px solid var(--orange, #f83801);
  border-radius: 6px;
  padding: 32px 30px;
  color: #f7f4ef;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(248, 56, 1, 0.12);
  transform: translateY(22px) scale(0.97);
  opacity: 0;
  transition: transform 0.35s var(--ease-premium, cubic-bezier(0.16, 1, 0.3, 1)),
              opacity 0.35s var(--ease-premium, cubic-bezier(0.16, 1, 0.3, 1));
  scrollbar-width: thin;
  scrollbar-color: rgba(248, 56, 1, 0.35) transparent;
}

/* Animação suave de entrada do container quando aberto */
.lead-modal-backdrop.open .lead-modal-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Barra de rolagem personalizada do modal */
.lead-modal-container::-webkit-scrollbar {
  width: 6px;
}

.lead-modal-container::-webkit-scrollbar-track {
  background: transparent;
}

.lead-modal-container::-webkit-scrollbar-thumb {
  background: rgba(248, 56, 1, 0.35);
  border-radius: 3px;
}

.lead-modal-container::-webkit-scrollbar-thumb:hover {
  background: var(--orange, #f83801);
}

/* Botão de Fechar no canto superior direito */
.lead-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10;
}

.lead-modal-close:hover {
  background: var(--orange, #f83801);
  border-color: var(--orange, #f83801);
  color: #ffffff;
  transform: rotate(90deg);
}

/* Cabeçalho do modal */
.lead-modal-header {
  margin-bottom: 24px;
  padding-right: 32px;
}

/* Badge de sigilo do cabeçalho */
.lead-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  background: rgba(248, 56, 1, 0.12);
  border: 1px solid rgba(248, 56, 1, 0.35);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-light, #ff5e30);
  margin-bottom: 12px;
}

.lead-modal-badge-icon {
  flex-shrink: 0;
}

/* Título principal do modal */
.lead-modal-title {
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 8px;
}

/* Subtítulo institucional */
.lead-modal-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Tag dinâmica da área solicitada (ex: Tribunal do Júri) */
.lead-service-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--orange, #f83801);
  border-radius: 2px;
  font-size: 0.84rem;
  color: #ffffff;
  margin-bottom: 10px;
}

.lead-service-tag-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Grupos e campos do formulário */
.lead-form-group {
  margin-bottom: 20px;
}

/* Rótulos dos grupos de perguntas */
.lead-group-label,
.lead-field-label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  margin-bottom: 8px;
}

.lead-group-label .required,
.lead-field-label .required {
  color: var(--orange, #f83801);
}

/* Grid de duas colunas para campos de texto (Nome e Telefone) */
.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Estilos de inputs de texto e selects */
.lead-input,
.lead-select {
  width: 100%;
  padding: 13px 15px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.94rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.lead-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.lead-input:focus,
.lead-select:focus {
  outline: none;
  border-color: var(--orange, #f83801);
  box-shadow: 0 0 0 3px rgba(248, 56, 1, 0.2);
  background: rgba(0, 0, 0, 0.55);
}

/* Cor das opções no select para navegadores desktop */
.lead-select option {
  background: #171513;
  color: #ffffff;
}

/* Campo condicional com transição suave */
.lead-dependent-field {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Grid das opções "Para quem é a consulta" */
.lead-radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Card seletor de rádio customizado */
.lead-radio-card {
  position: relative;
  display: block;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.25s var(--ease-premium, cubic-bezier(0.16, 1, 0.3, 1));
}

/* Oculta o input de rádio nativo mantendo acessibilidade */
.lead-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lead-radio-card:hover {
  border-color: rgba(248, 56, 1, 0.5);
  background: rgba(248, 56, 1, 0.05);
}

/* Estado selecionado do card */
.lead-radio-card.active,
.lead-radio-card:has(input[type="radio"]:checked) {
  border-color: var(--orange, #f83801);
  background: rgba(248, 56, 1, 0.12);
  box-shadow: 0 0 16px rgba(248, 56, 1, 0.18);
}

.lead-radio-icon {
  font-size: 1.35rem;
  display: block;
  margin-bottom: 4px;
}

.lead-radio-title {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
}

.lead-radio-desc {
  display: block;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.35;
  margin-top: 3px;
}

/* Grid das opções de Situação Prisional */
.lead-prison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Card individual de situação prisional */
.lead-prison-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.lead-prison-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lead-prison-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 12px 14px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.25s var(--ease-premium, cubic-bezier(0.16, 1, 0.3, 1));
}

.lead-prison-card:hover .lead-prison-box {
  border-color: rgba(248, 56, 1, 0.45);
  background: rgba(248, 56, 1, 0.05);
}

.lead-prison-card.active .lead-prison-box,
.lead-prison-card:has(input[type="radio"]:checked) .lead-prison-box {
  border-color: var(--orange, #f83801);
  background: rgba(248, 56, 1, 0.12);
  box-shadow: 0 0 16px rgba(248, 56, 1, 0.18);
}

/* Badges de situação */
.lead-prison-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 3px;
  align-self: flex-start;
  margin-bottom: 6px;
}

.lead-prison-badge.alert {
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.lead-prison-badge.info {
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #bfdbfe;
}

.lead-prison-badge.warning {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.lead-prison-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.lead-prison-desc {
  display: block;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.35;
}

/* Card Informativo de Honorários da Consulta e Aviso de Abatimento */
.lead-fee-card {
  background: linear-gradient(135deg, rgba(248, 56, 1, 0.09) 0%, rgba(20, 18, 16, 0.95) 100%);
  border: 1px solid rgba(248, 56, 1, 0.35);
  border-left: 4px solid var(--orange, #f83801);
  border-radius: 4px;
  padding: 18px 20px;
  margin: 22px 0;
}

.lead-fee-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.lead-fee-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(248, 56, 1, 0.15);
  border: 1px solid rgba(248, 56, 1, 0.4);
  color: var(--orange-light, #ff5e30);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lead-fee-tag {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--orange-light, #ff5e30);
}

.lead-fee-title {
  font-size: 1.12rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 2px;
}

.lead-fee-title strong {
  color: #ffffff;
  background: rgba(248, 56, 1, 0.25);
  padding: 2px 8px;
  border-radius: 3px;
}

.lead-fee-scope {
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 14px;
}

/* Aviso destacado do abatimento dos R$ 1.000 no valor final do contrato */
.lead-fee-discount-alert {
  background: rgba(248, 56, 1, 0.16);
  border: 1px dashed rgba(248, 56, 1, 0.55);
  border-radius: 4px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.lead-discount-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.lead-discount-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #fff4f0;
}

.lead-discount-text strong {
  display: block;
  color: #ffffff;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.lead-discount-text p {
  margin: 0;
}

/* Checkbox personalizado de confirmação de ciência */
.lead-agreement-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 18px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.lead-agreement-group:hover {
  border-color: rgba(248, 56, 1, 0.5);
  background: rgba(248, 56, 1, 0.05);
}

.lead-checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.lead-checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lead-checkmark {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Ícone de check ao marcar */
.lead-checkbox-container input[type="checkbox"]:checked ~ .lead-checkmark {
  background: var(--orange, #f83801);
  border-color: var(--orange, #f83801);
  box-shadow: 0 0 10px rgba(248, 56, 1, 0.4);
}

.lead-checkbox-container input[type="checkbox"]:checked ~ .lead-checkmark::after {
  content: '';
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.lead-terms-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.lead-terms-text strong {
  color: #ffffff;
}

.lead-terms-text .required {
  color: var(--orange, #f83801);
}

/* Caixa de mensagens de feedback e validação */
.lead-form-feedback {
  min-height: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  border-radius: 4px;
  transition: all 0.25s ease;
}

.lead-form-feedback.error {
  padding: 10px 14px;
  margin-bottom: 14px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.lead-form-feedback.success {
  padding: 10px 14px;
  margin-bottom: 14px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

/* Botão principal de envio para o WhatsApp */
.lead-submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #25D366 0%, #1e7a46 100%);
  color: #ffffff;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.94rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  transition: all 0.35s var(--ease-premium, cubic-bezier(0.16, 1, 0.3, 1));
}

.lead-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
  filter: brightness(1.08);
}

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

.lead-btn-whatsapp-icon {
  flex-shrink: 0;
  display: flex;
}

/* Aviso de sigilo profissional no rodapé do modal */
.lead-confidential-notice {
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 14px;
  padding: 0 8px;
}

.lead-confidential-notice strong {
  color: rgba(255, 255, 255, 0.8);
}

/* Destaque temporário de erro em campo não preenchido */
.lead-input.has-error,
.lead-select.has-error,
.lead-agreement-group.has-error,
.lead-radio-grid.has-error,
.lead-prison-grid.has-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
  animation: leadShake 0.4s ease;
}

@keyframes leadShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* ==========================================================================
   RESPONSIVIDADE DO MODAL (TABLETS E DISPOSITIVOS MÓVEIS)
   ========================================================================== */
@media (max-width: 640px) {
  .lead-modal-container {
    padding: 24px 18px;
    max-height: 94vh;
  }

  .lead-modal-title {
    font-size: 1.5rem;
  }

  .lead-modal-subtitle {
    font-size: 0.84rem;
  }

  .lead-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lead-radio-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lead-prison-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lead-fee-card {
    padding: 16px 14px;
  }

  .lead-fee-title {
    font-size: 1rem;
  }

  .lead-submit-btn {
    padding: 14px 16px;
    font-size: 0.85rem;
  }
}