@use "../../wc";

.pagination {
  margin: var(--zn-spacing-medium) auto;
  display: flex;
  flex-direction: row;
  justify-content: center;

  &__item {
    border-width: 1px;
    border-right-width: 0;
    background-color: rgba(var(--zn-panel), var(--zn-panel-opacity));
    position: relative;
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
    color: rgb(var(--zn-text));

    a {
      color: inherit;
      text-decoration: none;
    }

    &:before {
      position: absolute;
      content: '';
      bottom: -3px;
      left: 0;
      right: -3px;
      height: 20px;
      background-color: rgb(var(--zn-shadow));
      z-index: -1;
    }

    &:first-of-type {
      border-top-left-radius: var(--zn-spacing-small);
      border-bottom-left-radius: var(--zn-spacing-small);

      &:before {
        border-bottom-left-radius: var(--zn-spacing-small);
      }
    }

    &:last-of-type {
      border-right-width: 1px;
      border-top-right-radius: var(--zn-spacing-small);
      border-bottom-right-radius: var(--zn-spacing-small);

      &:before {
        border-bottom-right-radius: var(--zn-spacing-small);
        right: 0;
      }
    }

    .pagination__button {
      display: block;
      background-color: transparent;
      color: inherit;
      font-size: inherit;
      line-height: inherit;
      font-weight: inherit;
      padding: var(--zn-spacing-small) var(--zn-spacing-medium);

      &:disabled, &--disabled {
        cursor: not-allowed;
        opacity: 0.5;
      }
    }
  }

  &__button--active {
    color: rgb(var(--zn-primary)) !important;
    font-weight: 600 !important;
    pointer-events: none;
  }
}
