/* Wrapper untuk konten editor */
.ckeditor-content {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  word-wrap: break-word;
}

/* Heading */
.ckeditor-content h1,
.ckeditor-content h2,
.ckeditor-content h3,
.ckeditor-content h4,
.ckeditor-content h5,
.ckeditor-content h6 {
  margin: 1.5em 0 0.5em;
  font-weight: bold;
}

/* Paragraf */
.ckeditor-content p {
  margin-bottom: 1em;
}

/* Blockquote */
.ckeditor-content blockquote {
  border-left: 4px solid #ccc;
  padding-left: 1em;
  margin: 1em 0;
  font-style: italic;
  color: #555;
}

/* Gambar umum */
.ckeditor-content figure.image {
  display: block;
  margin: 1.5em auto;
  max-width: 100%;
  text-align: center;
  border-radius: 4px;
  overflow: hidden;
}

.ckeditor-content figure.image img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid #eee;
}

.ckeditor-content figure.image figcaption {
  font-size: 0.9rem;
  color: #333;
  padding: 0.75em 1em;
  background-color: #f9f9f9;
  margin: 0;
  text-align: center;
}

.ckeditor-content figure.image figcaption:empty {
  display: none;
}

/* Gambar dengan style align-right */
.ckeditor-content figure.image-style-align-right, .ckeditor-content .image-style-align-right {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1em;
  max-width: 50%;
}

.ckeditor-content h3 + figure[class*="image-style-align"]{
  margin-top: 0;
}

/* Gambar dengan style align-left */
.ckeditor-content figure.image-style-align-left, .ckeditor-content .image-style-align-left {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1em;
  max-width: 50%;
}

/* Gambar dengan style block */
.ckeditor-content figure.image-style-block {
  display: block;
  margin: 1em auto;
  text-align: center;
}

/* Block image align right */
.ckeditor-content figure.image-style-block-align-right {
  display: block;
  margin-left: auto;
  margin-right: 0;
  text-align: right;
}

/* Block image align left */
.ckeditor-content figure.image-style-block-align-left {
  display: block;
  margin-right: auto;
  margin-left: 0;
  text-align: left;
}

/* Block image align center (default) */
.ckeditor-content figure.image-style-block-align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Gambar dengan style side (mirip align-right) */
.ckeditor-content figure.image-style-side {
  float: right;
  margin-left: 1em;
  margin-bottom: 1em;
  max-width: 30%;
}

/* Gambar resized */
.ckeditor-content figure.image_resized {
  max-width: 100%;
}

/* Tabel */
.ckeditor-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.ckeditor-content th,
.ckeditor-content td {
  border: 1px solid #ccc;
  padding: 0.75em;
  text-align: left;
}
.ckeditor-content thead {
  background-color: #f5f5f5;
}

/* Code block */
.ckeditor-content pre {
  background-color: #f4f4f4;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.95rem;
}

/* Clear float */
.ckeditor-content::after {
  content: "";
  display: table;
  clear: both;
}

/* Responsif untuk mobile */
@media (max-width: 768px) {
  .ckeditor-content .image-style-align-right,
  .ckeditor-content .image-style-align-left,
  .ckeditor-content .image-style-side {
    float: none;
    display: block;
    margin: 1em auto;
    max-width: 100%;
  }
}

.ckeditor-content ol {
    counter-reset: custom-counter;
    list-style: none;
    padding-left: 0; /* hapus indent default */
    margin-left: 0;
}

.ckeditor-content ol li {
    counter-increment: custom-counter;
    position: relative;
    padding-left: 2.5em; /* ruang untuk angka */
    margin-bottom: 0.5em;
}

.ckeditor-content ol li::before {
    content: counter(custom-counter) ".";
    position: absolute;
    left: 0;
    width: 2em;
    text-align: right;
    font-weight: bold;
    display: inline-block;
}