/* What an ERD is built on and its table selector (COMMAND-992, public/chart-inherit; built without a design: POC): two
   buttons in the chart page's bar, and two popups on the popup look of public/chart-fields (chart-popup). */
.chart-base-btn, .chart-tables-btn { flex: none; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-base-btn .chart-built-on { color: inherit; }
.chart-inherit-group + .chart-inherit-group { margin-top: 10px; }
.chart-inherit-chart { margin: 4px 10px; color: var(--muted); font-weight: 600; text-transform: none; }
.chart-inherit-table.off .chart-pick-name { color: var(--muted); text-decoration: line-through; }
.chart-inherit-switch {
  position: relative; flex: none; width: 34px; height: 20px; border-radius: 10px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border, rgb(0 0 0 / 15%));
}
.chart-inherit-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / 30%); transition: left 0.15s;
}
.chart-inherit-switch.on { background: var(--accent, #2f7d4f); }
.chart-inherit-switch.on::after { left: 16px; }
.chart-inherit-state { flex: none; min-width: 2.5em; text-align: right; }
.chart-inherit-table[disabled] { cursor: default; opacity: 0.75; }
/* The upgrade popup (COMMAND-1146): what a newer release of the original changes, a choice per removed table the fork
   uses, and that it cannot be undone. The "release N available" chip in the bar opens it. */
button.chart-release-new { border: 0; cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 600; }
.chart-upgrade-body { display: grid; gap: 12px; }
.chart-upgrade-part h3 { margin: 0 0 4px; color: var(--muted); font-weight: 600; }
.chart-upgrade-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.chart-upgrade-fields { margin: 2px 0 0 14px; padding: 0; list-style: none; }
.chart-upgrade-field-added { color: var(--accent, #2f7d4f); }
.chart-upgrade-field-removed { color: var(--danger); }
.chart-upgrade-removed .chart-upgrade-table > strong { text-decoration: line-through; }
.chart-upgrade-warn, .chart-upgrade-final { margin: 4px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--text, inherit); }
.chart-upgrade-warn p { margin: 0 0 6px; color: var(--warn); font-weight: 600; }
.chart-upgrade-choice { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; cursor: pointer; }
.chart-upgrade-choice-label { font-weight: 600; }
.chart-upgrade-no-import { margin: 0 0 4px 24px; color: var(--muted); }
.chart-upgrade-clash { padding: 8px 10px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); }
.chart-upgrade-target select { width: auto; display: inline-block; }
