/* Comparador Direto de Votos e Porcentagem - 2º Turno */
.presidential-comparator-panel {
  margin: 0 0 24px;
  padding: 22px 26px;
  border: 1px solid #dbe4f5;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(13, 35, 78, 0.06);
}

.comparator-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.comparator-head h2 {
  margin: 4px 0 6px;
  color: #14213d;
  font-size: clamp(19px, 2.2vw, 26px);
  line-height: 1.25;
}

.comparator-head p {
  max-width: 680px;
  margin: 0;
  color: #516582;
  font-size: 14px;
  line-height: 1.5;
}

.comparator-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  background: #edf8f3;
  color: #0b8054;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.comparator-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #14ae7b;
  box-shadow: 0 0 0 3px rgba(20, 174, 123, 0.25);
}

/* Progresso de Abertura de Urnas */
.comparator-urnas-progress-wrap {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #f8faff;
  border: 1px solid #e2eaf7;
}

.comparator-urnas-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #3b4d6a;
}

.comparator-urnas-meta strong {
  color: #14213d;
  font-weight: 800;
}

.comparator-urnas-meta .urnas-pct {
  font-weight: 800;
  color: #245de8;
}

.comparator-urnas-bar {
  height: 9px;
  background: #e3ebf6;
  border-radius: 99px;
  overflow: hidden;
}

.comparator-urnas-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #245de8 0%, #159b72 100%);
  border-radius: 99px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Placar Central Versus */
.comparator-versus-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.comp-cand-card {
  padding: 18px;
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid #e3e9f4;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comp-cand-card.is-leader {
  border-color: #245de8;
  box-shadow: 0 6px 20px rgba(36, 93, 232, 0.12);
}

.comp-cand-lula {
  border-left: 4px solid #d32f2f;
}

.comp-cand-bolsonaro {
  border-left: 4px solid #1976d2;
}

.comp-cand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.comp-cand-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e1e7f2;
}

.comp-cand-info h3 {
  margin: 0;
  font-size: 17px;
  color: #14213d;
  line-height: 1.2;
}

.comp-cand-info span {
  font-size: 11px;
  color: #6c7c96;
  font-weight: 700;
}

.comp-cand-percent {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 900;
  color: #122148;
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.comp-cand-votes {
  font-size: 15px;
  font-weight: 700;
  color: #3b4d6a;
  font-variant-numeric: tabular-nums;
}

/* Coluna Central do Gap / Diferença */
.comp-versus-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 14px;
  min-width: 170px;
}

.comp-leader-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 99px;
  background: #f0f3fa;
  color: #4b5d78;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comp-leader-badge.leader-lula {
  background: #fdeaea;
  color: #c62828;
}

.comp-leader-badge.leader-bolsonaro {
  background: #e8f1fd;
  color: #1565c0;
}

.comp-gap-votes {
  font-size: 20px;
  font-weight: 900;
  color: #14213d;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.comp-gap-pct {
  font-size: 13px;
  font-weight: 800;
  color: #159b72;
}

.comp-gap-caption {
  font-size: 10px;
  color: #7d8ea6;
  margin-top: 4px;
}

/* Barra de Confronto Direto (Split Bar) */
.comparator-split-container {
  margin-bottom: 22px;
}

.comparator-split-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
}

.split-label-lula {
  color: #c62828;
}

.split-label-bolsonaro {
  color: #1565c0;
}

.comparator-split-bar {
  height: 14px;
  border-radius: 99px;
  overflow: hidden;
  background: #edf1f8;
  display: flex;
  position: relative;
}

.comparator-split-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ffffff;
  z-index: 2;
  box-shadow: 0 0 4px rgba(0,0,0,0.25);
}

.split-bar-lula {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #d32f2f, #e57373);
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.split-bar-bolsonaro {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #64b5f6, #1976d2);
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cards de Resumo e Soma */
.comparator-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.comp-summary-box {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8faff;
  border: 1px solid #e7ecf5;
  text-align: center;
}

.comp-summary-box span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #71829e;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.comp-summary-box strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #14213d;
  font-variant-numeric: tabular-nums;
}

.comp-summary-box small {
  display: block;
  font-size: 11px;
  color: #8c9cb3;
  margin-top: 3px;
}

@media (max-width: 760px) {
  .presidential-comparator-panel {
    padding: 16px 14px;
    margin-bottom: 18px;
    border-radius: 15px;
  }
  .comparator-head {
    flex-direction: column;
    gap: 8px;
  }
  .comparator-versus-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .comp-versus-center {
    order: 2;
    padding: 14px;
    border-radius: 12px;
    background: #f7f9fd;
    border: 1px solid #e5ebf5;
  }
  .comp-cand-lula {
    order: 1;
  }
  .comp-cand-bolsonaro {
    order: 3;
  }
  .comparator-summary-cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
