.pagination {
  box-sizing: border-box;
  display: grid;
  gap: calc(var(--layout-spacing) / 2);
  grid-template-areas: "pagination-start pagination-center pagination-end";
  grid-template-columns: 1fr minmax(auto, 1fr) 1fr;
  background-color: var(--theme-background);
  color: var(--theme-text);
  align-items: center;
  width: 100%;
  max-width: var(--constraints-pagination, 100%);
}

.paginationListItem {
  box-sizing: border-box;
  list-style: none;
}

.paginationListItem:has(.previousButton) {
  grid-area: pagination-start;
}

.paginationListItem:has(.progression) {
  grid-area: pagination-center;
}

.paginationListItem:has(.nextButton) {
  grid-area: pagination-end;
}

.paginationListItem button {
  box-sizing: border-box;
  padding: calc(var(--icon-size, 24px) * (1/4)) calc(var(--layout-spacing) / 2);
  gap: calc(var(--layout-spacing) / 2);
  max-height: calc(var(--icon-size, 24px) * 2);
  max-width: 100%;
  border-radius: var(--layout-radius);
  display: flex;
  align-items: center;
}

.nextButton {
  margin-inline-start: auto;
  text-align: end;
}

.paginationListItem button[data-hovered] {
  background-color: var(--theme-hover);
}

.paginationListItem button[data-focus-visible] {
  outline: 2px solid var(--theme-focus);
}

.paginationListItem button[data-disabled] {
  color: var(--theme-disable);
}

.paginationListItem button .paginationLabel {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.paginationListItem button svg {
  flex: none;
  width: var(--icon-size, 24px);
  height: var(--icon-size, 24px);
  fill: var(--theme-text);
}