/* rich-text.css — HTML written in the CMS editor, rendered as authored.

   The locale sheets reset every list for the site's chrome
   (`ul { padding: 0; list-style: none }` in style.css / en.css), and
   Bootstrap's reboot pads lists on the LEFT whatever the direction. Both are
   right for menus and wrong for an editor's bullet list, which came out as
   plain lines. Put `ul-rich-text` on the element that wraps editor HTML and
   its lists get their markers back, on the reading side, in either locale.

   Loaded site-wide from components/layout/default.blade.php, after the
   locale sheet. Every selector is wrapped in :where() so it weighs no more
   than the bare `ul` reset it undoes: a wrapper that already spaces its own
   lists (.ul-pc-inpage-body ul, .ul-dept-modal-body ul …) keeps its values,
   and only gains the markers. */

:where(.ul-rich-text) ul,
:where(.ul-rich-text) ol {
  padding: 0;
  padding-inline-start: 1.5em;
  list-style-position: outside;
}

:where(.ul-rich-text) ul { list-style-type: disc; }
:where(.ul-rich-text) ol { list-style-type: decimal; }

:where(.ul-rich-text) :is(ul, ol) ul { list-style-type: circle; }
:where(.ul-rich-text) :is(ul, ol) :is(ul, ol) ul { list-style-type: square; }

/* A nested list sits under its item, not a paragraph away from it. */
:where(.ul-rich-text) li > :is(ul, ol) {
  margin-block: 0.4em 0;
}

/* Editor task lists draw their own checkboxes. */
:where(.ul-rich-text) ul[data-type="taskList"] {
  padding-inline-start: 0;
  list-style: none;
}
