/**
 * COMIXVN – kiểu nội dung soạn từ trình soạn thảo.
 * Dùng chung cho ngoài website (.entry-content, .content-description) và khung soạn thảo (body.mce-content-body).
 */

.entry-content,
.content-description,
.mce-content-body {
	--comixvn-brand: var(--site-primary-color, #f49e00);
	--comixvn-brand-dark: #c47f00;
	--comixvn-border: #dee2e6;
	--comixvn-cream: #fff4df;
	--comixvn-text: var(--font-primary-color, #333);
}

/* Căn lề ảnh / khối của WordPress */
.entry-content .alignleft,
.content-description .alignleft,
.mce-content-body .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.entry-content .alignright,
.content-description .alignright,
.mce-content-body .alignright { float: right; margin: .3em 0 1em 1.5em; }
.entry-content .aligncenter,
.content-description .aligncenter,
.mce-content-body .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content img,
.content-description img { max-width: 100%; height: auto; }
.entry-content .wp-caption,
.content-description .wp-caption { max-width: 100%; }
.entry-content .wp-caption-text,
.content-description .wp-caption-text { font-size: 14px; color: #6c757d; margin-top: 6px; text-align: center; }
.entry-content::after,
.content-description::after { content: ""; display: table; clear: both; }

/* Trích dẫn */
.entry-content blockquote,
.content-description blockquote,
.mce-content-body blockquote {
	margin: 1.5em 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--comixvn-brand);
	font-style: italic;
	color: var(--comixvn-text);
}

/* Đường kẻ */
.entry-content hr,
.content-description hr,
.mce-content-body hr { border: 0; border-top: 1px solid var(--comixvn-border); margin: 2em 0; opacity: 1; }

/* Kiểu chữ */
.entry-content .comixvn-lead,
.content-description .comixvn-lead,
.mce-content-body .comixvn-lead { font-size: 1.25em; line-height: 1.6; }
.entry-content .comixvn-brand,
.content-description .comixvn-brand,
.mce-content-body .comixvn-brand { color: var(--comixvn-brand); }
.entry-content .comixvn-note,
.content-description .comixvn-note,
.mce-content-body .comixvn-note { font-size: .85em; color: #6c757d; }

/* Nút */
.entry-content a.comixvn-btn,
.content-description a.comixvn-btn,
.mce-content-body a.comixvn-btn {
	display: inline-block;
	padding: 10px 24px;
	border: 1px solid var(--comixvn-brand);
	border-radius: 8px;
	background: var(--comixvn-brand);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	line-height: 1.2;
	transition: background .2s, color .2s, border-color .2s;
}
.entry-content a.comixvn-btn:hover,
.content-description a.comixvn-btn:hover { background: var(--comixvn-brand-dark); border-color: var(--comixvn-brand-dark); color: #fff; }
.entry-content a.comixvn-btn--outline,
.content-description a.comixvn-btn--outline,
.mce-content-body a.comixvn-btn--outline { background: transparent; color: var(--comixvn-brand); }
.entry-content a.comixvn-btn--outline:hover,
.content-description a.comixvn-btn--outline:hover { background: var(--comixvn-brand); color: #fff; }

/* Hộp nổi bật */
.entry-content .comixvn-box,
.content-description .comixvn-box,
.mce-content-body .comixvn-box {
	margin: 1.5em 0;
	padding: 16px 20px;
	border-radius: 8px;
	background: var(--comixvn-cream);
	border-left: 4px solid var(--comixvn-brand);
	color: #333;
}
.entry-content .comixvn-box--warning,
.content-description .comixvn-box--warning,
.mce-content-body .comixvn-box--warning { background: #fdecea; border-left-color: #dc3545; }
.entry-content .comixvn-box > :last-child,
.content-description .comixvn-box > :last-child,
.mce-content-body .comixvn-box > :last-child { margin-bottom: 0; }

/* Danh sách dấu tick */
.entry-content ul.comixvn-checklist,
.content-description ul.comixvn-checklist,
.mce-content-body ul.comixvn-checklist { list-style: none; padding-left: 0; }
.entry-content ul.comixvn-checklist li,
.content-description ul.comixvn-checklist li,
.mce-content-body ul.comixvn-checklist li { position: relative; padding-left: 28px; margin-bottom: .5em; }
.entry-content ul.comixvn-checklist li::before,
.content-description ul.comixvn-checklist li::before,
.mce-content-body ul.comixvn-checklist li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .35em;
	width: 14px;
	height: 8px;
	border-left: 2px solid var(--comixvn-brand);
	border-bottom: 2px solid var(--comixvn-brand);
	transform: rotate(-45deg);
}

/* Bảng */
.entry-content table,
.content-description table,
.mce-content-body table { width: 100%; max-width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.entry-content table.comixvn-table th,
.entry-content table.comixvn-table td,
.content-description table.comixvn-table th,
.content-description table.comixvn-table td,
.mce-content-body table.comixvn-table th,
.mce-content-body table.comixvn-table td { border: 1px solid var(--comixvn-border); padding: 10px 14px; text-align: left; vertical-align: top; }
.entry-content table.comixvn-table th,
.entry-content table.comixvn-table thead td,
.content-description table.comixvn-table th,
.content-description table.comixvn-table thead td,
.mce-content-body table.comixvn-table th,
.mce-content-body table.comixvn-table thead td { background: var(--comixvn-cream); font-weight: 600; color: #111; }
.entry-content table.comixvn-table--striped tbody tr:nth-child(even),
.content-description table.comixvn-table--striped tbody tr:nth-child(even),
.mce-content-body table.comixvn-table--striped tbody tr:nth-child(even) { background: rgba(244, 158, 0, .06); }

@media (max-width: 767px) {
	.entry-content table,
	.content-description table { display: block; overflow-x: auto; }
	.entry-content .alignleft,
	.entry-content .alignright,
	.content-description .alignleft,
	.content-description .alignright { float: none; margin: 1em auto; }
}
