.global-md-editor-modal-content {
    min-height: min(90vh, 920px);
}

.global-md-editor-shell {
    display: flex;
    flex-direction: column;
    min-height: min(78vh, 820px);
    background: #fff;
}

.global-md-editor-toolbar {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.global-md-editor-toolbar-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.global-md-editor-toolbar-row + .global-md-editor-toolbar-row {
    margin-top: 8px;
}

.global-md-toolbar-group {
    width: auto;
    min-width: 170px;
}

.global-md-toolbar-group-wide {
    min-width: 240px;
}

.global-md-toolbar-switch {
    margin-left: 4px;
    padding-left: 2.6rem;
}

.global-md-editor-toolbar-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

.global-md-editor-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    flex: 1;
    min-height: 0;
}

.global-md-editor-pane,
.global-md-preview-pane {
    padding: 16px;
    min-width: 0;
    min-height: 0;
}

.global-md-editor-pane {
    border-right: 1px solid #e5e7eb;
}

.global-md-editor-textarea {
    height: calc(100% - 250px);
    min-height: 320px;
    resize: none;
    border-radius: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1.65;
}

.global-md-preview {
    height: calc(100% - 34px);
    min-height: 480px;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
}

.global-md-preview .official-docs-content {
    font-size: 14px;
    line-height: 1.7;
}

.global-md-preview .global-md-image-load-error {
    border: 1px dashed #f59e0b;
    border-radius: 10px;
    background: #fff7ed;
    color: #92400e;
    padding: 8px 10px;
    margin-top: 8px;
    font-size: 12px;
}

.global-md-image-tool {
    border: 1px solid #dbe7f3;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    padding: 14px;
}

.global-md-preview img[data-doc-image] {
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.global-md-preview img[data-doc-image]:hover {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.global-md-preview img.global-md-preview-image-selected {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
    border-radius: 8px;
}

.global-md-range-value {
    min-width: 56px;
}

#globalMarkdownEditorModal.is-fullscreen .modal-dialog {
    width: 100vw;
    max-width: none;
    height: 100vh;
    margin: 0;
}

#globalMarkdownEditorModal.is-fullscreen .modal-content {
    height: 100vh;
    border-radius: 0;
}

#globalMarkdownEditorModal.is-fullscreen .global-md-editor-shell {
    min-height: calc(100vh - 126px);
}

@media (max-width: 991.98px) {
    .global-md-editor-body {
        grid-template-columns: 1fr;
    }

    .global-md-editor-pane {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .global-md-editor-textarea,
    .global-md-preview {
        min-height: 320px;
    }

    .global-md-editor-textarea {
        height: 320px;
    }
}
