/**
 * WYSIWYG Content Styles
 * These styles are applied to WYSIWYG content both in admin editors and frontend display
 */

/* Tables */
.wysiwyg-content table,
.mce-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    background-color: #fff;
}

.wysiwyg-content table th,
.wysiwyg-content table td,
.mce-content-body table th,
.mce-content-body table td {
    padding: 5px 5px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.wysiwyg-content table th,
.mce-content-body table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.wysiwyg-content table tr:nth-child(even),
.mce-content-body table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.wysiwyg-content table tr:hover,
.mce-content-body table tr:hover {
    background-color: #f0f0f0;
}

/* Headings */
.wysiwyg-content h2,
.mce-content-body h2 {
    font-size: 1.8em;
    margin: 1.5em 0 0.8em;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 0.5em;
}

.wysiwyg-content h3,
.mce-content-body h3 {
    font-size: 1.4em;
    margin: 1.3em 0 0.6em;
    color: #444;
}

.wysiwyg-content h4,
.mce-content-body h4 {
    font-size: 1.2em;
    margin: 1.2em 0 0.5em;
    color: #555;
}

/* Lists */
.wysiwyg-content ul,
.wysiwyg-content ol,
.mce-content-body ul,
.mce-content-body ol {
    margin: 1em 0;
    padding-left: 2em;
}

.wysiwyg-content ul li,
.wysiwyg-content ol li,
.mce-content-body ul li,
.mce-content-body ol li {
    margin: 0.5em 0;
    line-height: 1.6;
}

.wysiwyg-content ul ul,
.wysiwyg-content ol ol,
.mce-content-body ul ul,
.mce-content-body ol ol {
    margin: 0.5em 0;
}

/* Paragraphs */
.wysiwyg-content p,
.mce-content-body p {
    margin: 1em 0;
    line-height: 1.6;
}

/* Links */
.wysiwyg-content a,
.mce-content-body a {
    color: #007cba;
    text-decoration: none;
}

.wysiwyg-content a:hover,
.mce-content-body a:hover {
    text-decoration: underline;
}

/* Images */
.wysiwyg-content img,
.mce-content-body img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

.wysiwyg-content img.alignleft,
.mce-content-body img.alignleft {
    float: left;
    margin: 0.5em 1em 0.5em 0;
}

.wysiwyg-content img.alignright,
.mce-content-body img.alignright {
    float: right;
    margin: 0.5em 0 0.5em 1em;
}

.wysiwyg-content img.aligncenter,
.mce-content-body img.aligncenter {
    display: block;
    margin: 1em auto;
}

/* Blockquotes */
.wysiwyg-content blockquote,
.mce-content-body blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid #007cba;
    background-color: #f5f5f5;
    font-style: italic;
}

/* Code blocks */
.wysiwyg-content pre,
.mce-content-body pre {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1em;
    overflow-x: auto;
    margin: 1em 0;
}

.wysiwyg-content code,
.mce-content-body code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

/* Horizontal rules */
.wysiwyg-content hr,
.mce-content-body hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 2em 0;
}

/* Responsive tables */
@media (max-width: 768px) {
    .wysiwyg-content table,
    .mce-content-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}