/* ==========================================================================
   CONTAINER DO QUIZ
   ========================================================================== */
.quiz-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-top: 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: none; /* Controlado pela classe .quiz-active no body */
}

body.quiz-active .quiz-card {
  display: block;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-header h3 {
  margin: 0;
  font-size: 18px;
  color: #123a5d;
  font-weight: 600;
}

.quiz-meta {
  font-size: 13px;
  color: var(--text-light);
  background: #f0f4f9;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ==========================================================================
   PROGRESSO E INDICADORES
   ========================================================================== */
.progress-container {
  width: 100%;
  background: #eee;
  height: 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}

.quiz-step-indicator {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}

/* ==========================================================================
   PERGUNTAS E OPÇÕES
   ========================================================================== */
.question-text {
  font-size: 17px;
  font-weight: 600;
  color: #1a2b3c;
  margin-bottom: 20px;
  line-height: 1.4;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-card {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #fff;
  border: 2px solid #edf2f7;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-card:hover {
  border-color: #cbd5e0;
  background: #f8fafc;
}

.option-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option-card input[type="radio"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ==========================================================================
   RODAPÉ DO QUIZ (BOTÕES DE NAVEGAÇÃO)
   ========================================================================== */
.quiz-footer {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

/* Base comum para todos os botões do formulário */
.quiz-footer button {
  flex: 1; /* Faz os botões dividirem o espaço igualmente */
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 2px solid var(--primary);
}

/* Botão Próximo / Ver Resultado (Destaque) */
.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Botão Anterior (Secundário) */
.btn-outline {
  background-color: transparent;
  color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--primary-light);
}

/* Estado desativado */
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* ==========================================================================
   SEÇÃO DE RESULTADOS E WHATSAPP
   ========================================================================== */
#result-section {
  display: none; /* Mostrado via JS */
  margin-top: 30px;
}

.result-card {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
}

.result-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.result-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: #1a2b3c;
}

.result-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 25px;
}

/* O BOTÃO VERDE DO WHATSAPP */
.btn-whatsapp {
  background-color: #25d366 !important;
  color: white !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  padding: 16px;
  border-radius: var(--radius-sm);
  width: 100%;
  font-size: 16px;
  transition: transform 0.2s ease, background-color 0.2s ease;
  margin-bottom: 10px;
}

.btn-whatsapp:hover {
  background-color: #128c7e !important;
  transform: translateY(-2px);
}

.btn-whatsapp i {
  font-size: 20px;
}

/* Botão de Refazer (no final do resultado) */
.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: none;
  padding: 14px;
  width: 100%;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE)
   ========================================================================== */
@media (max-width: 480px) {
  .quiz-footer {
    flex-direction: column-reverse; /* No celular, o "Próximo" fica em cima por ser mais importante */
  }

  .quiz-footer button {
    width: 100%;
  }

  .result-title {
    font-size: 20px;
  }
}
