@import './monaco-hover.less';

.kt-output-monaco {
  .margin,
  .monaco-editor-background {
    background-color: var(--kt-panelTitle-background) !important;
  }
}

#workbench-editor {
  .monaco-editor {
    font-size: 13px;
    // 覆盖 Monaco 搜索输入框样式
    .find-widget {
      box-shadow: rgba(0, 0, 0, 0.133) 0px 3.2px 7.2px 0px, rgba(0, 0, 0, 0.11) 0px 0.6px 1.8px 0px;
    }
    .find-widget .button {
      outline: none;
      &.codicon-widget-close {
        top: 8px;
      }
    }
    .rename-box {
      .preview {
        padding: 3px 3px 0 3px;
      }

      .rename-input {
        padding: 3px;
        outline: 1px solid;
        width: calc(100% - 6px);
        line-height: normal;
        &:focus {
          outline-color: var(--inputOption-activeBorder);
        }
      }
    }

    .find-widget .monaco-inputbox .input {
      border-width: 1px;
      border-style: solid;
      outline: none;
      color: var(--input-foreground);
      border-color: var(--input-background);
      &:focus {
        outline-color: var(--inputOption-activeBorder);
      }
      &::placeholder {
        color: var(--input-placeholderForeground);
      }
    }

    // 禁用掉 monaco editor 左侧行号的选中效果，避免在断点 context menu 时选中所有行号
    .margin-view-overlays .line-numbers {
      user-select: none;
    }

    .monaco-tl-twistie {
      box-sizing: initial !important;
    }

    .debug-hover-widget {
      position: absolute;
      z-index: 50;
      background-color: var(--vscode-editorHoverWidget-background);
      border: 1px solid var(--vscode-editorHoverWidget-border);
      color: var(--vscode-editorHoverWidget-foreground);
    }

    .decorationsOverviewRuler {
      width: 10px !important;
    }

    .monaco-scrollable-element {
      .vertical {
        .slider {
          width: 10px !important;
          left: unset !important;
          right: 0;
        }
      }

      .horizontal {
        .slider {
          height: 10px !important;
        }
      }
    }
  }
}

.split-view-container {
  .preview.inline {
    width: 100%;
    height: 100%;
  }
}

.quick-open-overlay .monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar .action-label {
  margin-right: 4px;
  margin-left: 4px;
  margin-top: 0px;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  font-size: 16px;
}

// monaco editor 内部 menu 的分割线
.monaco-action-bar.vertical .action-label.separator {
  margin-left: 0;
  margin-right: 0;
}

.monaco-editor .peekview-widget .head .peekview-title {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.context-view.monaco-menu-container {
  margin-left: 1px;
}
