.trend-chart-wrap {
  position: relative;
  width: 100%;
  min-height: var(--trend-h, 180px);
}

.trend-chart-canvas {
  width: 100%;
  height: var(--trend-h, 180px);
}

.trend-chart-wrap.is-tall {
  --trend-h: 220px;
}

.trend-chart-wrap.is-note-series {
  --trend-h: 280px;
}

.trend-chart-skeleton {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
  background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 50%, #f8fafc 100%);
  background-size: 200% 100%;
  animation: trend-chart-shimmer 1.2s ease-in-out infinite;
  border-radius: 6px;
  z-index: 1;
}

.trend-chart-skeleton.is-error {
  animation: none;
  background: #fef2f2;
  color: #dc2626;
  cursor: pointer;
}

.trend-chart-skeleton.is-error:hover {
  background: #fee2e2;
}

.trend-chart-wrap.is-ready .trend-chart-skeleton {
  display: none;
}

.trend-chart-legend {
  font-size: 11px;
  margin-bottom: 6px;
  line-height: 1.6;
}

.trend-chart-legend-item {
  margin-right: 12px;
  white-space: nowrap;
}

@keyframes trend-chart-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.kmd-interact-chart-wrap .trend-chart-wrap {
  margin-top: 4px;
}

.kmd-interact-chart-wrap .trend-chart-legend {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

.kmd-interact-legend-hint {
  margin-left: 8px;
  color: #94a3b8;
  font-size: 11px;
}
