/**
 * @file
 * Styles for pagination.
 */

@import "../base/media-queries.pcss.css";

.pager__items {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-block: 0;
  margin-inline-start: 0;
  padding-block: 0;
  padding-inline-start: 0;
  padding-inline-end: 0;
  list-style: none;
  font-weight: bold;
}

.pager__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--sp2-5);
  height: var(--sp2-5);
  cursor: default;
  color: var(--color-text-neutral-soft);
  background-color: var(--color--white);

  @media (--sm) {
    width: var(--sp3);
    height: var(--sp3);
  }
}

[dir="rtl"] .pager__item--control {
  transform: scaleX(-1);
}

.pager__item--active {
  color: var(--color--white);
  background-color: var(--color--primary-40);
}

.pager__item--control {
  @media (forced-colors: active) {
    & path {
      fill: linktext;
    }
  }
}

.pager__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: var(--color-text-neutral-soft);
}

.pager__link:hover {
  background-color: var(--color--gray-95);
}

.pager__link:focus {
  color: var(--color-text-primary-medium);
  outline: solid 2px currentColor;
  outline-offset: -2px;
}

.pager__item svg {
  display: block;
  fill: currentColor;
}

.pager__item--next svg,
.pager__item--last svg {
  transform: rotate(180deg);
}
