@import '../../../styles';

.jse-tree-mode {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--jse-background-color);
  min-width: 0;
  min-height: 0;
  font-family: var(--jse-font-family-mono);
  font-size: var(--jse-font-size-mono);
  color: var(--jse-text-color);
  line-height: var(--jse-line-height);

  .jse-hidden-input-label {
    position: fixed;
    right: 0;
    top: 0;
    width: 0;
    height: 0;

    .jse-hidden-input {
      width: 0;
      height: 0;
      padding: 0;
      border: 0;
      outline: none;
    }
  }

  .jse-search-box-container {
    position: relative;
    height: 0;
    top: $padding;
    margin-right: calc(var(--jse-padding) + 20px);
    margin-left: $padding;
    text-align: right;
    z-index: 3; // must be above the ContextMenuButton
  }

  &.no-main-menu {
    border-top: var(--jse-main-border);
  }

  .jse-contents {
    border-left: var(--jse-main-border);
    border-right: var(--jse-main-border);

    &:last-child {
      border-bottom: var(--jse-main-border);
    }

    flex: 1;
    overflow: auto;
    position: relative;
    padding: $contents-padding;
    display: flex;
    flex-direction: column;

    .jse-loading-space {
      flex: 1;
    }

    .jse-loading {
      flex: 2;
      text-align: center;
      color: var(--jse-panel-color-readonly);
      box-sizing: border-box;
      font-family: var(--jse-font-family);
      font-size: var(--jse-font-size);
    }
  }

  .jse-preview {
    flex: 1;
    color: var(--jse-panel-color-readonly);
    overflow: auto;
    white-space: pre-wrap;
    padding: 2px;
  }
}
