@charset "UTF-8";
/**
 * KPE3 public content helpers — scoped only under content wrappers.
 * No global .row / .container rules.
 */
.main-html-content img:not([data-kpe3-gallery-img]):not([width]):not([height]):not([style*=width]):not([style*=height]):not(.rounded-circle),
.html-content img:not([data-kpe3-gallery-img]):not([width]):not([height]):not([style*=width]):not([style*=height]):not(.rounded-circle),
.cke_editable img:not([data-kpe3-gallery-img]):not([width]):not([height]):not([style*=width]):not([style*=height]):not(.rounded-circle) {
  max-width: 100%;
  height: auto;
}
.main-html-content img.rounded-circle:not([data-kpe3-gallery-img]),
.html-content img.rounded-circle:not([data-kpe3-gallery-img]),
.cke_editable img.rounded-circle:not([data-kpe3-gallery-img]) {
  aspect-ratio: 1/1;
  object-fit: cover;
}
.main-html-content img.float-start:not([data-kpe3-gallery-img]),
.html-content img.float-start:not([data-kpe3-gallery-img]),
.cke_editable img.float-start:not([data-kpe3-gallery-img]) {
  float: left;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}
.main-html-content img.float-end:not([data-kpe3-gallery-img]),
.html-content img.float-end:not([data-kpe3-gallery-img]),
.cke_editable img.float-end:not([data-kpe3-gallery-img]) {
  float: right;
  margin-left: 1rem;
  margin-bottom: 0.5rem;
}
.main-html-content img.float-start:not([data-kpe3-gallery-img]):not([width]):not([style*=width]),
.main-html-content img.float-end:not([data-kpe3-gallery-img]):not([width]):not([style*=width]),
.html-content img.float-start:not([data-kpe3-gallery-img]):not([width]):not([style*=width]),
.html-content img.float-end:not([data-kpe3-gallery-img]):not([width]):not([style*=width]),
.cke_editable img.float-start:not([data-kpe3-gallery-img]):not([width]):not([style*=width]),
.cke_editable img.float-end:not([data-kpe3-gallery-img]):not([width]):not([style*=width]) {
  max-width: 50%;
}
.main-html-content img.float-none:not([data-kpe3-gallery-img]),
.html-content img.float-none:not([data-kpe3-gallery-img]),
.cke_editable img.float-none:not([data-kpe3-gallery-img]) {
  float: none;
}
.main-html-content [data-kpe3-spacer="1"],
.main-html-content .kpe3-spacer-block,
.html-content [data-kpe3-spacer="1"],
.html-content .kpe3-spacer-block,
.cke_editable [data-kpe3-spacer="1"],
.cke_editable .kpe3-spacer-block {
  display: block;
  width: 100%;
  clear: both;
}
.main-html-content,
.html-content,
.cke_editable {
  /*
   * TipTap/KPE3 šūnās ietin tekstu <p>/<h1–h6> iekšā (vecais CKEditor bieži bez wrap).
   * Bootstrap p/h* margin → lieka atstarpe. Noņem first/last bērnam (ne tikai p).
   */
}
.main-html-content table td > *:first-child,
.main-html-content table th > *:first-child,
.html-content table td > *:first-child,
.html-content table th > *:first-child,
.cke_editable table td > *:first-child,
.cke_editable table th > *:first-child {
  margin-top: 0;
}
.main-html-content table td > *:last-child,
.main-html-content table th > *:last-child,
.html-content table td > *:last-child,
.html-content table th > *:last-child,
.cke_editable table td > *:last-child,
.cke_editable table th > *:last-child {
  margin-bottom: 0;
}
.main-html-content li > *:first-child,
.html-content li > *:first-child,
.cke_editable li > *:first-child {
  margin-top: 0;
}
.main-html-content li > *:last-child,
.html-content li > *:last-child,
.cke_editable li > *:last-child {
  margin-bottom: 0;
}
.main-html-content > p:last-child,
.main-html-content > :is(h1, h2, h3, h4, h5, h6):last-child,
.html-content > p:last-child,
.html-content > :is(h1, h2, h3, h4, h5, h6):last-child,
.cke_editable > p:last-child,
.cke_editable > :is(h1, h2, h3, h4, h5, h6):last-child {
  margin-bottom: 0;
}
.main-html-content,
.html-content,
.cke_editable {
  /*
   * BS 5.3 table overlay (inset box-shadow) aizsedz inline background-color.
   * --kpe3-cell-bg + !important — lai fons būtu redzams arī pret .table > * > * noteikumiem.
   */
}
.main-html-content table td.kpe3-cell-bg,
.main-html-content table th.kpe3-cell-bg,
.html-content table td.kpe3-cell-bg,
.html-content table th.kpe3-cell-bg,
.cke_editable table td.kpe3-cell-bg,
.cke_editable table th.kpe3-cell-bg {
  --bs-table-bg: transparent !important;
  --bs-table-accent-bg: transparent !important;
  --bs-table-bg-type: transparent !important;
  --bs-table-bg-state: transparent !important;
  background-color: var(--kpe3-cell-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
}
.main-html-content table td.kpe3-cell-fg,
.main-html-content table th.kpe3-cell-fg,
.html-content table td.kpe3-cell-fg,
.html-content table th.kpe3-cell-fg,
.cke_editable table td.kpe3-cell-fg,
.cke_editable table th.kpe3-cell-fg {
  color: var(--kpe3-cell-fg) !important;
}
.main-html-content,
.html-content,
.cke_editable {
  /* Tabulas līniju krāsa / šūnu atstarpe — tikai ja norādīts (klase + CSS var). Tukša mala = revert (frontend). */
}
.main-html-content table.kpe3-table-pad > :not(caption) > * > *,
.html-content table.kpe3-table-pad > :not(caption) > * > *,
.cke_editable table.kpe3-table-pad > :not(caption) > * > * {
  padding-top: var(--kpe3-table-pt, revert) !important;
  padding-right: var(--kpe3-table-pr, revert) !important;
  padding-bottom: var(--kpe3-table-pb, revert) !important;
  padding-left: var(--kpe3-table-pl, revert) !important;
}
.main-html-content table.kpe3-table-bc,
.main-html-content table.kpe3-table-bc > :not(caption) > * > *,
.html-content table.kpe3-table-bc,
.html-content table.kpe3-table-bc > :not(caption) > * > *,
.cke_editable table.kpe3-table-bc,
.cke_editable table.kpe3-table-bc > :not(caption) > * > * {
  border-color: var(--kpe3-table-border) !important;
}
.main-html-content table > :not(caption) > * > td.kpe3-cell-pad,
.main-html-content table > :not(caption) > * > th.kpe3-cell-pad,
.html-content table > :not(caption) > * > td.kpe3-cell-pad,
.html-content table > :not(caption) > * > th.kpe3-cell-pad,
.cke_editable table > :not(caption) > * > td.kpe3-cell-pad,
.cke_editable table > :not(caption) > * > th.kpe3-cell-pad {
  padding-top: var(--kpe3-cell-pt, revert) !important;
  padding-right: var(--kpe3-cell-pr, revert) !important;
  padding-bottom: var(--kpe3-cell-pb, revert) !important;
  padding-left: var(--kpe3-cell-pl, revert) !important;
}
