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

@import "../base/variables.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--gray-20);
  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--blue-20);
}

.pager__item--control {
  & path {
    /* IE11 Specific. */
    @media (-ms-high-contrast: active) {
      fill: currentColor;
    }

    @media (forced-colors: active) {
      fill: linktext;
    }
  }
}

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

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

.pager__link:focus {
  color: var(--color--blue-20);
  outline: solid 2px var(--color--blue-20);
  outline-offset: -2px;
}

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

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