/* Custom CSS for preserving paste formatting in TinyMCE */
.mce-content-body {
    white-space: pre-wrap !important;
}

.builder-class-element-selected p,
.mce-content-body div,
.mce-content-body span {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
}

/* Prevent TinyMCE from collapsing whitespace on paste */
.mce-content-body * {
    white-space: inherit !important;
}

/* Preserve line breaks and spacing */
.mce-content-body br {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Preserve spaces in template editor */
.template-editor iframe {
    white-space: pre-wrap !important;
}

/* Fix for contenteditable elements */
[contenteditable="true"] {
    white-space: pre-wrap !important;
}