/* 工具栏 */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 3px;    
} 
.editor-toolbar button {
    padding: 5px 10px;
    background-color: #999;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
} 
.editor-toolbar button:hover {
    background-color: #1e9fff;
}
.editor-toolbar .clear-btn {
    background-color: #e74c3c !important;
} 
.editor-toolbar .clear-btn:hover {
    background-color: #c0392b !important;
}
/* 编辑器 */
.editor-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.editor-panel, .preview-panel {
    flex: 1;
    min-width: 0;
    height: 100%;
}
.editor-panel textarea {   
    width: 100%;
    height: 100%;
    padding: 10px;
    resize: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.preview-panel .preview {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
}
/* 预览区域的样式 */
.preview p {
    margin: 1em 0 1em 0;
}
.preview h1{
    font-size: 2em;
    font-weight: bold;
    margin: 1em 0 1em 0;
}
.preview h2{
    font-size: 1.5em;
    font-weight: bold;
    margin: 1em 0 1em 0;
}
.preview h3{
    font-size: 1.17em;
    font-weight: bold;
    margin: 1em 0 1em 0;
}
.preview h4{
    font-size: 1em;
    font-weight: bold;
    margin: 1em 0 1em 0;
}
.preview h5{
    font-size: 0.83em;
    font-weight: bold;
    margin: 1em 0 1em 0;
}
.preview h6{
    font-size: 0.75em;
    font-weight: bold;
    margin: 1em 0 1em 0;
}
.preview ul {
    list-style: none outside none !important;
    padding-left: 2em !important;
    padding-right: 2em !important;
}
.preview ul li::before{
    content: "• " !important;
}
.preview ol {
    list-style: none outside none !important;
    padding-left: 2em !important;
    padding-right: 2em !important;
    counter-reset: c1;
}
.preview ol li::before{
    counter-increment: c1 !important;
    content: counters(c1, ". ")" " !important;
}
.preview ol li input[type="checkbox"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  background-color: #fff !important;
  border: 1px solid #999 !important;
  border-radius: 3px !important;
  position: relative !important;
  top: 5px !important;
}
.preview ol li input[type="checkbox"]:checked{
    background-color: #1e9fff !important;
    border: 1px solid #1e9fff !important;
}
.preview ol li input[type="checkbox"]:checked::before {
    content: '' !important;
    position: absolute !important;
    top: 1px !important;
    left: 5px !important;
    width: 3px !important;
    height: 8px !important;
    border: 1px solid #fff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
}
.layui-form-checkbox {
    width: 16px !important;
    height: 16px !important;
    line-height:16px !important;
    background-color: #fff !important;
    border: 1px solid #999 !important;
    border-radius: 3px !important;
    position: relative !important;
    margin:0 !important;
    padding:0 !important;
    top: -1px !important;
}
.layui-form-checked {
    width: 16px !important;
    height: 16px !important;
    line-height:16px !important;
    background-color: #1e9fff !important;
    border: 1px solid #1e9fff !important;
    border-radius: 3px !important;
    position: relative !important;
    margin:0 !important;
    padding:0 !important;
    top: -1px !important;
}
.layui-form-checked:after{
    content: '' !important;
    position: absolute !important;
    top: 1px !important;
    left: 5px !important;
    width: 3px !important;
    height: 8px !important;
    border: 1px solid #fff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
}
.layui-form-checkbox i{
    display: none;
}
.layui-form-checked i{
    display: none;
}
.preview blockquote {
    border-left: 4px solid #1e9fff;
    padding-left: 1em;
    margin: 0 0 1em 0;
    color: #7f8c8d;
}
.preview pre:has([class*="language-"]) {
    padding: 1em 1em;
    border-radius: 5px;
}
.preview code:not([class*="language-"]) {
    background-color: white;
    padding: 0.2em 0.5em;
    border-radius: 5px;
    color: #c7254e;
} 
.preview img {
    max-width: 100%;
}
.preview a {
    color: #239beb;
    text-decoration: none;
}
.preview a:hover {
    text-decoration: underline;
}
.preview table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}
.preview table th, .preview table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.preview table th {
    background-color: #f2f2f2;
    font-weight: bold;
}
