/* ════════════════════════════════════════════════════════════
   FORMULÁRIO CONDICIONAL (QUIZ) — GSL ASSESSORIA CONTÁBIL
   Agência PHN | Estilos do modal de qualificação de leads
   Paleta GSL: navy #14163f + teal #0e97b8 / ciano #35c6de
   Fontes do site: Playfair Display (títulos) + DM Sans (corpo)
   ════════════════════════════════════════════════════════════ */

.cf-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(20, 22, 63, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}
.cf-overlay.cf-active { opacity: 1; visibility: visible; }

.cf-modal {
  position: relative;
  background: #ffffff;
  border-radius: 1rem;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(20, 22, 63, 0.35);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}
.cf-overlay.cf-active .cf-modal { transform: translateY(0) scale(1); }

.cf-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #6d7685;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1;
}
.cf-close:hover { background: #eef2f7; color: #14163f; }

.cf-progress {
  height: 4px;
  background: #e6ecf3;
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
}
.cf-progress-bar {
  height: 100%;
  background: linear-gradient(135deg, #0e97b8, #35c6de);
  border-radius: 1rem 1rem 0 0;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.cf-content {
  padding: 2.5rem 2rem 2rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cf-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #14163f;
  margin-bottom: 0.375rem;
  line-height: 1.2;
}
.cf-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  color: #6d7685;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.cf-back {
  background: none;
  border: none;
  color: #0e97b8;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}
.cf-back:hover { color: #14163f; }

.cf-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.cf-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem 1.125rem;
  background: #f7fafc;
  border: 2px solid #e6ecf3;
  border-radius: 0.75rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  font-family: 'DM Sans', sans-serif;
}
.cf-card:hover {
  border-color: #0e97b8;
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 151, 184, 0.18);
}
.cf-card.cf-selected {
  border-color: #0e97b8;
  background: #eefafd;
  box-shadow: 0 0 0 3px rgba(14, 151, 184, 0.20);
}
.cf-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #14163f;
  line-height: 1.3;
}
.cf-card-desc {
  font-size: 0.8125rem;
  color: #6d7685;
  margin-top: 0.2rem;
  line-height: 1.4;
}

.cf-form { display: flex; flex-direction: column; gap: 1.125rem; }
.cf-field { display: flex; flex-direction: column; gap: 0.375rem; }
.cf-field label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #14163f;
  letter-spacing: 0.01em;
}
.cf-field input {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 2px solid #e6ecf3;
  border-radius: 0.625rem;
  color: #14163f;
  background: #f7fafc;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.cf-field input:focus {
  border-color: #0e97b8;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(14, 151, 184, 0.18);
}
.cf-field input::placeholder { color: #a0a8b4; }

.cf-submit {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, #0e97b8, #23256f);
  color: #ffffff;
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
}
.cf-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 151, 184, 0.40);
  color: #ffffff;
}
.cf-submit:active { transform: translateY(0); }
.cf-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.cf-consent {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: #6d7685;
  line-height: 1.5;
  margin: 0.25rem 0 0;
  text-align: center;
}
.cf-consent a { color: #0e97b8; text-decoration: underline; }

/* Widget do Turnstile (anti-bot) — centralizado no form */
.cf-turnstile { display: flex; justify-content: center; margin-top: 0.25rem; }

/* ─── MOBILE ───────────────────────────────────── */
@media (max-width: 600px) {
  .cf-overlay { align-items: flex-end; padding: 0; }
  .cf-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 1rem 1rem 0 0;
    margin-top: auto;
    transform: translateY(100%);
  }
  .cf-overlay.cf-active .cf-modal { transform: translateY(0); }
  .cf-content { padding: 2rem 1.25rem 1.75rem; }
  .cf-title { font-size: 1.3rem; }
  .cf-cards { grid-template-columns: 1fr; gap: 0.625rem; }
  .cf-card { padding: 0.875rem 1rem; }
  .cf-card-title { font-size: 0.9rem; }
  .cf-card-desc { font-size: 0.78rem; }
}
@media (max-width: 380px) {
  .cf-content { padding: 1.5rem 1rem 1.5rem; }
  .cf-title { font-size: 1.15rem; }
  .cf-subtitle { font-size: 0.8125rem; }
}
