/* Sistema de Provas Online — Estilos compartilhados */

:root {
  --verde: #198754;
  --verde-claro: #d1e7dd;
}

/* Utilitário de cor roxo (para badge MC_MULTI) — Bootstrap 5 não inclui bg-purple */
.bg-purple { background-color: #6610f2 !important; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background-color: #f4f6f9;
}

/* --- Questões --- */
.questao-card {
  border-left: 4px solid #dee2e6;
  transition: border-left-color 0.2s;
}

.questao-card.respondida {
  border-left-color: var(--verde);
}

.questao-card .form-check {
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.15s;
  cursor: pointer;
}

.questao-card .form-check:hover {
  background-color: #f0f4f0;
}

.questao-card .form-check-input:checked + .form-check-label {
  font-weight: 600;
  color: var(--verde);
}

/* --- Barra de progresso fixa no topo --- */
.barra-progresso {
  position: fixed;
  top: var(--navbar-height, 56px); /* ajustado via JS em principal.js */
  left: 0;
  right: 0;
  height: 4px;
  background-color: #dee2e6;
  z-index: 1030;
}

.barra-progresso .fill {
  height: 100%;
  background-color: var(--verde);
  transition: width 0.3s ease;
}

/* --- Resultado --- */
.nota-grande {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
}

.nota-aprovado  { color: #198754; }
.nota-media     { color: #fd7e14; }
.nota-reprovado { color: #dc3545; }

/* --- Questão corrigida na tela de resultado --- */
.q-correta   { border-left: 4px solid #198754; background-color: #f0faf5; }
.q-incorreta { border-left: 4px solid #dc3545; background-color: #fff5f5; }
.q-pendente  { border-left: 4px solid #6c757d; background-color: #f8f9fa; }
.q-em-branco { border-left: 4px solid #ffc107; background-color: #fffdf0; }

/* --- Admin --- */
.prova-item {
  cursor: pointer;
  transition: background-color 0.15s;
}
.prova-item:hover { background-color: #f0f4f0; }

/* --- Imagem nas questões --- */
.imagem-questao {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  display: block;
}

/* --- Feedback Teste Mode --- */
.opcao-selecionada-correta { background-color: #d1e7dd !important; border-radius: 6px; }
.opcao-selecionada-errada  { background-color: #f8d7da !important; border-radius: 6px; }
.opcao-correta-perdida     { border: 2px dashed #198754 !important; border-radius: 6px; }

.feedback-inline {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.feedback-inline.correto        { background-color: #d1e7dd; border-left: 4px solid #198754; }
.feedback-inline.errado         { background-color: #f8d7da; border-left: 4px solid #dc3545; }
.feedback-inline.nao-respondido { background-color: #fff3cd; border-left: 4px solid #ffc107; }
.feedback-inline.dissertativa   { background-color: #e2e3e5; border-left: 4px solid #6c757d; }

/* --- Responsivo mobile --- */
@media (max-width: 576px) {
  .nota-grande { font-size: 3.5rem; }
  .navbar-brand { font-size: 0.82rem; }
  #timer { font-size: 0.8rem !important; padding: 3px 7px !important; }
  .questao-card .card-header { flex-wrap: wrap; gap: 4px; }
  .questao-card .form-check  { padding: 10px 8px; }
  .btn-lg { font-size: 1rem; padding: 10px 20px; }
  .container { padding-left: 12px; padding-right: 12px; }
}

/* --- Faixa de disciplina (prova.html) --- */
#faixa-disciplina {
  background: #eaf4ee;
  border-bottom: 1px solid #c3e0d0;
  color: #198754;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 0;
  text-align: center;
  letter-spacing: 0.02em;
}

/* --- Rodapé institucional --- */
.rodape-institucional {
  text-align: center;
  color: #6c757d;
  font-size: 0.78rem;
  padding: 16px 0 24px;
  margin-top: 40px;
  border-top: 1px solid #dee2e6;
}

/* Linha de instituição no navbar brand */
.navbar-instituicao {
  font-size: 0.62rem;
  font-weight: 400;
  opacity: 0.82;
  display: block;
  letter-spacing: 0.03em;
  margin-top: 1px;
}

/* --- Impressão (resultado) --- */
@media print {
  .navbar, .btn, .barra-progresso, #btn-enviar, #btn-voltar { display: none !important; }
  body { background: white; }
  .card { break-inside: avoid; }
}
