/* Editor Content Styles - Preserve formatting from WYSIWYG editor */

.editor-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Headings */
.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4,
.editor-content h5,
.editor-content h6 {
    font-weight: 600;
    margin: 1.5em 0 0.75em;
    line-height: 1.3;
    color: #1a202c;
}

.editor-content h1 { font-size: 1.75em; }
.editor-content h2 { font-size: 1.5em; }
.editor-content h3 { font-size: 1.25em; }
.editor-content h4 { font-size: 1.1em; }
.editor-content h5 { font-size: 1em; }
.editor-content h6 { font-size: 0.9em; }

/* Paragraphs */
.editor-content p {
    margin: 0.75em 0;
    line-height: 1.6;
}

/* Text formatting */
.editor-content strong,
.editor-content b {
    font-weight: 600;
    color: #1a202c;
}

.editor-content em,
.editor-content i {
    font-style: italic;
}

.editor-content u {
    text-decoration: underline;
}

.editor-content s {
    text-decoration: line-through;
}

/* Links */
.editor-content a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.editor-content a:hover {
    color: #2563eb;
}

/* Blockquote */
.editor-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 16px;
    margin: 16px 0;
    color: #4b5563;
    font-style: italic;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 4px;
}

/* Lists */
.editor-content ul,
.editor-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.editor-content ul {
    list-style-type: disc;
}

.editor-content ol {
    list-style-type: decimal;
}

.editor-content li {
    margin: 0.5em 0;
    line-height: 1.6;
}

/* Nested lists */
.editor-content li > ul,
.editor-content li > ol {
    margin: 0.5em 0;
}

.editor-content ul ul {
    list-style-type: circle;
}

.editor-content ul ul ul {
    list-style-type: square;
}

/* Alignment classes (from Quill) */
.editor-content .ql-align-center {
    text-align: center;
}

.editor-content .ql-align-right {
    text-align: right;
}

.editor-content .ql-align-justify {
    text-align: justify;
}

/* Indent classes (from Quill) */
.editor-content .ql-indent-1 {
    padding-left: 3em;
}

.editor-content .ql-indent-2 {
    padding-left: 6em;
}

.editor-content .ql-indent-3 {
    padding-left: 9em;
}

/* Line breaks */
.editor-content br {
    display: block;
    content: "";
    margin: 0.5em 0;
}

/* Reset margins for first/last elements */
.editor-content > *:first-child {
    margin-top: 0;
}

.editor-content > *:last-child {
    margin-bottom: 0;
}

/* Container optimization */
.section-content.editor-content {
    /* Prevent overflow */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    
    /* Isolate styles to prevent affecting other blocks */
    isolation: isolate;
}

/* Clear floats */
.section-content.editor-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .editor-content {
        font-size: 0.95rem;
    }
    
    .editor-content ul,
    .editor-content ol {
        padding-left: 1.5em;
    }
    
    .editor-content blockquote {
        padding: 8px 12px;
        margin: 12px 0;
    }
    
    .editor-content .ql-indent-1 {
        padding-left: 2em;
    }
    
    .editor-content .ql-indent-2 {
        padding-left: 4em;
    }
    
    .editor-content .ql-indent-3 {
        padding-left: 6em;
    }
}
