/* GN Notebook Recovery Pass 3.
   Scoped to the notebook workspace.  Do not restyle DevExtreme's internal
   .dx-datagrid, .dx-scrollable-*, .dx-datagrid-rowsview or pager geometry. */
.gn-app-shell .gn-notebook-recovery {
  display: block;
  width: 100%;
  min-width: 0;
}
.gn-app-shell .gn-notebook-recovery .showRowBorder {
  display: flex;
  align-items: flex-start;
  position: relative;
  clear: both;
  box-sizing: border-box;
  min-height: 0;
  height: auto;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 12px !important;
  border: 1px solid #dce3ed !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  overflow: visible !important;  /* Bootstrap OPTIONS/ADD menus */
}
.gn-app-shell .gn-notebook-recovery .showRowBorder:hover,
.gn-app-shell .gn-notebook-recovery .showRowBorder:focus-within {
  border-color: #c9d5e5 !important;
  box-shadow: none !important;
  z-index: auto;
}
.gn-app-shell .gn-notebook-recovery .showRowBorder:has(.dropdown.show),
.gn-app-shell .gn-notebook-recovery .showRowBorder:has(.dropleft.show) {
  z-index: 30;
}
.gn-app-shell .gn-notebook-recovery .gn-notebook-content {
  position: relative;
  flex: 0 0 83.333333%;
  max-width: 83.333333%;
  min-width: 0;
}
.gn-app-shell .gn-notebook-recovery .gn-notebook-actions {
  position: relative;
  flex: 0 0 16.666667%;
  max-width: 16.666667%;
  min-width: 0;
  z-index: 2;
}
.gn-app-shell .gn-notebook-recovery .dropdown-menu {
  z-index: 1080;
  min-width: 190px;
}
.gn-app-shell .gn-notebook-recovery .chartSize {
  display: flow-root;
  height: auto !important;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.gn-app-shell .gn-notebook-recovery q-chart,
.gn-app-shell .gn-notebook-recovery q-pie-chart,
.gn-app-shell .gn-notebook-recovery q-table {
  display: block;
  min-width: 0;
  max-width: 100%;
}
/* Passes 1/2 let a DX table paint beyond its saved height.  The ONLY scroll
   container here is the notebook table host.  Paged grids are auto-height;
   their host has a maximum height derived from saved table settings. */
.gn-app-shell .gn-notebook-recovery q-table.gn-notebook-table-host {
  display: block;
  width: 100%;
  box-sizing: border-box;
  max-height: 520px; /* fallback; qTable applies per-visualization height */
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.gn-app-shell .gn-notebook-recovery .visualization-cell {
  min-width: 0;
  max-width: 100%;
  overflow: visible !important;
}
.gn-app-shell .gn-notebook-recovery .gn-notebook-visualization-header {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  height: auto;
  padding: 4px 8px;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  background: #f8fafc;
}
.gn-app-shell .gn-notebook-recovery .gn-notebook-column-description {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 22px;
}
.gn-app-shell .gn-notebook-recovery .gn-notebook-edit-action {
  flex: 0 0 auto;
  float: none !important;
  margin: 0 4px !important;
  position: relative;
  z-index: 2;
  cursor: pointer;
}
/* Keep the restored rich-text toolbar without imposing sizes on DX widgets. */
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor,
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor > .row {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  margin-left: 0;
  margin-right: 0;
}
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor .row:not(.qTextEditorUneditable) > [id^="html-editor-toolbar"] {
  position: relative !important;
  bottom: auto !important;
  order: -1;
  width: 100% !important;
  visibility: visible !important;
  z-index: 3;
  background: #fff;
}
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor .row:not(.qTextEditorUneditable) > .html-editor {
  width: 100% !important;
}
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor .qTextEditorUneditable > [id^="html-editor-toolbar"] {
  display: none !important;
}
.gn-app-shell .gn-notebook-refresh-wrap {
  position: relative;
  display: inline-block;
}
.gn-app-shell .gn-notebook-refresh-wrap .gn-notebook-refresh-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
  color: #18375a;
}
.gn-app-shell .gn-notebook-refresh-wrap .dx-button .dx-button-content {
  padding-left: 38px !important;
}

/* Notebook Pass 4: editor chrome must be borderless.  Keep the notebook
   cell's own card border and the existing toolbar actions intact. */
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor [id^="html-editor-toolbar"],
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor [id^="html-editor-toolbar"] .dx-htmleditor-toolbar,
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor [id^="html-editor-toolbar"] .dx-toolbar,
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor .html-editor,
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor .html-editor:hover,
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor .html-editor.dynamicHover,
.gn-app-shell .gn-notebook-recovery q-notebook-text-editor .html-editor .dx-htmleditor {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}
