/* ============================================================
   EPSPilot AI — Charts
   ============================================================ */

.chart-container {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.chart-container__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.chart-container__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.chart-container__controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.chart-wrapper {
  position: relative;
  width: 100%;
  max-height: 400px;
}

.chart-wrapper canvas {
  width: 100% !important;
  max-height: 400px;
}

/* Chart legend */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}

.chart-legend__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.chart-legend__color {
  width: 12px;
  height: 3px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.chart-legend__color--solid {
  height: 3px;
}

.chart-legend__color--dashed {
  height: 3px;
  background: repeating-linear-gradient(
    to right,
    currentColor 0px,
    currentColor 4px,
    transparent 4px,
    transparent 8px
  );
}

/* Chart description for accessibility */
.chart-description {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  margin-top: var(--space-3);
  line-height: var(--line-height-relaxed);
}

/* Forecast boundary annotation */
.chart-forecast-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  font-style: italic;
}
