/* Shared article-content rules: mirror CKEditor content rendering. */
body.article-desktop-layout .article-page .post-content ul,
body.article-desktop-layout .article-page .post-content ol {
  display: block !important;
  margin: 1em 0 !important;
  padding: 0 40px !important;
  list-style-position: outside !important;
}

body.article-desktop-layout .article-page .post-content ul > li {
  display: list-item !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  list-style: disc outside !important;
}

body.article-desktop-layout .article-page .post-content ol > li {
  display: list-item !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  list-style: decimal outside !important;
}

body.article-desktop-layout .article-page .post-content ul > li::before,
body.article-desktop-layout .article-page .post-content ol > li::before,
body.article-desktop-layout .article-page .post-content table td > p::before,
body.article-desktop-layout .article-page .post-content table th > p::before {
  content: none !important;
  display: none !important;
}

body.article-desktop-layout .article-page .post-content table:not([style*="width"]) {
  width: 100% !important;
  margin: 20px auto !important;
  border-collapse: collapse !important;
}

body.article-desktop-layout .article-page .post-content table th,
body.article-desktop-layout .article-page .post-content table td {
  padding: 9px 8px 9px 12px !important;
  border: 1px solid #000 !important;
}

body.article-desktop-layout .article-page .post-content table img {
  max-width: 100% !important;
  height: auto !important;
}

/* CKEditor hiển thị danh sách trong ô bảng căn trái, có marker gốc. */
body.article-desktop-layout .article-page .post-content table td > ul,
body.article-desktop-layout .article-page .post-content table th > ul {
  text-align: left !important;
  list-style: disc outside !important;
  padding-left: 20px !important;
  padding-right: 0 !important;
}

body.article-desktop-layout .article-page .post-content table td > ul > li,
body.article-desktop-layout .article-page .post-content table th > ul > li {
  display: list-item !important;
  text-align: left !important;
  list-style: disc outside !important;
}

body.article-desktop-layout .article-page .post-content table td > ul > li::marker,
body.article-desktop-layout .article-page .post-content table th > ul > li::marker {
  content: none !important;
}

/* Marker thống nhất trong bảng: hạ nhẹ và tạo khoảng cách với chữ. */
body.article-desktop-layout .article-page .post-content table td > ul > li,
body.article-desktop-layout .article-page .post-content table th > ul > li {
  list-style: none !important;
  position: relative !important;
  padding-left: 0.45em !important;
}

body.article-desktop-layout .article-page .post-content table td > ul > li::before,
body.article-desktop-layout .article-page .post-content table th > ul > li::before {
  content: "•" !important;
  display: block !important;
  position: absolute !important;
  left: -0.75em !important;
  top: 0.45em !important;
  line-height: 1.6 !important;
  font-size: 0.8em !important;
}

/* Áp dụng cùng kiểu marker cho mọi danh sách trong trang bài viết. */
body.article-desktop-layout .article-page .post-content ul > li {
  list-style: none !important;
  position: relative !important;
  padding-left: 0.45em !important;
}

body.article-desktop-layout .article-page .post-content ul > li::marker {
  content: none !important;
}

body.article-desktop-layout .article-page .post-content ul > li::before {
  content: "•" !important;
  display: block !important;
  position: absolute !important;
  left: -0.75em !important;
  top: 0.62em !important;
  line-height: 1.6 !important;
  font-size: 0.8em !important;
}

/* Tất cả hình ảnh trong bài viết luôn nằm giữa vùng chứa. */
body.article-desktop-layout .article-page .post-content img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  float: none !important;
  margin: 0 auto !important;
}

body.article-desktop-layout .article-page .post-content p:has(> img),
body.article-desktop-layout .article-page .post-content div:has(> img),
body.article-desktop-layout .article-page .post-content td:has(> img),
body.article-desktop-layout .article-page .post-content th:has(> img) {
  text-align: center !important;
}

body.article-desktop-layout .article-page .post-content span:has(img) {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

body.article-desktop-layout .article-page .post-content td:has(img),
body.article-desktop-layout .article-page .post-content th:has(img) {
  text-align: center !important;
}

body.article-desktop-layout .article-page .post-content td span:has(img),
body.article-desktop-layout .article-page .post-content th span:has(img) {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

body.article-desktop-layout .article-page .post-content table img,
body.article-desktop-layout .article-page .post-content td img,
body.article-desktop-layout .article-page .post-content th img {
  display: block !important;
  float: none !important;
  margin: 0 auto !important;
}

/* Không hiển thị dấu đầu dòng trên mọi thiết bị, kể cả điện thoại thật. */
.article-page .post-content ul > li,
.article-page .post-content table td > ul > li,
.article-page .post-content table th > ul > li {
  list-style: none !important;
}

.article-page .post-content ul > li::marker,
.article-page .post-content ul > li::before,
.article-page .post-content table td > ul > li::marker,
.article-page .post-content table td > ul > li::before,
.article-page .post-content table th > ul > li::marker,
.article-page .post-content table th > ul > li::before {
  content: none !important;
  display: none !important;
}

/* Xoa thanh doc giua cac o (menu chuot phai trong trinh soan bai) */
html body table td.tb-nb-r.tb-nb-r.tb-nb-r.tb-nb-r, html body table th.tb-nb-r.tb-nb-r.tb-nb-r.tb-nb-r { border-right: 0 !important; }
html body table td.tb-nb-l.tb-nb-l.tb-nb-l.tb-nb-l, html body table th.tb-nb-l.tb-nb-l.tb-nb-l.tb-nb-l { border-left: 0 !important; }