/*
  Post pagination (the_posts_pagination) — shared by search.php, index.php and
  archive.php. WordPress renders <nav class="pagination"> containing a
  .screen-reader-text heading ("Berichten paginering") and a .nav-links row of
  .page-numbers. We keep the heading for assistive tech but hide it visually,
  centre the controls, offset them from the results and give each control a
  pill/circle button treatment.
*/

.pagination {
  margin-block-start: var(--space-xl);
}

/* The heading stays in the DOM for screen readers; visually hidden here
   (mirrors the .visually-hidden rule in common/base.css). */
.pagination .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Centre the controls horizontally. */
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
}

/* Each control: a ≥44px (WCAG target-size) pill/circle. */
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 2.75rem;
  block-size: 2.75rem;
  padding-inline: var(--space-s);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background-color: var(--color-white);
  color: var(--color-link);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

/* Only real links react to hover/focus (current page + dots are not links). */
a.page-numbers:hover,
a.page-numbers:focus-visible {
  border-color: var(--color-green-strong);
  background-color: var(--color-green-pale);
  color: var(--color-green-strong);
}

/* Current page: filled, high-contrast (white on green-strong ≈ 7:1, AA). */
.pagination .page-numbers.current {
  background-color: var(--color-green-strong);
  border-color: var(--color-green-strong);
  color: var(--color-white);
}

/* Ellipsis between page ranges: plain, no chrome. */
.pagination .page-numbers.dots {
  border-color: transparent;
  background-color: transparent;
  min-inline-size: auto;
  padding-inline: var(--space-3xs);
}
