/*
 * ZJNY Editor Base Styles
 * 给 WordPress 编辑器输出内容提供统一的基础排版样式
 * 作用域：.zjny-editor-content
 */

.zjny-editor-content {
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

.zjny-editor-content > *:first-child {
    margin-top: 0;
}

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

.zjny-editor-content h1,
.zjny-editor-content h2,
.zjny-editor-content h3,
.zjny-editor-content h4,
.zjny-editor-content h5,
.zjny-editor-content h6 {
    color: #222;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 24px;
    margin-bottom: 12px;
}

.zjny-editor-content h1 {
    font-size: 32px;
}

.zjny-editor-content h2 {
    font-size: 24px;
}

.zjny-editor-content h3 {
    font-size: 20px;
}

.zjny-editor-content h4 {
    font-size: 20px;
}

.zjny-editor-content h5 {
    font-size: 18px;
}

.zjny-editor-content h6 {
    font-size: 16px;
}

.zjny-editor-content p {
    margin-top: 0;
    margin-bottom: 16px;
}

.zjny-editor-content ul,
.zjny-editor-content ol {
    margin-top: 0;
    margin-bottom: 16px;
    padding-left: 24px;
}

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

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

.zjny-editor-content ul ul,
.zjny-editor-content ol ol,
.zjny-editor-content ul ol,
.zjny-editor-content ol ul {
    margin-top: 4px;
    margin-bottom: 4px;
}

.zjny-editor-content li {
    margin-bottom: 8px;
    line-height: 1.6;
    list-style: inherit;
}

.zjny-editor-content li > p {
    margin-bottom: 4px;
}

.zjny-editor-content a {
    color: var(--mainColor);
    text-decoration: underline !important;
}

.zjny-editor-content a:hover,
.zjny-editor-content a:focus {
    color: var(--mainColor);
    text-decoration: none;
}

.zjny-editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 16px;
}

.zjny-editor-content th,
.zjny-editor-content td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.zjny-editor-content th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #222;
}

.zjny-editor-content tr:nth-child(even) td {
    background-color: #fafafa;
}

.zjny-editor-content blockquote {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-left: 4px solid var(--mainColor);
    background-color: #f5f5f5;
    color: #555;
}

.zjny-editor-content blockquote p:last-child {
    margin-bottom: 0;
}

.zjny-editor-content img {
    max-width: 100%;
    height: auto;
}

.zjny-editor-content strong {
    font-weight: 700;
    color: #222;
}

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

.zjny-editor-content hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin-top: 24px;
    margin-bottom: 24px;
}

.zjny-editor-content pre {
    background-color: #f5f5f5;
    padding: 16px;
    overflow-x: auto;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.zjny-editor-content code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.875em;
}

@media (max-width: 768px) {
    .zjny-editor-content {
        font-size: 14px;
    }

    .zjny-editor-content h1 {
        font-size: 24px;
    }

    .zjny-editor-content h2 {
        font-size: 18px;
    }

    .zjny-editor-content h3 {
        font-size: 16px;
    }

    .zjny-editor-content h4 {
        font-size: 16px;
    }

    .zjny-editor-content h5 {
        font-size: 15px;
    }

    .zjny-editor-content h6 {
        font-size: 14px;
    }

    .zjny-editor-content ul,
    .zjny-editor-content ol {
        padding-left: 20px;
    }

    .zjny-editor-content th,
    .zjny-editor-content td {
        padding: 8px;
    }
}
