/* ==========================================================
   PROCESSO ELEITORAL — REPeSim
   Arquivo: static/css/processo_eleitoral.css
   ========================================================== */

/* Navegação interna da área de Gestão */
.gestao-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.gestao-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.gestao-subnav a:hover {
  background: var(--bg-soft);
  color: var(--brand);
}

.gestao-subnav a.ativo {
  background: var(--brand);
  color: #ffffff;
}

.gestao-subnav a.ativo:hover {
  background: var(--brand-dark);
  color: #ffffff;
}

/* Apresentação */
.processo-eleitoral-apresentacao {
  max-width: 920px;
  margin-bottom: 0;
}

.processos-eleitorais-lista {
  width: 100%;
  margin-top: 28px;
}

/* Acordeão de cada ano */
.processo-eleitoral-item {
  width: 100%;
  margin-bottom: 18px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.processo-eleitoral-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  list-style: none;
  cursor: pointer;
  background: #ffffff;
  transition: background-color 0.2s ease;
}

.processo-eleitoral-item summary::-webkit-details-marker {
  display: none;
}

.processo-eleitoral-item summary::marker {
  content: "";
}

.processo-eleitoral-item summary:hover {
  background: #f8fafc;
}

.processo-eleitoral-item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.processo-eleitoral-item[open] summary::after {
  content: "–";
}

/* Cabeçalho do processo */
.processo-eleitoral-resumo {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.processo-eleitoral-ano {
  color: var(--brand-dark);
  font-size: 1.15rem;
  font-weight: 700;
}

.processo-eleitoral-subtitulo {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.processo-eleitoral-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-organizacao {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.status-andamento {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.status-encerrado {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Conteúdo interno */
.processo-eleitoral-conteudo {
  padding: 24px 22px 26px;
  border-top: 1px solid var(--border);
}

.processo-eleitoral-destaque {
  margin-bottom: 24px;
  padding: 18px 20px;
  background: var(--bg-soft);
  border-left: 4px solid var(--brand);
  border-radius: 0 10px 10px 0;
}

.processo-eleitoral-destaque h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.processo-eleitoral-destaque p {
  margin: 0;
  color: var(--text);
}

.processo-eleitoral-destaque a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Cards internos */
.processo-eleitoral-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.processo-eleitoral-bloco {
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.processo-eleitoral-bloco h4,
.processo-eleitoral-secao h4 {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 1rem;
}

.processo-eleitoral-bloco p,
.processo-eleitoral-secao > p {
  margin: 0 0 12px;
  color: var(--muted);
}

/* Marcadores */
.processo-eleitoral-pendente,
.documento-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

/* Seções */
.processo-eleitoral-secao {
  margin-top: 26px;
}

.processo-eleitoral-lista-simples {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
}

.processo-eleitoral-lista-simples li {
  margin-bottom: 7px;
}

/* Etapas */
.processo-eleitoral-etapas {
  margin: 0;
  padding-left: 22px;
}

.processo-eleitoral-etapas li {
  margin-bottom: 8px;
  padding-left: 4px;
  color: var(--text);
}

.processo-eleitoral-etapas li::marker {
  color: var(--brand);
  font-weight: 700;
}

/* Documentos e cronograma */
.processo-eleitoral-documentos {
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.processo-eleitoral-documentos li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.processo-eleitoral-documentos li:last-child {
  border-bottom: 0;
}

.processo-eleitoral-documentos strong {
  display: block;
  color: var(--brand-dark);
}

.processo-eleitoral-documentos small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.84rem;
}

.processo-eleitoral-documentos .documento-link {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.processo-eleitoral-documentos .documento-link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* Aviso */
.processo-eleitoral-aviso {
  margin-top: 24px;
  padding: 15px 17px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: var(--text);
}

.processo-eleitoral-aviso strong {
  color: var(--brand-dark);
}

.processo-eleitoral-aviso p {
  margin: 4px 0 0;
}

/* Data de atualização */
.processo-eleitoral-atualizacao {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

/* Responsividade */
@media (max-width: 768px) {
  .gestao-subnav {
    flex-direction: column;
  }

  .gestao-subnav a {
    width: 100%;
  }

  .processo-eleitoral-item summary {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px;
  }

  .processo-eleitoral-item summary::after {
    margin-left: auto;
  }

  .processo-eleitoral-status {
    order: 3;
  }

  .processo-eleitoral-conteudo {
    padding: 20px 18px 22px;
  }

  .processo-eleitoral-grid {
    grid-template-columns: 1fr;
  }

  .processo-eleitoral-documentos li {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .processo-eleitoral-atualizacao {
    text-align: left;
  }
}
