/* Only direct items receive this list's marker; nested lists keep their own settings. */
.be-list-markers>li,li.be-list-markers{list-style-type:none!important;list-style-image:none!important;position:relative;}
.be-list-markers>li::marker,li.be-list-markers::marker{content:""!important;}
.be-list-markers>li::before,li.be-list-markers::before{content:var(--be-list-marker);color:var(--be-list-marker-color,currentColor);font-family:var(--be-list-marker-font,inherit);font-weight:var(--be-list-marker-weight,inherit);position:absolute;inset-inline-end:calc(100% + .45em);top:0;white-space:nowrap;line-height:inherit;pointer-events:none;}

/* Color affects the marker only, including native markers when no custom icon is set. */
[data-be-list-marker-color]>li::marker,li[data-be-list-marker-color]::marker{color:var(--be-list-marker-color,currentColor);}

/* Use the native list-item counter to preserve start, reversed and item values. */
ol[data-be-list-number-style]>li:not(.be-list-markers){list-style-type:none!important;list-style-image:none!important;position:relative;}
ol[data-be-list-number-style]>li:not(.be-list-markers)::marker{content:""!important;}
ol[data-be-list-number-style]>li:not(.be-list-markers)::before{content:counter(list-item);color:var(--be-list-marker-color,currentColor);font-family:inherit;font-weight:600;font-size:1em;position:absolute;inset-inline-end:calc(100% + .45em);top:0;white-space:nowrap;line-height:inherit;pointer-events:none;box-sizing:border-box;}
/* Compact default; the list indent control supplies an inline override. */
:is(ul,ol):is(.be-list-markers,[data-be-list-number-style],:has(>li.be-list-markers)){padding-inline-start:.6em;}
.be-list-markers>li::before,li.be-list-markers::before,ol[data-be-list-number-style]>li:not(.be-list-markers)::before{width:1.65em;min-width:1.65em;box-sizing:border-box;text-align:center;}
/* Badges must occupy real flow space, even with a theme's tight line-height. */
ol:is([data-be-list-number-style=circle],[data-be-list-number-style=rounded])>li:not(.be-list-markers){min-height:1.65em;margin-block-start:.15em;margin-block-end:.15em;}
ol:is([data-be-list-number-style=circle],[data-be-list-number-style=rounded])>li:not(.be-list-markers)::before{background-color:var(--be-list-number-bg,#eeeeee);min-width:1.65em;height:1.65em;line-height:1.65em;text-align:center;padding:0 .2em;top:max(0px,calc((1lh - 1.65em)/2));}
ol[data-be-list-number-style=circle]>li:not(.be-list-markers)::before{border-radius:50%;}
ol[data-be-list-number-style=rounded]>li:not(.be-list-markers)::before{border-radius:.3em;}
ol[data-be-list-number-style=zero]>li:not(.be-list-markers)::before{content:counter(list-item,decimal-leading-zero) ".";}

/* Separators belong only to the direct list items, excluding the last LI.
   :last-of-type also ignores the editor's trailing block appender. */
:is(ul,ol)[data-be-list-separators]{--be-list-separator-color:#dddddd;}
:is(ul,ol)[data-be-list-separators]>li:not(:last-of-type){position:relative;padding-block-end:.5em;margin-block-end:.5em;}
:is(ul,ol)[data-be-list-separators]>li:not(:last-of-type)::after{content:"";position:absolute;inset-inline-start:-1.5em;inset-inline-end:0;bottom:0;border-bottom:1px solid var(--be-list-separator-color);pointer-events:none;}
:is(ul,ol)[data-be-list-separators]:is(.be-list-markers,[data-be-list-number-style])>li:not(:last-of-type)::after,:is(ul,ol)[data-be-list-separators]>li.be-list-markers:not(:last-of-type)::after{inset-inline-start:-2.2em;}
:is(ul,ol)[data-be-list-separators=dotted]>li:not(:last-of-type)::after{border-bottom-style:dotted;}
:is(ul,ol)[data-be-list-separators=dashed]>li:not(:last-of-type)::after{border-bottom-style:dashed;}

/* The editor list origin is 1.9em shallower than the front-end theme origin.
   Offset the editor only; explicit settings use the same offset in lists.js. */
:is(ul,ol)[data-block]:is(.be-list-markers,[data-be-list-number-style],[data-be-list-marker-type=fontawesome],[data-be-list-marker-type=emoji],:has(>li[data-be-list-marker]:not([data-be-list-marker=""]))){padding-inline-start:2.5em;}
:is(ul,ol)[data-block]:is(.be-list-markers,[data-be-list-number-style],[data-be-list-marker-type=fontawesome],[data-be-list-marker-type=emoji],:has(>li[data-be-list-marker]:not([data-be-list-marker=""])))>li[data-block]{margin-inline-start:0;margin-inline-end:0;}

/* Tab panels provide a padded content box; keep marker columns inside it.
   Explicit per-list inline indentation continues to take precedence. */
.be-tab-panel :is(ul,ol):not([data-block]):is(.be-list-markers,[data-be-list-number-style],:has(>li.be-list-markers)){padding-inline-start:1.5em;}
