/* 中文搜索面板样式 */
.cm-panel.cm-search {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* 修改按钮文本 */
.cm-panel.cm-search button[name="find"] {
  font-size: 0;
}
.cm-panel.cm-search button[name="find"]::after {
  content: '查找';
  font-size: 14px;
  display: inline-block;
  width: 100%;
}

.cm-panel.cm-search button[name="next"] {
  font-size: 0;
}
.cm-panel.cm-search button[name="next"]::after {
  content: '下一个';
  font-size: 14px;
  display: inline-block;
  width: 100%;
}

.cm-panel.cm-search button[name="prev"] {
  font-size: 0;
}
.cm-panel.cm-search button[name="prev"]::after {
  content: '上一个';
  font-size: 14px;
  display: inline-block;
  width: 100%;
}

.cm-panel.cm-search button[name="replace"] {
  font-size: 0;
}
.cm-panel.cm-search button[name="replace"]::after {
  content: '替换';
  font-size: 14px;
  display: inline-block;
  width: 100%;
}

.cm-panel.cm-search button[name="replaceAll"] {
  font-size: 0;
}
.cm-panel.cm-search button[name="replaceAll"]::after {
  content: '全部替换';
  font-size: 14px;
  display: inline-block;
  width: 100%;
}

/* 修改标签文本 */
.cm-panel.cm-search label[for="case"] {
  font-size: 0;
}
.cm-panel.cm-search label[for="case"] input {
  font-size: 14px;
  margin-right: 4px;
}
.cm-panel.cm-search label[for="case"]::after {
  content: '区分大小写';
  font-size: 14px;
  display: inline-block;
}

.cm-panel.cm-search label[for="regexp"] {
  font-size: 0;
}
.cm-panel.cm-search label[for="regexp"] input {
  font-size: 14px;
  margin-right: 4px;
}
.cm-panel.cm-search label[for="regexp"]::after {
  content: '正则表达式';
  font-size: 14px;
  display: inline-block;
}

.cm-panel.cm-search label[for="word"] {
  font-size: 0;
}
.cm-panel.cm-search label[for="word"] input {
  font-size: 14px;
  margin-right: 4px;
}
.cm-panel.cm-search label[for="word"]::after {
  content: '全词匹配';
  font-size: 14px;
  display: inline-block;
}

/* 修改输入框占位符 */
.cm-panel.cm-search input[name="search"]::placeholder {
  color: #999;
}

.cm-panel.cm-search input[name="replace"]::placeholder {
  color: #999;
}

/* 修改输入框标签 */
.cm-panel.cm-search label[for="search"] {
  display: none;
}

.cm-panel.cm-search label[for="replace"] {
  display: none;
}

/* 添加中文占位符 */
.cm-panel.cm-search input[name="search"] {
  position: relative;
}
.cm-panel.cm-search input[name="search"]::before {
  content: '查找';
  position: absolute;
  color: #999;
  pointer-events: none;
}

.cm-panel.cm-search input[name="replace"] {
  position: relative;
}
.cm-panel.cm-search input[name="replace"]::before {
  content: '替换';
  position: absolute;
  color: #999;
  pointer-events: none;
}
