/* Chart-specific styling */
.chart-wrapper {
  position: relative;
}

/* Override Chart.js defaults */
canvas {
  max-height: 100% !important;
  height: auto !important;
}

/* Custom chart legend */
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-subtle);
}

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

/* Chart containers */
.chart-container {
  position: relative;
}

.chart-container h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

/* Specific chart adjustments */
.pie-chart-container .chart-wrapper {
  height: 240px;
}

.bar-chart-container .chart-wrapper {
  height: 320px;
}

.line-chart-container .chart-wrapper {
  height: 280px;
}

/* Loading state for charts */
.chart-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-subtle);
  font-size: 14px;
}

.chart-loading .loading-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}
