/* The November 11 dashboard draws a second pair of labels over the chart header. */
.chart-grid:has(> div > [data-testid="market-chart-status"]) > div.hidden.absolute.top-4.left-4.gap-2 {
  display: none;
}

/* Leave room for the toolbar, the price canvas, and each visible indicator panel. */
:is(.chart-grid, .bh-chart-panel):has(> div > [data-testid="market-chart-status"]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: auto;
  min-height: 420px;
}

.chart-grid:has(> div > [data-testid="market-chart-status"]) {
  min-height: 520px;
}

:is(.chart-grid, .bh-chart-panel) > div:has(> [data-testid="market-chart-status"]) {
  height: auto;
  min-height: 0;
}

.bh-chart-toolbar + div {
  min-height: 280px;
}

.bh-chart-toolbar {
  position: relative;
  display: flex;
  flex-flow: row wrap;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  height: auto;
}

.bh-chart-market-controls > :first-child,
.bh-chart-market-controls > :first-child > button {
  max-width: 100%;
  height: auto;
}

.bh-chart-indicators {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  margin-inline-start: auto;
}

.bh-chart-indicators > :last-child {
  flex-wrap: wrap;
  min-width: 0;
}

.bh-chart-timeframes {
  order: 1;
  flex: 0 1 100%;
  min-width: 0;
}

/* Anchor the open menu to the toolbar so wraps cannot clip it. */
.bh-chart-indicators > :first-child {
  position: static;
}

.bh-chart-indicators > :first-child > .absolute {
  inset-inline: auto 8px;
  max-width: calc(100% - 16px);
}
