﻿/* Estilos Pantalla de Proyección y Resultados en Vivo (Live) */

.live-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* Header Live */
.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 28px;
  margin-bottom: 24px;
}

.live-title-box {
  display: flex;
  align-items: center;
  gap: 18px;
}

.live-title-box img {
  height: 52px;
  width: auto;
}

.live-title-text h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.live-title-text p {
  font-size: 0.85rem;
  color: var(--ist-gold-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.live-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.election-switch {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.switch-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.switch-btn.active {
  background: var(--ist-navy-700);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.live-clock {
  font-family: 'Outfit', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ist-gold-400);
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* 1. Tarjetas de Métricas Principales */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.metric-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--ist-gold-500);
}

.metric-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.15);
  color: var(--ist-gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.metric-content h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.metric-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

/* 2. Barra de Participación por Grado */
.grades-participation-panel {
  padding: 24px 28px;
  margin-bottom: 32px;
}

.section-headline {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.grade-progress-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.grade-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ist-blue-500), var(--ist-gold-500));
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.grade-box-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 3. Categorías y Gráficos de Resultados */
.results-category-card {
  padding: 28px;
  margin-bottom: 36px;
}

.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.cat-header h2 {
  font-size: 1.4rem;
  color: #fff;
}

.chart-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 900px) {
  .chart-layout {
    grid-template-columns: 1fr;
  }
}

.candidate-bars-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.candidate-bar-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: all 0.3s ease;
}

.candidate-bar-item.winner-leader {
  border-color: var(--ist-gold-500);
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.candidate-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.candidate-bar-header .cand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.candidate-bar-header .cand-votes {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ist-gold-400);
}

.cand-bar-track {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cand-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
