/**
 * Pager rules carried over from Drupal 7 core (modules/system/system.theme.css).
 *
 * Drupal 7 wrapped the pager in <div class="item-list"><ul class="pager"> and
 * core styled it with the three rules below. Drupal 11 core dropped all of them
 * — pager styling now lives in each theme — so without this file the strip
 * loses its spacing and the current page stops being bold.
 *
 * templates/pager.html.twig rebuilds the D7 wrapper, so these selectors match
 * again as written.
 *
 * Load order matters and is set in nus.libraries.yml: this file comes before
 * style.css, mirroring D7 where module CSS preceded theme CSS. That lets
 * style.css keep winning with its own narrower rules, which is what makes the
 * Browse by Convention pager tighter than the other two browse pages:
 *
 *   .view-id-case_by_article .pager li    { padding: 0 }
 *   .view-id-case_by_article .pager li>a  { padding: 5px 5px }
 *
 * Both have the same specificity as ".item-list .pager li", so source order is
 * the only thing deciding it — swapping these two files would silently change
 * that page's appearance.
 */

.item-list .pager {
  clear: both;
  text-align: center;
}

/**
 * The pager's own vertical margin. Drupal 7 core has
 *
 *   .item-list ul { margin: 0 0 0.75em 0; padding: 0 }
 *
 * and at (0,1,1) it outranks Bootstrap's ".pager { margin: 20px 0 }", so on D7
 * the strip sits flush at the top of the results column with 10.5px beneath it.
 * Without this rule Bootstrap's 20px applies on both sides, which pushed the
 * pager 20px lower than D7 (measured: ul.pager top at 294 on D7, 314 here) and
 * moved it out of line with the filter column on the browse pages.
 *
 * Missed on the first pass because those searches were filtered by the word
 * "pager" in the selector, and this one has none.
 */
.item-list ul {
  margin: 0 0 0.75em 0;
  padding: 0;
}

/**
 * This is what spaces the numbers apart. margin-left: 1.5em is 21px at the
 * pager's 14px font, and measuring both sites put the gap between items at
 * 24.9px on D7 against 3.9px here — 3.9px being just the collapsed newline
 * between the tags, and 21px being exactly this rule.
 *
 * It survives the narrower rules below because they only ever reset padding;
 * nothing in the theme touches the margin, so it applies on every browse page.
 */
.item-list ul li {
  margin: 0 0 0.25em 1.5em;
  padding: 0;
}

.item-list .pager li {
  background-image: none;
  display: inline;
  list-style-type: none;
  padding: 0.5em;
}

.pager-current {
  font-weight: bold;
}

/**
 * The search views use a mini pager, whose template emits <nav class="pager">
 * with no .item-list wrapper, so the rule above cannot reach it. The clear is
 * what drops the pager below both floated columns on the browse pages —
 * without it the pager stops at the foot of the results column while the much
 * longer filter column carries on beside it.
 */
.view .pager {
  clear: both;
  text-align: center;
}
