@charset "UTF-8";

.editor-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.line-numbers {
  width: 70px;
  background-color: #f5f5f5;
  border-right: 1px solid #ddd;
  padding: 10px 5px;
  overflow-y: hidden;
  font-family: monospace;
  color: #999;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  box-sizing: border-box;
}

.line-number {
  position: relative;
  text-align: right;
  padding-right: 20px;
  min-height: 18px;
}

.fold-toggle {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  cursor: pointer;
  text-align: center;
  line-height: 12px;
  font-size: 10px;
  color: #666;
  background-color: #eee;
  border-radius: 2px;
  display: none;
}

.fold-toggle::before {
  content: "-";
}

.fold-toggle.collapsed::before {
  content: "+";
}

.line-number.has-fold .fold-toggle {
  display: block;
}

.fold-toggle::before {
  content: "-";
}

.fold-toggle.collapsed::before {
  content: "+";
}

.editor-wrapper {
  display: flex;
  height: 600px;
  overflow: hidden;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.5;
}

/* 更新.code-editor样式 */

.editor-wrapper .code-editor {
  flex: 1;
  border: none;
  padding: 10px 10px 10px 0;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  background-color: white;
  color: black;
  white-space: pre;
  /* 默认值 */
  overflow-x: auto;
  /* 默认值 */
}

/* 自动换行模式 - 增加特异性 */

.editor-wrapper .code-editor.auto-wrap {
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

/* 不换行模式 - 增加特异性 */

.editor-wrapper .code-editor.no-wrap {
  white-space: pre !important;
  overflow-x: auto !important;
}

/* JSON颜色样式 */

.json-key {
  color: #e45649;
  /* 键名 - 暗红色 */
}

.json-string {
  color: blue;
  /* 字符串值 - 蓝色 */
}

.json-number {
  color: green;
  /* 数字值 - 绿色 */
}

.json-boolean,
.json-null {
  color: green;
  /* 布尔值和null值 - 绿色 */
}

.resize-handle {
  height: 10px;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
  cursor: ns-resize;
  text-align: center;
}

.resize-handle::after {
  content: "\2261";
  color: #999;
  font-size: 14px;
  line-height: 10px;
}

.toolbar {
  padding: 10px;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  padding: 6px 12px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background-color: #e9e9e9;
}

/* 修改样式 */

.selection-info {
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
  padding: 5px 10px;
  font-family: monospace;
  font-size: 13px;
  color: #666;
  display: block;
}

.selection-info.empty {
  color: #999;
  font-style: italic;
}

