.ds-pagination__nav {
  margin: 0 0 1.125rem 1.125rem;
}

.ds-pagination__nav--next {
  margin-left: 1.125rem;
}

.ds-pagination__nav--previous {
  margin-right: 1.125rem;
}

.ds-pagination__item {
  color: var(--ds-color-london-5);
  font-family: var(--ds-type-system-sans-lining);
  font-size: var(--ds-type-scale-1);
  font-weight: 400;
  line-height: var(--ds-type-leading-border-link);
  margin: 0 1.125rem 1.125rem;
  text-align: center;
  span {
    border: solid 0.0625rem transparent;
    border-radius: 1rem;
    box-sizing: border-box;
    display: inline-block;
    height: 2rem;
    min-width: 2rem;
    padding: 0.25rem 0.75rem;
  }
}

.ds-pagination__item--active {
  span {
    border-color: var(--ds-color-london-20);
  }
}

.ds-pagination__nav-link {
  border-bottom: 0.0625rem solid var(--ds-color-chicago-45);
  color: var(--ds-color-london-5);
  font-family: var(--ds-type-system-sans);
  font-size: var(--ds-type-scale-0);
  font-weight: 400;
  line-height: var(--ds-type-leading-border-link);
  text-decoration: none;
  transition: border-color var(--ds-interactions-transition), color var(--ds-interactions-transition);
  &:hover {
    border-bottom-color: var(--ds-color-chicago-30);
    color: var(--ds-color-chicago-30);
  }
  &:focus {
    border-bottom-color: transparent;
    box-shadow: 0 0 0 0.0625rem var(--ds-color-hong-kong-55);
    outline: solid transparent;
  }
  &:active {
    border-bottom-color: var(--ds-color-hong-kong-55);
    box-shadow: none;
    color: var(--ds-color-london-5);
  }
  .ds-pagination__nav--disabled & {
    border-bottom-color: transparent;
    color: var(--ds-color-london-35);
    cursor: not-allowed;
    &:focus {
      box-shadow: none;
    }
  }
}

.ds-pagination__item-link {
  color: var(--ds-color-chicago-45);
  text-decoration: none;
  span {
    transition: background-color var(--ds-interactions-transition), border-color var(--ds-interactions-transition), color var(--ds-interactions-transition);
  }
  &:hover {
    span {
      background-color: var(--ds-color-london-95);
      color: var(--ds-color-chicago-30);
    }
  }
  &:focus {
    outline: solid transparent;
    span {
      border-color: var(--ds-color-hong-kong-55);
    }
  }
  &:active {
    span {
      background-color: var(--ds-color-london-95);
      border-color: var(--ds-color-hong-kong-55);
    }
  }
}

@media (max-width: 28rem) {
  .ds-pagination__nav {
    flex: 0 0 100%;
    margin-left: 0;
    margin-right: 0;
    text-align: center;
  }
}

@media (--ds-viewport-min-medium) {
  .ds-pagination__item {
    margin-left: 0.625rem;
    margin-right: 0.625rem;
  }
  .ds-pagination__nav--next {
    margin-left: 1.375rem;
  }
  .ds-pagination__nav--previous {
    margin-right: 1.375rem;
  }
}
