/*! =============================================================================
 *  © 2026 Renzo Núñez · RonBStudio — "Perú Elige 2026 · Segunda Vuelta".
 *  Código propietario. https://www.ronbstudio.com
 * ============================================================================= */
/* =============================================================================
 *  brecha-historica.css — cuadro comparativo de brechas 2016/2021/2026.
 *  Lenguaje "Manto Vivo": tarjeta blanca, título serif, barras redondeadas.
 *  v0.1.16.167
 * ===========================================================================*/

.brechahist-section {
  padding: 0 1rem;
}

.bhist {
  max-width: 760px;
  margin: 1.4rem auto 0;
  background: var(--c-mv-bg-card, #fff);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 1.25rem 1.4rem 1.1rem;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}

.bhist__head { margin-bottom: 1.05rem; }

.bhist__title {
  margin: 0;
  font-family: var(--font-serif, Georgia, "Times New Roman", serif);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.18;
  color: var(--c-mv-ink, #1e293b);
}

.bhist__sub {
  margin: 0.32rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--c-mv-ink-soft, #64748b);
}

.bhist__bars {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.bhist__rowtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.32rem;
}

.bhist__label {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.86rem;
}

.bhist__matchup { color: var(--c-mv-ink, #1e293b); font-weight: 700; }

.bhist__anio {
  color: var(--c-mv-ink-soft, #64748b);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.bhist__live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--c-party-fp, #f37021);
}

.bhist__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-party-fp, #f37021);
  animation: bhistPulse 1.6s ease-out infinite;
}

.bhist__val {
  font-family: var(--font-mono, ui-monospace, "SF Mono", monospace);
  font-weight: 800;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  color: var(--c-mv-ink, #1e293b);
  white-space: nowrap;
}

.bhist__track {
  height: 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.bhist__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.bhist__note {
  margin: 1rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  font-size: 0.62rem;
  line-height: 1.5;
  color: var(--c-mv-ink-soft, #64748b);
}

@keyframes bhistPulse {
  0%   { box-shadow: 0 0 0 0 rgba(243, 112, 33, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(243, 112, 33, 0); }
  100% { box-shadow: 0 0 0 0 rgba(243, 112, 33, 0); }
}

/* Ranking 1/2/3 + efecto "lava" del bar en vivo (v0.1.16.168) */
.bhist__lblwrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.bhist__rank {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.07);
  color: var(--c-mv-ink-muted, #475569);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-weight: 800;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.bhist__fill--live {
  background: linear-gradient(100deg, #f37021 0%, #ff9b3d 22%, #ef5f14 45%, #ff8a33 68%, #f37021 100%);
  background-size: 220% 100%;
  /* lava (flujo del gradiente) + latido (glow/brillo pulsantes) en simultáneo */
  animation: bhistLava 2.8s ease-in-out infinite, bhistLatido 1.4s ease-in-out infinite;
}

@keyframes bhistLava {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Latido CONSTANTE: el glow se expande/contrae y el brillo sube/baja al ritmo,
   para que la barra en vivo "lata" y se distinga claramente de las históricas. */
@keyframes bhistLatido {
  0%, 100% { box-shadow: 0 0 5px rgba(243, 112, 33, 0.40); filter: brightness(0.97); }
  50%      { box-shadow: 0 0 20px 2px rgba(243, 112, 33, 0.92); filter: brightness(1.16); }
}

@media (prefers-reduced-motion: reduce) {
  .bhist__fill { transition: none; }
  .bhist__live-dot { animation: none; }
  .bhist__fill--live { animation: none; }
}
