/*
 * Renderização das listas geradas pelo editor Quill 2 (área de conteúdo pública).
 * O Quill grava TODA lista como <ol><li data-list="bullet|ordered|checked|unchecked">
 * e depende do CSS dele para exibir o marcador via <span class="ql-ui">.
 * Escopo restrito a .rich-content para não afetar menus, navegação etc.
 */
.rich-content ol:has(> li[data-list]) {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1em;
    counter-reset: rc-0 rc-1 rc-2 rc-3 rc-4 rc-5 rc-6 rc-7 rc-8;
}

.rich-content ol > li[data-list] {
    list-style-type: none;
    padding-left: 1.5em;
    position: relative;
}

.rich-content ol > li[data-list] > .ql-ui {
    position: absolute;
    left: 0;
    width: 1.2em;
    margin-right: 0.3em;
    text-align: right;
    white-space: nowrap;
}

.rich-content ol > li[data-list="bullet"] > .ql-ui::before {
    content: "\2022";
}
.rich-content ol > li[data-list="checked"] > .ql-ui::before {
    content: "\2611";
}
.rich-content ol > li[data-list="unchecked"] > .ql-ui::before {
    content: "\2610";
}
.rich-content ol > li[data-list="ordered"] > .ql-ui::before {
    content: counter(rc-0, decimal) ". ";
}

/* Contadores e recuos (níveis 1..8) */
.rich-content ol > li[data-list="ordered"] {
    counter-increment: rc-0;
}
.rich-content ol > li[data-list]:not(.ql-indent-1) {
    counter-reset: rc-1 rc-2 rc-3 rc-4 rc-5 rc-6 rc-7 rc-8;
}

.rich-content ol > li.ql-indent-1[data-list="ordered"] {
    counter-increment: rc-1;
}
.rich-content ol > li.ql-indent-1[data-list="ordered"] > .ql-ui::before {
    content: counter(rc-1, lower-alpha) ". ";
}
.rich-content ol > li.ql-indent-1:not(.ql-indent-2) {
    counter-reset: rc-2 rc-3 rc-4 rc-5 rc-6 rc-7 rc-8;
}

.rich-content ol > li.ql-indent-2[data-list="ordered"] {
    counter-increment: rc-2;
}
.rich-content ol > li.ql-indent-2[data-list="ordered"] > .ql-ui::before {
    content: counter(rc-2, lower-roman) ". ";
}
.rich-content ol > li.ql-indent-2:not(.ql-indent-3) {
    counter-reset: rc-3 rc-4 rc-5 rc-6 rc-7 rc-8;
}

.rich-content ol > li.ql-indent-3[data-list="ordered"] {
    counter-increment: rc-3;
}
.rich-content ol > li.ql-indent-3[data-list="ordered"] > .ql-ui::before {
    content: counter(rc-3, decimal) ". ";
}
.rich-content ol > li.ql-indent-4[data-list="ordered"] {
    counter-increment: rc-4;
}
.rich-content ol > li.ql-indent-4[data-list="ordered"] > .ql-ui::before {
    content: counter(rc-4, lower-alpha) ". ";
}
.rich-content ol > li.ql-indent-5[data-list="ordered"] {
    counter-increment: rc-5;
}
.rich-content ol > li.ql-indent-5[data-list="ordered"] > .ql-ui::before {
    content: counter(rc-5, lower-roman) ". ";
}
.rich-content ol > li.ql-indent-6[data-list="ordered"] {
    counter-increment: rc-6;
}
.rich-content ol > li.ql-indent-6[data-list="ordered"] > .ql-ui::before {
    content: counter(rc-6, decimal) ". ";
}
.rich-content ol > li.ql-indent-7[data-list="ordered"] {
    counter-increment: rc-7;
}
.rich-content ol > li.ql-indent-7[data-list="ordered"] > .ql-ui::before {
    content: counter(rc-7, lower-alpha) ". ";
}
.rich-content ol > li.ql-indent-8[data-list="ordered"] {
    counter-increment: rc-8;
}
.rich-content ol > li.ql-indent-8[data-list="ordered"] > .ql-ui::before {
    content: counter(rc-8, lower-roman) ". ";
}

.rich-content ol > li[data-list].ql-indent-1 {
    padding-left: 4.5em;
}
.rich-content ol > li[data-list].ql-indent-2 {
    padding-left: 7.5em;
}
.rich-content ol > li[data-list].ql-indent-3 {
    padding-left: 10.5em;
}
.rich-content ol > li[data-list].ql-indent-4 {
    padding-left: 13.5em;
}
.rich-content ol > li[data-list].ql-indent-5 {
    padding-left: 16.5em;
}
.rich-content ol > li[data-list].ql-indent-6 {
    padding-left: 19.5em;
}
.rich-content ol > li[data-list].ql-indent-7 {
    padding-left: 22.5em;
}
.rich-content ol > li[data-list].ql-indent-8 {
    padding-left: 25.5em;
}
.rich-content ol > li[data-list].ql-indent-1 > .ql-ui {
    left: 3em;
}
.rich-content ol > li[data-list].ql-indent-2 > .ql-ui {
    left: 6em;
}
.rich-content ol > li[data-list].ql-indent-3 > .ql-ui {
    left: 9em;
}
.rich-content ol > li[data-list].ql-indent-4 > .ql-ui {
    left: 12em;
}
.rich-content ol > li[data-list].ql-indent-5 > .ql-ui {
    left: 15em;
}
.rich-content ol > li[data-list].ql-indent-6 > .ql-ui {
    left: 18em;
}
.rich-content ol > li[data-list].ql-indent-7 > .ql-ui {
    left: 21em;
}
.rich-content ol > li[data-list].ql-indent-8 > .ql-ui {
    left: 24em;
}

/* Alinhamentos do Quill */
.rich-content .ql-align-center {
    text-align: center;
}
.rich-content .ql-align-right {
    text-align: right;
}
.rich-content .ql-align-justify {
    text-align: justify;
}

/* Listas HTML nativas (<ul>/<ol> sem data-list): o reset do tema remove os marcadores */
.rich-content ul {
    list-style: disc outside;
    padding-left: 1.5em;
    margin-bottom: 1em;
}
.rich-content ul ul {
    list-style-type: circle;
}
.rich-content ol:not(:has(> li[data-list])) {
    list-style: decimal outside;
    padding-left: 1.5em;
    margin-bottom: 1em;
}
.rich-content ul > li,
.rich-content ol:not(:has(> li[data-list])) > li {
    list-style: inherit;
}

.pbmit-firstletter .rich-content img {
    width: 100%;
    object-fit: cover;
}
