/* CodeMirror's theme wrapper must fill the pane as well as the editor itself.
   Keep this in the workspace bundle so every client-side entry route gets it. */
.ws2-editor-pane > [class^="cm-theme"],
.ws2-editor-pane .cm-editor {
  height: 100% !important;
  min-height: 0;
  min-width: 0;
}

.ws2-editor-pane > [class^="cm-theme"] {
  width: 100%;
  overflow: hidden;
}

.ws2-editor-pane .cm-scroller {
  height: 100% !important;
  min-height: 0;
  min-width: 0;
}

/* A full-width content flex item plus the number gutter exceeded the viewport
   even in an empty Python document. Shrink within the gutter, and wrap code
   instead of clipping long strings. SQL keeps its horizontal navigation. */
.ws2-page-vscode .ws2-editor-pane .cm-content {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}

.ws2-page-vscode .ws2-editor-pane .cm-line {
  overflow-wrap: anywhere;
}

.ws2-page-vscode .ws2-editor-pane .cm-scroller {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: #555 #1e1e1e;
}

.ws2-theme-light .ws2-editor-pane .cm-scroller {
  scrollbar-color: #aaa #fff;
}
