/* Charts (js/charts.js): the Insert Chart dialog and the data sheet. */
.upf-dialog.uch-insert { width: min(760px, 96vw); }
.uch-insert-body { display: flex; gap: 14px; padding: 0 20px; min-height: 300px; }
.uch-types { display: flex; flex-direction: column; gap: 2px; width: 180px; flex: none; max-height: 52vh; overflow: auto; }
.uch-types button { height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--ui-ink, #1d1d1f); text-align: left; font: inherit; cursor: pointer; }
.uch-types button:hover { background: var(--ui-hover, rgba(0, 122, 255, .08)); }
.uch-types button[aria-selected="true"] { background: var(--ui-accent, #007aff); color: var(--ui-accent-ink, #fff); }
.uch-preview { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; border: .5px solid var(--ui-line, #c8c8cc); border-radius: 9px; background: #fff; overflow: hidden; }
.uch-preview svg { max-width: 100%; height: auto; }
.upf-dialog.uch-sheet { width: min(900px, 96vw); }
.uch-sheet-body { display: flex; gap: 14px; padding: 0 20px; }
.uch-grid-wrap { flex: 1; min-width: 0; max-height: 46vh; overflow: auto; border: .5px solid var(--ui-line, #c8c8cc); border-radius: 8px; }
.uch-grid { border-collapse: collapse; }
.uch-grid td { padding: 0; border: .5px solid var(--ui-line, #d9d9d9); }
.uch-grid input { width: 92px; height: 26px; padding: 0 6px; border: 0; background: transparent; font: inherit; color: var(--ui-ink, #1d1d1f); }
.uch-grid tr:first-child input, .uch-grid td:first-child input { font-weight: 600; background: var(--ui-surface-2, #f5f5f7); }
.uch-grid input:focus { outline: 2px solid var(--ui-accent, #007aff); outline-offset: -2px; }
.uch-sheet .uch-preview { flex: none; width: 360px; height: 216px; }
@media (max-width: 760px) { .uch-sheet-body, .uch-insert-body { flex-direction: column; } .uch-sheet .uch-preview { width: 100%; } .uch-types { width: auto; max-height: 160px; } }
