/**
 * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
 * SPDX-License-Identifier: MIT
 */

.gedit-m-json-schema-editor-container {
  /* & .semi-input {
    background-color: #fff;
    border-radius: 6px;
    height: 24px;
  } */
}

.gedit-m-json-schema-editor-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gedit-m-json-schema-editor-collapse-trigger {
  cursor: pointer;
  margin-right: 5px;
}

.gedit-m-json-schema-editor-expand-detail {
  display: flex;
  flex-direction: column;
}

.gedit-m-json-schema-editor-label {
  font-size: 12px;
  color: #999;
  font-weight: 400;
  margin-bottom: 2px;
}

.gedit-m-json-schema-editor-tree-items {
  display: grid;
  grid-template-columns: auto 1fr;
}

.gedit-m-json-schema-editor-tree-items.shrink {
  padding-left: 3px;
  margin-top: 10px;
}

.gedit-m-json-schema-editor-tree-item-left {
  grid-column: 1;
  position: relative;
  width: 16px;
}

.gedit-m-json-schema-editor-tree-item-left.show-line::before {
  /* 竖线 */
  content: "";
  height: var(--line-height, 100%);
  position: absolute;
  left: -14px;
  top: -16px;
  width: 1px;
  background: #d9d9d9;
  display: block;
}

.gedit-m-json-schema-editor-tree-item-left.show-line::after {
  /* 横线 */
  content: "";
  position: absolute;
  left: -14px; /* 横线起点和竖线对齐 */
  top: 8px; /* 跟随你的行高调整 */
  width: var(--line-width, 30px); /* 横线长度 */
  height: 1px;
  background: #d9d9d9;
  display: block;
}

.gedit-m-json-schema-editor-tree-item-left.show-line.is-last::before {
  height: 24px;
}

.gedit-m-json-schema-editor-tree-item-left.show-line.show-collapse::after {
  width: 12px;
}

.gedit-m-json-schema-editor-tree-item-right {
  grid-column: 2;
  margin-bottom: 10px;

  &:last-child {
    margin-bottom: 0px;
  }
}

.gedit-m-json-schema-editor-tree-item-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.gedit-m-json-schema-editor-collapsible {
  display: none;
}

.gedit-m-json-schema-editor-collapsible.collapse {
  display: block;
}

.gedit-m-json-schema-editor-name {
  flex-grow: 1;
}

.gedit-m-json-schema-editor-type {
}

.gedit-m-json-schema-editor-required {
}

.gedit-m-json-schema-editor-actions {
  white-space: nowrap;
}

.gedit-m-json-schema-editor-default-value-wrapper {
  margin: 0;
}

.gedit-m-json-schema-editor-constant-input-wrapper {
  flex-grow: 1;

  & .semi-tree-select,
  & .semi-input-number,
  & .semi-select {
    width: 100%;
  }
}
