/* ════════════════════════════════════════════════════════════
   FORMULÁRIO CONDICIONAL — ALVO GESTÃO CONTÁBIL
   Agência PHN | Estilos do Modal de Qualificação
   ════════════════════════════════════════════════════════════ */

/* ─── OVERLAY ──────────────────────────────────── */
.cf-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 42, 26, 0.6);
  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;
}

/* ─── MODAL ────────────────────────────────────── */
.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(0, 0, 0, 0.25);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.cf-overlay.cf-active .cf-modal {
  transform: translateY(0) scale(1);
}

/* ─── CLOSE BUTTON ─────────────────────────────── */
.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: #f0f2f5;
  color: #1a2b3d;
}

/* ─── PROGRESS BAR ─────────────────────────────── */
.cf-progress {
  height: 4px;
  background: #e8ede9;
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
}

.cf-progress-bar {
  height: 100%;
  background: linear-gradient(135deg, #008349, #045e38);
  border-radius: 1rem 1rem 0 0;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

/* ─── CONTENT AREA ─────────────────────────────── */
.cf-content {
  padding: 2.5rem 2rem 2rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ─── TYPOGRAPHY ───────────────────────────────── */
.cf-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.625rem;
  color: #1a2b3d;
  margin-bottom: 0.375rem;
  line-height: 1.25;
}

.cf-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9375rem;
  color: #6d7685;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* ─── BACK BUTTON ──────────────────────────────── */
.cf-back {
  background: none;
  border: none;
  color: #008349;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  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: #045e38;
}

/* ─── OPTION CARDS ─────────────────────────────── */
.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: #f9faf8;
  border: 2px solid #e8ede9;
  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: 'Poppins', sans-serif;
}

.cf-card:hover {
  border-color: #008349;
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 131, 73, 0.1);
}

.cf-card.cf-selected {
  border-color: #008349;
  background: #edf7f1;
  box-shadow: 0 0 0 3px rgba(0, 131, 73, 0.15);
}

.cf-card-emoji {
  font-size: 1.5rem;
  margin-bottom: 0.375rem;
  line-height: 1;
}

.cf-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a2b3d;
  line-height: 1.3;
}

.cf-card-desc {
  font-size: 0.8125rem;
  color: #6d7685;
  margin-top: 0.125rem;
  line-height: 1.4;
}

/* ─── CONTACT FORM ─────────────────────────────── */
.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: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a2b3d;
  letter-spacing: 0.01em;
}

.cf-field input {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 2px solid #e8ede9;
  border-radius: 0.625rem;
  color: #1a2b3d;
  background: #f9faf8;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.cf-field input:focus {
  border-color: #008349;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 131, 73, 0.1);
}

.cf-field input::placeholder {
  color: #a0a8b4;
}

/* ─── SUBMIT BUTTON ────────────────────────────── */
.cf-submit {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #008349, #045e38);
  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;
}

.cf-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 131, 73, 0.3);
}

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

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

/* ─── MOBILE RESPONSIVE ────────────────────────── */
@media (max-width: 600px) {
  .cf-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 1rem 1rem 0 0;
    margin-top: auto;
  }

  .cf-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .cf-overlay.cf-active .cf-modal {
    transform: translateY(0);
  }

  .cf-modal {
    transform: translateY(100%);
  }

  .cf-content {
    padding: 2rem 1.25rem 1.75rem;
  }

  .cf-title {
    font-size: 1.375rem;
  }

  .cf-cards {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }

  .cf-card {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
  }

  .cf-card-emoji {
    margin-bottom: 0;
    font-size: 1.375rem;
  }

  .cf-card-title {
    font-size: 0.875rem;
  }

  .cf-card-desc {
    font-size: 0.75rem;
  }

  .cf-card .cf-card-desc {
    display: none;
  }
}

@media (max-width: 380px) {
  .cf-content {
    padding: 1.5rem 1rem 1.5rem;
  }

  .cf-title {
    font-size: 1.25rem;
  }

  .cf-subtitle {
    font-size: 0.8125rem;
  }
}
