/* ── Blog Editor Layout ── */

.blog-editor {
    position: relative;
    min-height: calc(100vh - 64px);
}

.blog-editor .edit-page {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.blog-editor .edit-page-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* ── Editor content area ── */

.blog-editor .edit-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.blog-editor .edit-content .rich-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.blog-editor .edit-content .editor-body {
    flex: 1;
    min-height: 0;
}

.blog-editor .edit-content .editor-pane {
    overflow-y: auto;
}

.blog-editor .edit-content .editor-input textarea {
    height: 100%;
}

/* ── Rich Editor ── */

.rich-editor {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rich-editor .editor-toolbar {
    flex-shrink: 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.rich-editor .editor-body {
    display: flex;
    flex: 1;
    min-height: 300px;
}

.rich-editor .editor-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.rich-editor .editor-input {
    border-right: 1px solid var(--mud-palette-lines-default);
}

.rich-editor .pane-label {
    padding: 0.25rem 0.75rem;
    background: var(--mud-palette-background);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    flex-shrink: 0;
}

.rich-editor .editor-input textarea {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-family: "Cascadia Code", "Fira Code", "Source Code Pro", "Consolas", monospace;
    line-height: 1.65;
    tab-size: 4;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

.rich-editor .editor-input textarea::placeholder {
    color: var(--mud-palette-text-disabled);
}

.rich-editor .editor-preview {
    background: var(--mud-palette-surface);
}

.rich-editor .editor-preview .blog-content {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
}

.rich-editor .preview-placeholder {
    color: var(--mud-palette-text-disabled);
    font-style: italic;
    font-size: 0.9rem;
}
