/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/
.jp-DebuggerVariables {
  display: flex;
  flex-direction: column;
  min-height: 50px;
  padding-top: 3px;
}

.jp-DebuggerVariables-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 24px;
  overflow: auto;

  /* For absolute positioning of jp-DebuggerVariables-buttons. */
  position: relative;
}

.jp-DebuggerVariables-branch {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jp-DebuggerVariables-body
  .jp-DebuggerVariables-branch
  .jp-DebuggerVariables-branch {
  grid-area: nested;
}

.jp-DebuggerVariables-body > .jp-DebuggerVariables-branch {
  padding-top: 0.1em;
}

.jp-DebuggerVariables-branch li {
  padding: 3px 0;
  cursor: pointer;
  color: var(--jp-content-font-color1);
  display: grid;
  grid-template:
    'collapser name detail'
    'nested nested nested';
  grid-template-columns: max-content max-content 1fr;
}

.jp-DebuggerVariables-branch li:not(:has(li:hover)):hover {
  background: var(--jp-layout-color2);
}

.jp-DebuggerVariables-collapser {
  width: 16px;
  grid-area: collapser;
  transform: rotate(-90deg);
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.jp-DebuggerVariables-collapser.jp-mod-expanded {
  transform: rotate(0);
}

.jp-DebuggerVariables-buttons {
  position: absolute;
  top: 0;
  right: 8px;
  margin-top: 1px;
}

.jp-DebuggerVariables-name {
  color: var(--jp-mirror-editor-attribute-color);
  grid-area: name;
}

.jp-DebuggerVariables-name::after {
  content: ':';
  margin-right: 5px;
}

.jp-DebuggerVariables-detail {
  /* detail contains value for primitive types or name of the type otherwise */
  color: var(--jp-mirror-editor-string-color);
}

.jp-DebuggerVariables-renderVariable {
  border: none;
  background: none;
  cursor: pointer;
  transform-origin: center center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 1, 1);
}

.jp-DebuggerVariables-renderVariable:active {
  transform: scale(1.35);
}

.jp-DebuggerVariables-renderVariable:hover {
  background-color: var(--jp-layout-color2);
}

.jp-DebuggerVariables-renderVariable:disabled {
  cursor: default;
}

.jp-DebuggerVariables-branch li > .jp-DebuggerVariables-branch {
  margin-left: 12px;
}

.jp-DebuggerVariables-grid {
  flex: 1 1 auto;
}

.jp-DebuggerVariables-grid .lm-DataGrid {
  border: none;
}

.jp-DebuggerVariables-colorPalette {
  visibility: hidden;
  z-index: -999;
  position: absolute;
  left: -999px;
  top: -999px;
}

.jp-DebuggerVariables-colorPalette .jp-mod-void {
  color: var(--jp-layout-color1);
}

.jp-DebuggerVariables-colorPalette .jp-mod-background {
  color: var(--jp-rendermime-table-row-background);
}

.jp-DebuggerVariables-colorPalette .jp-mod-header-background {
  color: var(--jp-layout-color2);
}

.jp-DebuggerVariables-colorPalette .jp-mod-grid-line {
  color: var(--jp-border-color3);
}

.jp-DebuggerVariables-colorPalette .jp-mod-header-grid-line {
  color: var(--jp-border-color3);
}

.jp-DebuggerVariables-colorPalette .jp-mod-selection {
  /* TODO: Fix JupyterLab light theme (alpha) so this can be a variable. */
  color: rgba(3, 169, 244, 0.2);
}

.jp-DebuggerVariables-colorPalette .jp-mod-text {
  color: var(--jp-content-font-color0);
}

.jp-VariableRendererPanel {
  overflow: auto;
}

.jp-VariableRendererPanel-renderer {
  overflow: auto;
  height: 100%;
}

.jp-VariableRenderer-TrustButton[aria-pressed='true'] {
  box-shadow: inset 0 var(--jp-border-width) 4px
    rgba(
      var(--jp-shadow-base-lightness),
      var(--jp-shadow-base-lightness),
      var(--jp-shadow-base-lightness),
      0.6
    );
}

.jp-DebuggerRichVariable div[data-mime-type='text/plain'] > pre {
  white-space: normal;
}
