@import './../theme/vars.scss';
@import './../mixins/reset.scss';

$paginationPrefixCls: #{$vender-prefix}-pagination;
$paperPrefixCls: #{$vender-prefix}-paper;

$paging-item-height: 2.5em;

.#{$paginationPrefixCls} {
  &-row {
    margin-right: -15px;
    margin-left: -15px;
  }

  &-total-size {
    color: red;
  }

  &-total-name {
    margin-left: 20px;
    line-height: 32px;
  }

  &-layout-div {
    @include reset-component2;

    display: inline-block;
    vertical-align: middle;
  }

  &-layout-right {
    @include reset-component2;

    display: inline-block;
    padding-right: 15px;

    .#{$vender-prefix}-select {
      min-width: 9em;
    }
  }

  &-label-font {
    font-weight: normal;
  }

  &-go {
    display: inline-block;
    vertical-align: middle;

    &-number {
      width: 40px;
      height: 2.3em;
    }

    &-jumper {
      height: 2.1em;
      padding: 0 1em;
      margin-left: 10px;
    }
  }

  &-paging {
    display: inline-block;
    padding-left: 0;
    margin: 0 10px 0 0;
    margin-right: 10px;
    vertical-align: middle;

    li {
      display: inline;
      cursor: pointer;
      user-select: none;

      span,
      a {
        position: relative;
        float: left;
        width: 40px;
        height: $paging-item-height;
        padding: 0;
        margin-left: -1px;
        line-height: $paging-item-height;
        color: #666;
        text-align: center;
        border: 1px solid #ddd;
      }

      span {
        cursor: default;
        background-color: white;

        &:hover {
          background: none;
        }
      }

      a {
        text-decoration: none;
        vertical-align: middle;

        &:hover {
          color: var(--primary-color);
          text-decoration: none;
        }
      }
    }

    li#{&}-li-prev {
      height: $paging-item-height;
      margin-left: 0;
      line-height: 28px;
      border-bottom-left-radius: 2px;
      border-top-left-radius: 2px;
    }

    li#{&}-li-next {
      height: $paging-item-height;
      line-height: 28px;
      border-top-right-radius: 2px;
      border-bottom-right-radius: 2px;
    }

    li#{&}-li-frist {
      color: #999;
      cursor: default;
      background: #eceff1;
    }

    li#{&}-li-frist:hover {
      color: #999;
      cursor: default;
      background: #eceff1;
      border-top: 1px solid #ddd;
      border-bottom: 1px solid #ddd;
    }

    li#{&}-li-end {
      color: #999;
      background: #eceff1;
    }

    li#{&}-li-end:hover {
      color: #999;
      cursor: default;
      background: #eceff1;
      border-top: 1px solid #ddd;
      border-bottom: 1px solid #ddd;
    }

    li#{&}-li-active a {
      color: white;
      cursor: default;
      background: $primary-color-deep;
      border-top: 1px solid $primary-color-deep;
      border-bottom: 1px solid $primary-color-deep;
    }

    li#{&}-li-active a:hover {
      color: white;
    }
  }
}

.assistant-inner {
  &-count {
    color: red;
  }
}

// paper
$itemBackgroundNormal: var(--item-background-normal, white);
$itemColorNormal: var(--item-color-normal, #666);
$itemBackgroundActive: var(--item-background-active, #1a4fa3);
$itemBorderActive: var(--item-border-color-active, #1a4fa3);
$itemBackgroundHover: var(--item-background-hover, #345fa6);
$itemColorActive: var(--item-color-active, white);

.#{$paperPrefixCls} {
  display: inline-block;
  border-radius: 4px;

  li {
    display: inline;
    cursor: pointer;
    user-select: none;

    span,
    a {
      position: relative;
      float: left;
      width: 40px;
      height: $paging-item-height;
      padding: 0;
      margin-left: -1px;
      line-height: $paging-item-height;
      color: $itemColorNormal;
      text-align: center;
      border: 1px solid #ddd;
    }

    span {
      cursor: default;
      background-color: white;

      &:hover {
        background: none;
      }
    }

    a {
      text-decoration: none;
      vertical-align: middle;
      background: $itemBackgroundNormal;

      &:hover {
        color: $itemBackgroundHover;
        text-decoration: none;
      }
    }

    &:first-child {
      a,
      span {
        margin-left: 0;
        border-radius: 4px 0 0 4px;
      }
    }

    &:last-child {
      a,
      span {
        border-radius: 0 4px 4px 0;
      }
    }

    &.#{$paperPrefixCls}-li-disabled {
      span,
      span:hover,
      span:focus,
      a,
      a:hover,
      a:focus {
        color: #777;
        cursor: not-allowed;
        background-color: white;
        border-color: #ddd;
      }
    }
  }

  &-li {
    &#{&}-active {
      span,
      span:hover,
      span:focus,
      a,
      a:hover,
      a:focus {
        color: $itemColorActive;
        cursor: default;
        background-color: $itemBackgroundActive;
        border-color: $itemBorderActive;
      }
    }
  }
}
