@use "@sass-palette/hope-config";
.vp-pagination {
  margin: 1.25rem 0 0.75rem;
  font-weight: 600;
  font-size: 15px;
  line-height: 2;
}

.vp-pagination-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;

  user-select: none;
}

.vp-pagination-number {
  display: flex;
  align-items: stretch;

  overflow: hidden;

  height: 30px;
  margin: 0 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;

  // stylelint-disable max-nesting-depth
  // stylelint-disable selector-max-compound-selectors
  div {
    position: relative;

    padding: 0 0.5rem;

    background: var(--bg-color);
    color: var(--theme-color);

    cursor: pointer;

    &::before {
      content: " ";

      position: absolute;
      top: 0;
      bottom: 0;

      // NOTE: Compatible with Android Wechat
      // inset-inline-start: 0;
      left: 0;

      width: 1px;

      background: var(--border-color);

      #{hope-config.$rtl-selector} & {
        right: 0;
        left: unset;
      }
    }

    &:first-child::before {
      background: transparent;
    }

    &:hover {
      color: var(--theme-color-light);
    }

    &.active {
      background: var(--theme-color);
      color: var(--white);

      &::before {
        background: var(--theme-color);
      }
    }

    &.active + div::before {
      background: var(--theme-color);
    }

    &.prev,
    &.next {
      font-size: 13px;
      line-height: 30px;
    }

    &.active,
    &.ellipsis {
      cursor: default;
    }
  }
  // stylelint-enable max-nesting-depth
  // stylelint-enable selector-max-compound-selectors
}

.vp-pagination-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem;

  input {
    width: 3.5rem;
    margin: 6px 5px;
    border: 1px solid var(--border-color);
    border-radius: 0.25em;

    background: var(--bg-color);
    color: var(--text-color);
    outline: none;

    line-height: 2;
    text-align: center;
  }
}

.vp-pagination-button {
  overflow: hidden;

  padding: 0 0.75em;
  border: 1px solid var(--border-color);
  border-radius: 0.25em;

  background: var(--bg-color);
  color: var(--theme-color);
  outline: none;

  font-weight: 600;
  font-size: 15px;
  line-height: 2;

  cursor: pointer;

  &:hover {
    color: var(--theme-color-light);
  }
}
