@import '../styles/themes/themes.less';

.@{bk-prefix}-pagination {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #63656e;
  letter-spacing: normal;
  user-select: none;

  &.is-disabled {
    * {
      cursor: not-allowed;
    }
  }

  &.is-align-left {
    justify-content: flex-start;
  }

  &.is-align-center {
    justify-content: center;
  }

  &.is-align-right {
    justify-content: flex-end;
  }

  & > * {
    margin: 0 6px;
  }

  & > .is-first {
    margin-left: 0;
  }

  & > .is-last {
    margin-right: 0;
  }
}
.@{bk-prefix}-pagination-total {
  display: flex;
  user-select: none;
}

.@{bk-prefix}-pagination-total-num {
  padding: 0 2px;
}

.@{bk-prefix}-pagination-list {
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.@{bk-prefix}-pagination-list-pre-batch,
.@{bk-prefix}-pagination-list-next-batch,
.@{bk-prefix}-pagination-list-pre,
.@{bk-prefix}-pagination-list-next,
.@{bk-prefix}-pagination-list-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 4px;
  margin-right: 2px;
  margin-left: 2px;
  color: #63656e;
  cursor: pointer;
  user-select: none;
  background: #fff;
  border-radius: 2px;

  &.is-active {
    color: #3a84ff;
    background: #e1ecff;
  }

  &:hover {
    background: #f0f1f5;
  }

  &.is-disabled {
    color: #c4c6cc;
    cursor: not-allowed;
    background-color: #fafbfd;
    border-color: #dcdee5;
  }
}

.@{bk-prefix}-pagination-list-pre,
.@{bk-prefix}-pagination-list-next {
  font-size: 20px;
  color: #979ba5;

  &.is-disabled {
    color: #dcdee5;
    cursor: not-allowed;
    background-color: transparent;
  }
}

.@{bk-prefix}-pagination-list-item {
  margin-right: 2px;
  margin-left: 2px;
}

.@{bk-prefix}-pagination-limit {
  display: flex;
  align-items: center;
  user-select: none;
}

.@{bk-prefix}-pagination-limit-select {
  width: 60px;
  margin: 0 4px;

  .@{bk-prefix}-input {
    border-color: #f0f1f5;
  }

  .@{bk-prefix}-input--text {
    background-color: #f0f1f5;
  }

  &:hover {
    .@{bk-prefix}-input {
      border-color: #eaebf0;
    }

    .@{bk-prefix}-input--text {
      background-color: #eaebf0;
    }
  }

  .@{bk-prefix}-input {
    &.is-focused {
      border-color: #3a84ff;

      .@{bk-prefix}-input--text {
        background-color: #fff;
      }
    }
  }
}

.@{bk-prefix}-pagination-small-list {
  display: flex;
  align-items: center;

  .@{bk-prefix}-pagination-picker {
    display: flex;
    align-items: center;
    height: 26px;
    margin: 0 4px;
    cursor: pointer;
    background-color: #f0f1f5;
    border: 1px solid #f0f1f5;
    border-radius: 2px;

    &:hover {
      background-color: #eaebf0;
      border-color: #eaebf0;
    }

    &.is-focused {
      background-color: #fff;
      border-color: #3a84ff;
      box-shadow: 0px 0px 4px rgba(58, 132, 255, 0.4);
    }
  }
}

.@{bk-prefix}-pagination-editor {
  min-width: 23px;
  height: 16px;
  padding-right: 4px;
  padding-left: 8px;
  line-height: 16px;
  text-align: center;
  background-color: transparent;
  border: 0;
  border-radius: 2px;
  outline: none;
  transition: all 0.15s;
}
.@{bk-prefix}-pagination-small-list-total {
  padding-right: 8px;
  padding-left: 4px;
}
.@{bk-prefix}-pagination-btn-pre,
.@{bk-prefix}-pagination-btn-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 20px;
  color: #979ba5;
  cursor: pointer;

  &:hover {
    color: #3a84ff;
    background: #f0f1f5;
  }

  &.is-disabled {
    color: #dcdee5;
    cursor: not-allowed;
  }
}
.@{bk-prefix}-pagination-picker-list {
  max-height: @popover-max-height;
  padding: 7px 0;
  margin: -7px -14px;
  overflow: auto;

  .item {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 32px;
    color: #63656e;
    cursor: pointer;

    &:hover,
    &.is-actived {
      color: #3a84ff;
      background: #f4f6fa;
    }
  }
}
