.md-editor {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background: #fff;
}

.md-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 6px;
    background: #f4f6f8;
    border-bottom: 1px solid #ced4da;
    border-radius: 0.25rem 0.25rem 0 0;
}

.md-editor-actions,
.md-editor-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.md-editor-btn,
.md-editor-tab {
    border: 1px solid transparent;
    background: transparent;
    color: #33475b;
    font-size: 0.8rem;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 3px;
    cursor: pointer;
}

.md-editor-btn:hover:not(:disabled),
.md-editor-tab:hover {
    background: #e2e8ee;
}

.md-editor-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.md-editor-tab.is-active {
    background: #fff;
    border-color: #ced4da;
    font-weight: 600;
}

.md-editor-body {
    position: relative;
}

textarea.md-editor-input.form-control {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    resize: vertical;
    min-height: 260px;
    font-family: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
}

textarea.md-editor-input.form-control:focus {
    box-shadow: none;
}

.md-editor-preview {
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    padding: 10px 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.md-editor-preview p {
    margin: 4px 0;
}

.md-editor-preview ul {
    margin: 4px 0;
    padding-left: 20px;
}

.md-editor-preview li {
    margin: 0;
}

.md-editor-preview img {
    max-width: 100%;
    margin-top: 5px;
}

.md-editor-preview h1,
.md-editor-preview h2,
.md-editor-preview h3,
.md-editor-preview h4,
.md-editor-preview h5,
.md-editor-preview h6 {
    margin: 8px 0 4px;
}

.md-editor-preview code {
    background: #f1f3f5;
    padding: 1px 4px;
    border-radius: 3px;
}

.md-editor-empty {
    color: #8895a4;
    font-style: italic;
}

.md-editor-hint {
    display: block;
    padding: 4px 8px;
    color: #7b8794;
    font-size: 0.7rem;
    border-top: 1px solid #edf1f5;
}
