
/* ============================================================
   post-content
   ============================================================ */

   /* ============================================================
   .post-content — Summernote Rich Text Styles
   ครอบคลุม tag และ style ทุกอย่างที่ Summernote สร้างขึ้น
   ============================================================ */

/* Base */
.post-content {
  font-size: 1rem;
  line-height: 1.75;
  color: #1a1a1a;
  word-break: break-word;
  overflow-wrap: break-word;
}

/*  Headings ─ */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: #111;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.35rem; }
.post-content h4 { font-size: 1.15rem; }
.post-content h5 { font-size: 1rem; }
.post-content h6 { font-size: 0.9rem; color: #444; }

/*  Paragraph  */
.post-content p {
  margin-top: 0;
  margin-bottom: 1em;
}

/*  Inline Text Styles ─ */
.post-content b,
.post-content strong {
  font-weight: 700;
}

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

.post-content u {
  text-decoration: underline;
}

.post-content s,
.post-content strike,
.post-content del {
  text-decoration: line-through;
  color: #888;
}

.post-content mark {
  background-color: #fff176;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.post-content small {
  font-size: 0.85em;
}

.post-content sup {
  font-size: 0.75em;
  vertical-align: super;
}

.post-content sub {
  font-size: 0.75em;
  vertical-align: sub;
}

/*  Link ─ */
.post-content a {
  color: #0066cc;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.post-content a:hover {
  color: #0044aa;
}

/*  Lists  */
.post-content ul,
.post-content ol {
  margin: 0 0 1em 0;
  padding-left: 1.75em;
}

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

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

.post-content li {
  margin-bottom: 0.25em;
}

/* Nested lists */
.post-content ul ul,
.post-content ol ol,
.post-content ul ol,
.post-content ol ul {
  margin-top: 0.25em;
  margin-bottom: 0.25em;
}

.post-content ul ul         { list-style-type: circle; }
.post-content ul ul ul      { list-style-type: square; }

/*  Blockquote ─ */
.post-content blockquote {
  margin: 1.25em 0;
  padding: 0.75em 1.25em;
  border-left: 4px solid #0066cc;
  background-color: #f5f8ff;
  color: #333;
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

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

/*  Code & Pre ─ */
.post-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  background-color: #f0f0f0;
  color: #c7254e;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post-content pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1em 0;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}

/*  Table  */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25em 0;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}

.post-content thead {
  background-color: #f0f4f8;
}

.post-content th,
.post-content td {
  border: 1px solid #d0d7de;
  padding: 0.5em 0.75em;
  text-align: left;
  vertical-align: top;
}

.post-content th {
  font-weight: 700;
  color: #111;
}

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

.post-content tr:hover td {
  background-color: #f0f4f8;
}

/*  Image  */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 1em 0;
}

/* Summernote float classes */
.post-content img.float-left,
.post-content .float-left {
  float: left;
  margin: 0 1.25em 0.75em 0;
}

.post-content img.float-right,
.post-content .float-right {
  float: right;
  margin: 0 0 0.75em 1.25em;
}

/* Clearfix after floated images */
.post-content::after {
  content: "";
  display: table;
  clear: both;
}

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

/*  Summernote Text Alignment  */
.post-content .text-left,
.post-content [style*="text-align: left"] {
  text-align: left;
}

.post-content .text-center,
.post-content [style*="text-align: center"] {
  text-align: center;
}

.post-content .text-right,
.post-content [style*="text-align: right"] {
  text-align: right;
}

.post-content .text-justify,
.post-content [style*="text-align: justify"] {
  text-align: justify;
}

/*  Summernote Font Size (inline style override) ─ */
/* Summernote injects font-size via inline style; ไม่ต้อง override แค่ allow */
.post-content [style*="font-size"] {
  line-height: 1.5;
}

/*  Summernote Font Color  */
/* Summernote ใส่ color ผ่าน inline style โดยตรง; inherit ได้เลย */

/*  Summernote Background Color ─ */
.post-content [style*="background-color"] {
  padding: 0 2px;
  border-radius: 2px;
}

/*  Indent / Outdent ─ */
.post-content [style*="margin-left"] {
  /* Summernote ใช้ margin-left สำหรับ indent */
}

/*  Video / iframe (embed) ─ */
.post-content iframe,
.post-content video {
  max-width: 100%;
  border-radius: 4px;
  display: block;
  margin: 1em 0;
}

/* Responsive video wrapper (ถ้าใช้ร่วมกับ embed) */
.post-content .video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1em 0;
}

.post-content .video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

/*  Responsive ─ */
@media (max-width: 640px) {
  .post-content h1 { font-size: 1.5rem; }
  .post-content h2 { font-size: 1.3rem; }
  .post-content h3 { font-size: 1.1rem; }

  .post-content table {
    font-size: 0.85rem;
  }

  .post-content img.float-left,
  .post-content img.float-right,
  .post-content .float-left,
  .post-content .float-right {
    float: none;
    margin: 1em 0;
  }
}