/* curve.fit data grid. Geometry matches the Handsontable 0.16 table it
   replaced: 32px header, 30px rows, #ccc grid lines, the same selection
   colours and 5px fill handle. Page-specific column shading lives in
   workspace.css. */
.cf-grid { position: relative; overflow: hidden; }
.cf-grid [hidden] { display: none !important; }
.cf-grid-viewport { position: absolute; inset: 0; overflow: auto; }
.cf-grid-canvas { position: relative; width: 100%; }
.cf-grid-table {
  position: absolute; left: 0; top: 0; width: 100%;
  table-layout: fixed; border-collapse: separate; border-spacing: 0;
  line-height: 21px; color: inherit; font: inherit;
}
.cf-grid-table th, .cf-grid-table td {
  box-sizing: border-box; overflow: hidden; white-space: nowrap; text-align: center; vertical-align: top;
  border: 0 solid #ccc; border-right-width: 1px; line-height: 21px;
}
.cf-grid-table th:first-child, .cf-grid-table td:first-child { border-left-width: 1px; }
.cf-grid-table th {
  position: sticky; top: 0; z-index: 4; height: 32px; padding: 2px 4px 0;
  border-top-width: 1px; background: #ededed; font-weight: 650; cursor: default;
  -webkit-user-select: none; user-select: none;
}
.cf-grid-table td {
  height: 30px; padding: 3px 6px; border-bottom-width: 1px; background: #fff;
  text-overflow: ellipsis;
}
.cf-grid-table .cf-grid-first-row td { border-top-width: 1px; }
.cf-grid-table td.cf-grid-selected { background: #d6e7ff; }

.cf-grid-area, .cf-grid-active, .cf-grid-fill-preview { position: absolute; box-sizing: border-box; pointer-events: none; }
.cf-grid-area { z-index: 1; border: 1px solid #89aff9; }
.cf-grid-active { z-index: 2; border: 2px solid #5292f7; }
.cf-grid-fill-preview { z-index: 2; border: 1px dashed #5292f7; }
.cf-grid-fill { position: absolute; z-index: 3; width: 5px; height: 5px; background: #5292f7; cursor: crosshair; }
.cf-grid-fill.cf-grid-fill-area { background: #89aff9; }
.cf-grid-fill::before { content: ""; position: absolute; inset: -4px; }
.cf-grid-readonly .cf-grid-fill { display: none; }

/* The editor is always focused and positioned on the active cell; it is only
   painted while a value is being edited. */
.cf-grid textarea.cf-grid-input {
  position: absolute; z-index: 3; box-sizing: border-box; display: block;
  width: 0; height: 0; min-width: 0; min-height: 0; margin: 0; border: 0; border-radius: 0;
  padding: 4px 7px 0; font: inherit; line-height: 21px; letter-spacing: normal;
  text-align: center; white-space: nowrap; overflow: hidden; resize: none;
  background: transparent; color: transparent; caret-color: transparent;
  box-shadow: none; pointer-events: none;
}
.cf-grid textarea.cf-grid-input::selection { background: transparent; }
.cf-grid textarea.cf-grid-input:focus, .cf-grid textarea.cf-grid-input:focus-visible { outline: none !important; }
.cf-grid.cf-grid-editing textarea.cf-grid-input {
  background: #fff; color: inherit; caret-color: auto; pointer-events: auto;
  box-shadow: inset 0 0 0 2px #5292f7;
}
.cf-grid.cf-grid-editing textarea.cf-grid-input::selection { background: #b3d4fc; }

.cf-grid-menu {
  position: fixed; z-index: 1000; min-width: 220px; padding: 4px 0; box-sizing: border-box;
  border: 1px solid #bbb; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  font: 500 16px/21px var(--cf-ui-font, "Open Sans", sans-serif); color: var(--cf-ink, #17212c);
}
.cf-grid-menu-item { padding: 4px 16px; cursor: pointer; white-space: nowrap; outline: none; }
.cf-grid-menu-item:hover, .cf-grid-menu-keyboard .cf-grid-menu-item:focus { background: #edf3fd; }
.cf-grid-menu-item[aria-disabled="true"] { color: #999; cursor: default; background: none; }

.cf-grid-live {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
