@layer components {
  /* Kaminari pagination, same markup as the legacy theme (ul.pagination > li > a); the current page and gaps are spans. */
  .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;

    & a,
    & span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 2.125rem;
      height: 2.125rem;
      padding: 0 0.625rem;
      border-radius: var(--radius);
      border: 1px solid var(--color-line-strong);
      background: var(--color-surface);
      color: var(--color-ink);
      font-size: 0.875rem;
      font-weight: 600;
      text-decoration: none;

      &:is(a):hover { background: var(--color-chip); text-decoration: none; }
    }

    & .active span { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-canvas); }
    & .disabled span { color: var(--color-ink-muted); border-color: transparent; background: transparent; }
  }
}
