/**
 * #289 - "Numbered steps" ordered list for editor-built rich text.
 * Figma frame: "What to expect" (node 586-19639).
 *
 * Strictly opt-in: this treatment is applied only by the basic_html CKEditor 5
 * "Numbered Steps" style, which emits `<ol class="steps-list">`. Every selector
 * in this file is rooted at `.steps-list` so ordinary ordered/unordered lists
 * that did not opt in are visually untouched.
 *
 * Markup shape this CSS assumes - one `<li>` per step, the leading `<strong>`
 * being the step title and every remaining node in the `<li>` the description:
 *
 *   <ol class="steps-list">
 *     <li><strong>Check in at registration</strong> Provide your BC Services
 *     Card or ID and describe your medical concern</li>
 *   </ol>
 *
 * The title is promoted to its own line via `display: block`, so editors do not
 * have to author any extra wrapper markup.
 *
 * Typography inherits the site's BC Sans stack from `body` (as every other SAL
 * component CSS file does); only weight/size/line-height/colour are set here.
 */

/* SPECIFICITY: plain single-class selectors are enough. The only list rules
   that could outrank a component class are style.css's element-level resets
   (`ul, ol { margin-top: 0; margin-bottom: 10px }` and
   `ol, ul { padding-left: 1.5em }`), both 0-0-1, and there is no
   `.region.region-content` list rule in custom-overrides.css to lose to - so
   no `.region.region-content` scoping is needed here (contrast
   css/component/sal/sal-how-to-access.css:12-14, which does need it). */
.steps-list {
  list-style: none;
  counter-reset: step;
  /* Replaces the browser/Bootstrap list defaults (10px bottom margin,
     1.5em left padding). The 16px bottom keeps the step rhythm going into
     whatever follows the list - in Figma, the "Bring with you" callout. */
  margin: 0 0 16px;
  padding: 0;
}

/* Each step: a 32px badge gutter plus 16px between badge and text. The step
   description typography lives here and is overridden by the title rule
   below. */
.steps-list > li {
  counter-increment: step;
  position: relative;
  margin: 0 0 16px;
  padding-left: 48px;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  color: #666;
}

.steps-list > li:last-child {
  margin-bottom: 0;
}

/* The step number badge. #E6F1FB (fill) and #378ADD (digit) are one-off Figma
   values with no design token, so they are written literally - as sibling SAL
   component CSS already does for one-off Figma values. */
.steps-list > li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: #E6F1FB;
  color: #378ADD;
  font-size: 16px;
  font-weight: 700;
  line-height: 27.2px;
}

/* Step title: the leading <strong> of the <li>, promoted to its own line with
   4px separating it from the description beneath. */
.steps-list > li > strong:first-child {
  display: block;
  margin-bottom: 4px;
  font-size: 19px;
  font-weight: 700;
  line-height: 28.5px;
  color: #1a1a1a;
}
