/* 图表配色方案页（对齐 Admin component-chart-palette） */
.chart-palette-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-palette-scheme {
  margin-bottom: 0;
  cursor: pointer;
  background: var(--wa-color-surface);
  border: none;
  border-radius: var(--wa-radius);
  box-shadow: var(--wa-shadow-soft);
  padding: 22px 22px 18px;
}

.chart-palette-scheme-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.chart-palette-scheme-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chart-palette-scheme-actions .arco-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chart-palette-scheme-actions .arco-tag .arco-icon {
  font-size: 12px;
}

.chart-palette-scheme-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-1, #1d2129);
  line-height: 24px;
}

.chart-palette-scheme.is-old .chart-palette-scheme-title::after {
  content: '（上一版）';
  font-weight: 400;
  color: var(--color-text-3, #86909c);
  font-size: 13px;
  margin-left: 6px;
}

.chart-palette-why {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--color-text-2, #4e5969);
  line-height: 1.55;
}

.chart-palette-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.chart-palette-swatches.cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.chart-palette-swatches.cols-8 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chart-palette-swatches.cols-10 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.chart-palette-chip {
  height: 56px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.chart-palette-soft {
  height: 36px;
  border-radius: 8px;
  margin-top: 6px;
}

.chart-palette-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--color-text-3, #86909c);
  line-height: 1.4;
  word-break: break-all;
}

.chart-palette-meta b {
  display: block;
  color: var(--color-text-1, #1d2129);
  font-size: 12px;
}

/* 按色板所在容器断点（勿用 viewport：预览弹窗 iframe ≤960 会误触发 3 列） */
.chart-palette-scheme,
.chart-palette-page,
body.wa-preview-embed .wa-embed__stage:has(> .chart-palette-swatches) {
  container-type: inline-size;
  container-name: chart-palette;
}

@container chart-palette (max-width: 720px) {
  .chart-palette-swatches,
  .chart-palette-swatches.cols-6,
  .chart-palette-swatches.cols-8,
  .chart-palette-swatches.cols-10 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container chart-palette (max-width: 480px) {
  .chart-palette-swatches,
  .chart-palette-swatches.cols-6,
  .chart-palette-swatches.cols-8,
  .chart-palette-swatches.cols-10 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
