/* TerraLab — global CSS overrides for Superset 6.x.
 * Issue: infrastructure/k8s-fluxcd#49 — embedded iframe horizontal scrollbar regression.
 * This rule overrides per-dashboard `dashboards.css` ad-hoc patches; new dashboards
 * inherit the fix automatically.
 */
html, body {
  overflow-x: hidden !important;
}
.dashboard,
.dashboard-content,
.grid-container {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Embedded dashboards: the chart header "..." (kebab / More Options) control —
 * which holds the CSV/Excel/image export actions — renders and stays clickable
 * but is pushed off the visible right edge of the chart card, so users can't see
 * it. ROOT CAUSE (measured in a headless embed harness): the chart card
 * `.dashboard-component-chart-holder` ships `width:<slot>px; padding:16px;
 * box-sizing:content-box`, so its real box is 32px (2×16) WIDER than its grid
 * slot and overflows on the right by 32px. The right-aligned header controls sit
 * at that overflowed edge, and our `overflow-x:hidden` (the #49 fix above) clips
 * them. Wider charts overflow more, so a fixed margin can't fix it — switch the
 * card to border-box so width includes its padding and the box fits its slot
 * (overflow 32px→0). Verified: kebab gains a stable ~36px clearance from the
 * visible edge at viewport widths 760/1000/1300, clearing any vertical scrollbar.
 * The small margin-right is kept as extra scrollbar headroom.
 * NB: do NOT scope via [data-test=...] — babel-plugin-jsx-remove-data-test-id
 * strips data-test from the production build, so such a selector matches nothing.
 */
.dashboard-component-chart-holder {
  box-sizing: border-box;
}
.header-controls {
  margin-right: 20px;
}
