/**
 * Chart Generator block styles. Scoped under .st-chart-generator; loaded only on
 * pages/editor screens that contain the block.
 */

.st-chart-generator {
  margin: 0 0 40px;
}

/* Combined heading/sub-heading (WYSIWYG, full toolbar). Style the editor's own
   tags so a title (e.g. H2) and a sub-heading (paragraph) both read well. */
.st-chart-generator__header {
  margin: 0 0 16px;
}

.st-chart-generator__header h1,
.st-chart-generator__header h2,
.st-chart-generator__header h3,
.st-chart-generator__header h4 {
  margin: 0 0 4px;
  line-height: 1.2;
  font-weight: 700;
}

.st-chart-generator__header h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.st-chart-generator__header h3 {
  font-size: clamp(18px, 2.4vw, 24px);
}

.st-chart-generator__header h4 {
  font-size: clamp(17px, 2vw, 21px);
}

.st-chart-generator__header h5 {
  font-size: clamp(15px, 1.7vw, 18px);
}

.st-chart-generator__header h6 {
  font-size: clamp(14px, 1.5vw, 16px);
}

.st-chart-generator__header p {
  margin: 0 0 4px;
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.35;
  opacity: 0.75;
}

/* Neutralise stray outer spacing inside WYSIWYG containers. */
.st-chart-generator__header > :first-child,
.st-chart-generator__footnote > :first-child {
  margin-top: 0;
}

.st-chart-generator__header > :last-child,
.st-chart-generator__footnote > :last-child {
  margin-bottom: 0;
}

.st-chart-generator__canvas {
  width: 100%;
}

.st-chart-generator__footnote {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.65;
}

/* Editor helper listing the parsed X-axis labels. */
.st-chart-generator__labels-help {
  margin: 10px 0 0;
  font-size: 12px;
  color: #50575e;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f6f7f7;
  padding: 8px 12px;
}

.st-chart-generator__labels-help summary {
  cursor: pointer;
  font-weight: 600;
}

.st-chart-generator__labels-list {
  margin-top: 8px;
  max-height: 120px;
  overflow: auto;
  line-height: 1.6;
  word-break: break-word;
}

/* Editor placeholder (shown when no valid file is uploaded yet). */
.st-chart-generator--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 40px 24px;
  border: 1px dashed #c3c4c7;
  border-radius: 10px;
  background: #f6f7f7;
  color: #50575e;
}

.st-chart-generator__ph-icon .dashicons {
  width: 40px;
  height: 40px;
  font-size: 40px;
  color: #8c8f94;
}

.st-chart-generator__ph-title {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #1d2327;
}

.st-chart-generator__ph-text {
  margin: 0;
  font-size: 13px;
}

.st-chart-generator__ph-hint {
  margin: 2px 0 0;
  font-size: 12px;
  max-width: 460px;
  opacity: 0.8;
}

.highcharts-axis-title {
  font-size: 18px !important ;
}
