/**
 * Article Editor Content Styles
 * Ensures HugeRTE/TinyMCE default styles are preserved in article content
 */

/* Reset and apply editor styles for lists in article content */
.article-content ul,
.article-content ol {
    margin: 1em 0 !important;
    padding: 0 0 0 40px !important;
    list-style-position: outside !important;
}

.article-content ul {
    list-style-type: disc !important;
}

.article-content ol {
    list-style-type: decimal !important;
}

.article-content ul li,
.article-content ol li {
    margin: 0.5em 0 !important;
    padding: 0 !important;
    list-style: inherit !important;
}

/* Nested lists */
.article-content ul ul,
.article-content ol ul {
    list-style-type: circle !important;
    margin: 0.5em 0 !important;
    padding-left: 30px !important;
}

.article-content ul ul ul,
.article-content ol ul ul {
    list-style-type: square !important;
}

.article-content ol ol,
.article-content ul ol {
    list-style-type: lower-alpha !important;
    margin: 0.5em 0 !important;
    padding-left: 30px !important;
}

.article-content ol ol ol,
.article-content ul ol ol {
    list-style-type: lower-roman !important;
}

/* Ensure proper spacing and display */
.article-content ul li::before,
.article-content ol li::before {
    content: none !important;
}

.article-content li {
    display: list-item !important;
}

/* Paragraph spacing in article content */
.article-content p {
    margin: 1em 0;
    line-height: 1.6;
}

/* Headings in article content */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.3;
}

.article-content h1:first-child,
.article-content h2:first-child,
.article-content h3:first-child,
.article-content h4:first-child,
.article-content h5:first-child,
.article-content h6:first-child {
    margin-top: 0;
}

/* Blockquotes */
.article-content blockquote {
    margin: 1.5em 0;
    padding: 10px 20px;
    border-left: 4px solid #ddd;
    background-color: #f9f9f9;
    font-style: italic;
}

/* Code blocks */
.article-content pre {
    margin: 1em 0;
    padding: 15px;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
}

.article-content code {
    padding: 2px 6px;
    background-color: #f4f4f4;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.article-content pre code {
    padding: 0;
    background-color: transparent;
}

/* Tables */
.article-content table {
    margin: 1em 0;
    border-collapse: collapse;
    width: 100%;
}

.article-content table td,
.article-content table th {
    border: 1px solid #ddd;
    padding: 8px 12px;
}

.article-content table th {
    background-color: #f4f4f4;
    font-weight: 600;
}

/* Images */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
}

/* Links */
.article-content a {
    color: #007bff;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

/* Strong and emphasis */
.article-content strong,
.article-content b {
    font-weight: 600;
}

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

/* Horizontal rule */
.article-content hr {
    margin: 2em 0;
    border: 0;
    border-top: 1px solid #ddd;
}

/* For RTL languages (Arabic) */
html[dir="rtl"] .article-content ul,
html[dir="rtl"] .article-content ol {
    padding: 0 40px 0 0 !important;
}

html[dir="rtl"] .article-content ul ul,
html[dir="rtl"] .article-content ol ul,
html[dir="rtl"] .article-content ul ol,
html[dir="rtl"] .article-content ol ol {
    padding-right: 30px !important;
    padding-left: 0 !important;
}