/* ==========================================================================
   CHARTS & QUIZ STYLES - RADAR DE PROPOSTAS
   ========================================================================== */

/* Macroeconomic Section */
.macro-dashboard {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.macro-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.chart-tabs-group {
  display: inline-flex;
  background: var(--bg-tertiary);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.chart-tab-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.chart-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.chart-candidates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.cand-chart-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition-fast);
}

.cand-chart-box:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.cand-chart-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.cand-chart-title {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cand-chart-total {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.chart-svg-container {
  width: 220px;
  height: 220px;
  margin: 0.5rem auto 1.5rem auto;
  position: relative;
}

.chart-svg-container svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-pie-slice {
  cursor: pointer;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  transform-origin: 110px 110px;
}

.chart-pie-slice:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.chart-legend-list {
  width: 100%;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chart-legend-item:hover {
  border-color: var(--border-medium);
  transform: translateX(2px);
}

.chart-legend-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chart-legend-stats {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.macro-chart-footnote {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
  background: var(--bg-tertiary);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--c-br-blue);
}

/* ==========================================================================
   QUIZ - BÚSSOLA CIDADÃ (SIMULADOR DE AFINIDADE)
   ========================================================================== */

.quiz-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.quiz-progress-bar-wrapper {
  margin-bottom: 2rem;
}

.quiz-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.quiz-progress-track {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #15803d, #0284c7);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
}

.quiz-question-box {
  margin-bottom: 2rem;
}

.quiz-question-category {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c-br-blue);
  margin-bottom: 0.75rem;
}

.quiz-question-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-option-card {
  padding: 1.25rem 1.5rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
}

.quiz-option-card:hover {
  border-color: var(--c-br-blue);
  background: var(--bg-card);
  transform: translateY(-2px);
}

.quiz-option-card.selected {
  border-color: var(--c-br-blue);
  background: rgba(2, 132, 199, 0.08);
}

.quiz-option-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-medium);
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-option-card.selected .quiz-option-radio {
  border-color: var(--c-br-blue);
  background: var(--c-br-blue);
}

.quiz-option-card.selected .quiz-option-radio::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
}

.quiz-option-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}

.quiz-navigation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.btn-quiz-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.btn-quiz-prev {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.btn-quiz-prev:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.btn-quiz-next {
  background: var(--c-br-blue);
  color: #ffffff;
}

.btn-quiz-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-quiz-next:not(:disabled):hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* Quiz Result View */
.quiz-result-view {
  text-align: center;
  padding: 1rem 0;
}

.quiz-result-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.quiz-result-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2rem auto;
}

.affinity-meters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 680px;
  margin: 0 auto 2.5rem auto;
}

@media (max-width: 560px) {
  .affinity-meters-grid {
    grid-template-columns: 1fr;
  }
}

.affinity-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.affinity-card.lula {
  border-top: 4px solid var(--c-lula);
}

.affinity-card.bolsonaro {
  border-top: 4px solid var(--c-bolsonaro);
}

.affinity-percentage {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin: 0.5rem 0;
}

.affinity-card.lula .affinity-percentage {
  color: var(--c-lula);
}

.affinity-card.bolsonaro .affinity-percentage {
  color: var(--c-bolsonaro);
}

.affinity-label {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.btn-quiz-restart {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--border-medium);
  transition: all var(--transition-fast);
}

.btn-quiz-restart:hover {
  background: var(--border-light);
}

/* ==========================================================================
   TERMÔMETRO DE DEPENDÊNCIA DO CONGRESSO (% DECRETO VS. % PEC)
   ========================================================================== */

.congress-thermometer-box {
  margin: 2rem 0 1rem;
  padding: 1.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.congress-thermometer-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.thermometer-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[data-theme="dark"] .thermometer-badge {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.35);
}

.thermometer-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.thermometer-intro {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.congress-bars-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.congress-cand-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.congress-cand-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.congress-cand-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.congress-cand-total {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.congress-stacked-bar {
  display: flex;
  width: 100%;
  height: 38px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-tertiary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.5rem;
  transition: all var(--transition-normal);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.bar-segment.seg-decreto {
  background: #10b981;
}

.bar-segment.seg-lei {
  background: #f59e0b;
}

.bar-segment.seg-pec {
  background: #8b5cf6;
}

.bar-segment:hover {
  filter: brightness(1.1);
  transform: scaleY(1.04);
}

/* Legenda do Termômetro */
.congress-legend-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding: 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.c-leg-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.c-leg-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-top: 3px;
  flex-shrink: 0;
}

.c-leg-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.825rem;
}

.c-leg-text strong {
  color: var(--text-primary);
  font-weight: 700;
}

.c-leg-text span {
  color: var(--text-muted);
  font-size: 0.775rem;
  line-height: 1.4;
}

/* Insights de Viabilidade Institucional */
.congress-insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .congress-insights-grid {
    grid-template-columns: 1fr;
  }
}

.c-insight-card {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.c-insight-card.lula {
  border-left: 4px solid var(--c-lula);
}

.c-insight-card.bolsonaro {
  border-left: 4px solid var(--c-bolsonaro);
}

.insight-badge {
  font-size: 0.725rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.insight-badge.lula {
  background: rgba(197, 48, 48, 0.12);
  color: var(--c-lula);
}

.insight-badge.bolsonaro {
  background: rgba(43, 108, 176, 0.12);
  color: var(--c-bolsonaro);
}

.c-insight-card h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.c-insight-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

