/* r37：给 CodeMirror 代码编辑器配一套和网站风格一致的样式 */
.aikc-cm-host {
  margin: 4px 0 6px;
}
.aikc-cm-host .CodeMirror {
  height: auto;
  min-height: 190px;
  max-height: 70vh;
  border: 2px solid #101828;
  border-radius: 12px;
  font-family: "Consolas", "SFMono-Regular", "Menlo", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  padding: 6px 0;
}
.aikc-cm-host .CodeMirror-scroll {
  min-height: 178px;
}
.aikc-cm-host .CodeMirror-gutters {
  background: #f1f3f7;
  border-right: 2px solid #101828;
  border-radius: 10px 0 0 10px;
}
.aikc-cm-host .CodeMirror-linenumber {
  color: #8b95a7;
  font-size: 12.5px;
  padding: 0 10px 0 8px;
}
.aikc-cm-host .CodeMirror-line {
  padding-left: 10px;
}
.aikc-cm-host .CodeMirror-lines {
  padding: 4px 0;
}
.aikc-cm-host .CodeMirror-cursor {
  border-left: 2px solid #0b3d91;
}
.aikc-cm-host .CodeMirror-selected {
  background: #d7e6ff;
}
.aikc-cm-host .CodeMirror-activeline-background {
  background: rgba(47, 125, 224, .07);
}
/* show-hint 弹出框：字大一点、行距松一点，方便小学生点 */
.CodeMirror-hints {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.8;
  max-height: 240px;
  border: 2px solid #101828;
  border-radius: 10px;
  box-shadow: 3px 3px 0 rgba(16, 24, 40, .35);
  background: #fffdf8;
  padding: 4px;
}
.CodeMirror-hint {
  color: #1f2937;
  padding: 2px 8px;
  border-radius: 6px;
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
}
li.CodeMirror-hint-active {
  background: #2f7de0;
  color: #fff;
}
/* 行号 + 联想只在有足够宽度时才启用，手机上避免挤成一团 */
@media (max-width: 560px) {
  .aikc-cm-host .CodeMirror {
    font-size: 13px;
  }
}
