/**
 * Drupal pager
 *
 * The pager is intentionally compact: numbered pages use circular controls,
 * while the next/last links retain their text for clarity.
 */
.pager {
  margin-block: clamp(2rem, 5vw, 4.5rem);
}

.pager__items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pager__item {
  margin: 0;
  padding: 0;
}

.pager__item a {
  display: inline-grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--type-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.pager__item a:hover {
  border-color: var(--cp-eucalyptus);
  background: var(--cp-eucalyptus);
  color: #fff;
  text-decoration: none;
}

.pager__item a:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

.pager__item.is-active a {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--cp-charcoal);
}

.pager__item.is-active a:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--cp-charcoal);
}

/* Keep Drupal's labels visible for the directional actions. */
.pager__item--next a,
.pager__item--last a,
.pager__item--previous a,
.pager__item--first a {
  width: auto;
  padding-inline: 1rem;
  border-radius: 999px;
  gap: 0.25rem;
}

@media (max-width: 480px) {
  .pager__items {
    gap: 0.375rem;
  }

  .pager__item a {
    min-width: 2.5rem;
    min-height: 2.5rem;
  }

  .pager__item--last {
    display: none;
  }
}
