/* #region zone:desk.vol-forecast.style — แถบสถิติหัวหุ้น */
.symbol-stats {
  display: grid;
  /* A short landscape card squeezed the strip to 33px and clipped its cells under the toolbar. */
  flex: none;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  grid-auto-rows: 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  /* Cells draw dividers outward (right, bottom); the outer ones fall outside and are clipped, so only inner lines show.
     The strip's own top/bottom borders run the full width on both sides. */
  overflow: hidden;
}
.chart-card {
  container-type: inline-size;
}
/* Avoid a partial row when six readings cannot all fit at their 150px minimum. */
@container (min-width: 450px) and (max-width: 899px) {
  .symbol-stats[data-count='6'] {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}
@container (min-width: 450px) and (max-width: 599px) {
  .symbol-stats[data-count='4'] {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}
@container (min-width: 300px) and (max-width: 749px) {
  .symbol-stats[data-count='5'] {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
  .symbol-stats[data-count='5'] > :nth-last-child(1 of :not([hidden])) {
    grid-column: 1 / -1;
  }
}
@container (min-width: 300px) and (max-width: 449px) {
  .symbol-stats[data-count='3'] > :nth-last-child(1 of :not([hidden])) {
    grid-column: 1 / -1;
  }
}
.symbol-stats[hidden],
.symbol-stat[hidden] {
  display: none;
}
.symbol-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: var(--sp-2) var(--sp-3);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow:
    1px 0 var(--line),
    0 1px var(--line);
  font-family: inherit;
  text-align: start;
  color: var(--text);
}
.symbol-stat:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
button.symbol-stat {
  cursor: pointer;
}
.stat-label {
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.4;
}
/* The Lucide info icon (a text ⓘ rendered with an odd fallback font on some systems). */
.stat-info {
  display: inline-flex;
  vertical-align: -2px;
  margin-inline-start: var(--sp-1);
  width: 12px;
  height: 12px;
  background: var(--muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.stat-value {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-lg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.symbol-stat:is(
    .buy,
    .watch,
    .risk-hold,
    .risk-caution,
    .risk-exit,
    .macro-up,
    .macro-down,
    .macro-rate,
    .macro-flat
  )
  .stat-value::before,
#sym-data .stat-value::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: var(--r-pill);
  background: currentColor;
}
.symbol-stat:is(.buy, .risk-hold, .macro-up) .stat-value {
  color: var(--up-text);
}
.symbol-stat.watch .stat-value {
  color: var(--sig-wait-fg);
}
.symbol-stat:is(.risk-caution, .macro-rate) .stat-value,
#sym-data .stat-value {
  color: var(--amber);
}
.symbol-stat:is(.risk-exit, .macro-down) .stat-value {
  color: var(--down-text);
}
.symbol-stat.macro-flat .stat-value {
  color: var(--muted);
}
@media (max-width: 599px) {
  .symbol-header,
  :root[data-board] .symbol-header {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: none;
  }
  .sym-price-wrap {
    grid-column: 1 / -1;
    justify-self: end;
  }
}
/* #endregion */

/* #region zone:desk.style.stat-dividers — เส้นกั้นสถิติ */
.symbol-stats > .symbol-stat { position: relative; }
.symbol-stats > .symbol-stat.stat-has-divider::before {
  content: '';
  position: absolute;
  inset-block: var(--sp-2);
  left: calc(var(--sp-2) / -2);
  width: 1px;
  background: var(--line);
  pointer-events: none;
}
/* #endregion */
