/* #region zone:desk.style.formulas — แถบเลือกสูตรเลือกหุ้นและชิประดับราคาในรายการหุ้น */
/* feature.scan_formulas: the segmented control above the watchlist rows, the formula's info lines and the chips on
   each pick. Tokens only (desk-tokens.css), so light and dark themes follow; spacing never below 8px between controls. */
.formula-bar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2, 8px);
  padding: var(--sp-2, 8px) 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  min-width: 0;
}
.formula-bar[hidden],
.formula-info[hidden] {
  display: none;
}
.formula-seg {
  width: 100%;
  height: auto;
  min-height: 32px;
}
.formula-seg .seg-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 28px;
  padding: var(--sp-1) 6px;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}
.formula-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}
.formula-info p {
  margin: 0;
  font-size: var(--u-text-xs);
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.formula-more {
  min-width: 0;
}
.formula-honesty {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: var(--u-text-xs);
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}
.formula-honesty::-webkit-details-marker {
  display: none;
}
.formula-honesty svg {
  flex-shrink: 0;
}
.formula-honesty-text {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.formula-more-label {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--accent-text);
}
.formula-more > p {
  margin-top: var(--sp-2);
}
.formula-notice {
  color: var(--muted) !important;
}
.formula-backtest {
  color: var(--faint) !important;
}
/* A pick row: the usual two lines plus a chip line spanning the row. */
.formula-row {
  height: auto;
  min-height: 56px;
  padding: var(--sp-2) 10px;
  grid-template-areas: 'logo main price' 'logo name change' 'chips chips chips';
}
.formula-chips {
  grid-area: chips;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-2);
  padding-top: var(--sp-1);
  min-width: 0;
}
.formula-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--u-radius-pill);
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  font-size: var(--u-text-xs);
  font-weight: 600;
  white-space: nowrap;
}
.formula-chip.stop {
  color: var(--danger);
  border-color: var(--down-soft);
  background: var(--down-soft);
}
.formula-chip.exit-rule {
  color: var(--muted);
}
.formula-chip.wave {
  color: var(--accent-text);
  border-color: var(--acc-ring);
  background: var(--acc-soft);
}
.sig-chip.formula-status.fresh {
  color: var(--sig-buy-fg);
  background: var(--sig-buy-bg);
  border-color: var(--sig-buy-line);
}
.sig-chip.formula-status.held {
  color: var(--sig-wait-fg);
  background: var(--sig-wait-bg);
  border-color: var(--sig-wait-line);
}
.sig-chip.formula-status.exit {
  color: var(--danger);
  background: var(--down-soft);
  border-color: var(--down-soft);
}
.wl-rail .formula-bar,
.wl-rail .formula-chips {
  display: none;
}
/* #endregion */
