/*
 * The paging control under a collection block (graduated clients, team grid).
 * Markup: resources/views/partials/collection-paging.blade.php. Plain CSS,
 * served from source. Spacing above the control belongs to each block.
 */
.collection-paging {
  display: flex;
  justify-content: center;
}

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

.collection-paging__page,
.collection-paging__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-button);
  font-family: var(--font-display);
  font-size: var(--text-button);
  font-weight: var(--text-button--font-weight);
  color: var(--color-ink);
  text-decoration: none;
}

.collection-paging__page[aria-current='page'] {
  background: var(--color-ink);
  color: var(--color-white);
}

a.collection-paging__page:hover,
.collection-paging__step:hover {
  text-decoration: underline;
}

.collection-paging a:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 0;

  /* Sits on paper and surface only, where ink already clears 3:1 */
  box-shadow: none;
}

/* Cards a Load more appends. collection-paging.js sets data-revealing on
   them and removes it after 1000ms; --ws-reveal-i (capped at 8) staggers the
   fade. The team grid keeps its own, longer reveal. */
[data-revealing] {
  animation: collection-reveal 500ms var(--ease-out) both;
  animation-delay: calc(var(--ws-reveal-i, 0) * 60ms);
}

@keyframes collection-reveal {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-revealing] {
    animation: collection-fade 150ms linear both;
    animation-delay: 0s;
  }

  @keyframes collection-fade {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }
}
