/* =========================================================
   WAR Group — Charts System (SVG & CSS)
   ========================================================= */

.chart-container {
  width: 100%;
  height: 280px;
  margin-top: 48px;
  margin-bottom: 48px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  box-shadow: var(--hud-glow);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Axis Lines */
.chart-axis {
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1;
  stroke-dasharray: 4, 4;
}

/* Bars */
.chart-bar {
  opacity: 1;
  filter: drop-shadow(0 0 15px rgba(0, 150, 138, 0.3));
  transition: opacity 0.3s;
}

.chart-bar--highlight {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(0, 150, 138, 0.6));
}

.chart-bar:hover {
  opacity: 0.9;
  filter: drop-shadow(0 0 12px rgba(0, 150, 138, 0.8));
}

/* Labels & Values */
.chart-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  fill: var(--silver);
  text-anchor: middle;
  letter-spacing: 0.5px;
}

.chart-value {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  fill: var(--white);
  text-anchor: middle;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s 0.2s, transform 0.3s 0.2s;
}

.chart-container.revealed .chart-value {
  opacity: 1;
  transform: translateY(0);
}

/* Legends */
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  position: absolute;
  bottom: 24px;
  left: 0;
  width: 100%;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--silver);
  font-weight: 500;
}

.chart-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.chart-legend-color--main { background: var(--gradient-teal); }
.chart-legend-color--highlight { background: var(--teal-light); box-shadow: 0 0 8px rgba(0, 150, 138, 0.5); }
.chart-legend-color--secondary { background: rgba(166, 169, 170, 0.3); }

/* SVG Gradients (defined via JS but styles can fallback) */
.chart-bar--secondary {
  stroke: rgba(166, 169, 170, 0.4);
  stroke-width: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .chart-container {
    height: 220px;
    padding: 16px;
  }
  
  .chart-label {
    font-size: 9px;
  }
  
  .chart-value {
    font-size: 10px;
  }
}
