/* The data grid (db/grid.js DbGrid) – the Database editor's tables and Data analysis's data viewer */
.dbg { display: flex; flex-direction: column; height: 100%; position: relative; font-size: 13px; }
.dbg-head { flex: none; display: flex; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--panel); user-select: none; }
.dbg-lead { flex: none; width: 46px; cursor: pointer; }
.dbg-h { flex: none; position: relative; display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; border-right: 1px solid var(--line-soft); font-weight: 600; cursor: pointer; overflow: hidden; white-space: nowrap; }
.dbg-h:hover { background: var(--line-soft); }
.dbg-h.num { justify-content: flex-end; }
.dbg-hn { overflow: hidden; text-overflow: ellipsis; }
.dbg-ht { color: var(--muted); font-weight: 400; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.dbg-key { font-size: 14px; color: var(--warn); }
.dbg-key.fk { color: var(--prog); }
.dbg-sort { font-size: 15px; color: var(--prog); }
.dbg-rz { position: absolute; right: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 2; }
.dbg-hfill { flex: 1; }
.dbg-body { flex: 1; min-height: 0; overflow: auto; position: relative; outline: none; }
.dbg-space { position: relative; }
.dbg-rows { position: absolute; left: 0; top: 0; }
.dbg-r { position: absolute; left: 0; display: flex; height: 28px; align-items: stretch; white-space: nowrap; }
.dbg-r.odd { background: var(--row-alt); }
.dbg-r.sel { background: var(--prog-soft); }
.dbg-n { flex: none; width: 46px; padding: 0 8px; display: flex; align-items: center; justify-content: flex-end; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; border-right: 1px solid var(--line-soft); background: var(--panel); position: sticky; left: 0; z-index: 1; cursor: pointer; }
.dbg-c { flex: none; position: relative; padding: 0 8px; display: flex; align-items: center; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); cursor: default; }
.dbg-c.num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.dbg-c.nul { color: var(--muted); font-style: italic; font-size: 12px; }
.dbg-c.blob { color: var(--info); font-size: 12px; }
.dbg-c.json { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.dbg-c.cur { box-shadow: inset 0 0 0 2px var(--prog); }
/* Find (and replace)'s matches (db/findreplace.js), the one it's at stronger */
.dbg-c.find { background: var(--find-hl); }
.dbg-c.find-cur { background: var(--find-cur); }
.dbg-c.has-link { padding-right: 22px; }
.dbg-link { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--prog); background: var(--surface); border-radius: var(--radius-xs); cursor: pointer; opacity: .75; }
.dbg-link:hover { opacity: 1; }
.dbg-more { color: var(--muted); padding-left: 56px; align-items: center; font-style: italic; }
.dbg-empty .dbg-empty-act { pointer-events: auto; padding: 0 2px; font-size: inherit; }
.dbg-empty { width: max-content; max-width: 90%; }
.dbg-empty { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); color: var(--muted); font-size: 14px; pointer-events: none; text-align: center; }
.dbg-edit { position: absolute; z-index: 5; height: 28px; padding: 3px 7px; border: 2px solid var(--prog); border-radius: var(--radius-xs); font: inherit; background: var(--surface); color: var(--text); box-shadow: var(--pop-shadow); outline: none; resize: both; }
.dbg-tr .dbg-tlead { position: sticky; left: 0; z-index: 2; flex: none; width: 210px; height: 32px; display: flex; align-items: center; padding: 0 10px; background: var(--panel); border-right: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text-2); }
.dbg-strip { position: relative; flex: none; height: 32px; }
.dbg-th { position: absolute; top: 0; left: 0; height: 32px; display: flex; align-items: center; padding: 0 10px; border-right: 1px solid var(--line-soft); font-weight: 600; white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; }
.dbg-th:hover { background: var(--line-soft); }
.dbg-th.sel { background: var(--prog-soft); color: var(--prog-strong); }
.dbg-th.dbg-more { font-weight: 400; font-style: italic; color: var(--muted); cursor: default; }
.dbg-n.dbg-cn { justify-content: flex-start; gap: 4px; padding: 0 10px; color: var(--text); font-size: 13px; border-bottom: 1px solid var(--line-soft); overflow: hidden; white-space: nowrap; }
.dbg-cn .dbg-hn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.dbg-cn .dbg-ht { flex: none; }
.dbg-gap { flex: none; }
.dbg-tr .dbg-c.sel { background: var(--prog-soft); }
.dbg-tr .dbg-c.num { justify-content: flex-start; }
.dbg-null { position: absolute; z-index: 5; height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); color: var(--text-2); font: 600 11px/1 inherit; cursor: pointer; }
