@import '../../style/variable.scss';

.x-pagination {
    display: flex;
    align-items: center;
    .x-pagination-list {
        & > li {
            display: inline-block;
            margin-right: .1rem;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            i {
                vertical-align: middle;
            }
        }
        & > li:last-child {
            margin-right: 0;
        }
        & > .page-item {
            display: inline-block;
            height: .28rem;
            line-height: .28rem;
            text-align: center;
            border-radius: .04rem;
            border: 1px solid $theme-border;
            transition: all .3s;
            cursor: pointer;
            &.more {
                border: none;
                &:hover {
                    border-color: $theme-border;
                }
            }
            &.active {
                border-color: $theme-active;
                color: $theme-active;
            }
            &:hover {
                border-color: $theme-active;
                color: $theme-active;
            }
        }
        .prev, .next {
            cursor: pointer;
            &:hover {
                color: $theme-active;
            }
            &.disabled {
                color: $theme-disable-font;
                cursor: not-allowed;
            }
        }
    }
    .pagesize-change {
        display: flex;
        align-items: center;
    }
    .goto-page {
        display: flex;
        align-items: center;
        margin: 0 .2rem;
        .goto-input {
            margin: 0 .1rem;
        }
        input.x-input {
            padding: .06rem;
            text-align: center;
            width: .4rem;
        }
    }
    .pagination-select {
        width: 60px;
        margin-right: .1rem;

    }

    &.lg {
        .x-pagination-list {
            & > .page-item {
                padding: 0 .1rem;
                height: .32rem;
                line-height: .32rem;
            }
        }
        .goto-input {
            & > input {
                height: .32rem;
                line-height: .32rem;
            }
        }
        .pagination-select {
            & > div {
                height: .32rem;
                line-height: .32rem;
            }
        }
    }
    &.md {
        .x-pagination-list {
            & > .page-item {
                padding: 0 .08rem;
                height: .28rem;
                line-height: .28rem;
            }
        }
        .goto-input {
            & > input {
                height: .28rem;
                line-height: .28rem;
            }
        }
        .pagination-select {
            & > div {
                height: .28rem;
                line-height: .28rem;
            }
        }
    }
    &.sm {
        .x-pagination-list {
            & > .page-item {
                padding: 0 0.05rem;
                height: .24rem;
                line-height: .24rem;
            }
        }
        .goto-input {
            & > input {
                height: .24rem;
                line-height: .24rem;
            }
        }
        .pagination-select {
            & > div {
                height: .24rem;
                line-height: .24rem;
            }
        }
    }
}

.x-pagination-i18n {
    display: flex;
    align-items: center;
    .x-pagination-list {
        & > li {
            display: inline-block;
            margin-right: .1rem;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            i {
                vertical-align: middle;
            }
        }
        & > li:last-child {
            margin-left: 0;
        }
        & > .page-item {
            display: inline-block;
            height: .28rem;
            line-height: .28rem;
            text-align: center;
            border-radius: .04rem;
            border: 1px solid $theme-border;
            transition: all .3s;
            cursor: pointer;
            &.more {
                border: none;
                &:hover {
                    border-color: $theme-border;
                }
            }
            &.active {
                border-color: $theme-active;
                color: $theme-active;
            }
            &:hover {
                border-color: $theme-active;
                color: $theme-active;
            }
        }
        .prev, .next {
            cursor: pointer;
            &:hover {
                color: $theme-active;
            }
            &.disabled {
                color: $theme-disable-font;
                cursor: not-allowed;
            }
        }
    }
    .pagesize-change {
        display: flex;
        align-items: center;
    }
    .goto-page {
        display: flex;
        align-items: center;
        margin: 0 .2rem;
        .goto-input {
            margin: 0 .1rem;
        }
        input.x-input {
            padding: .06rem;
            text-align: center;
            width: .4rem;
        }
    }
    .pagination-select {
        width: 60px;
        margin-left: .1rem;

    }

    &.lg {
        .x-pagination-list {
            & > .page-item {
                padding: 0 .1rem;
                height: .32rem;
                line-height: .32rem;
            }
        }
        .goto-input {
            & > input {
                height: .32rem;
                line-height: .32rem;
            }
        }
        .pagination-select {
            & > div {
                height: .32rem;
                line-height: .32rem;
            }
        }
    }
    &.md {
        .x-pagination-list {
            & > .page-item {
                padding: 0 .08rem;
                height: .28rem;
                line-height: .28rem;
            }
        }
        .goto-input {
            & > input {
                height: .28rem;
                line-height: .28rem;
            }
        }
        .pagination-select {
            & > div {
                height: .28rem;
                line-height: .28rem;
            }
        }
    }
    &.sm {
        .x-pagination-list {
            & > .page-item {
                padding: 0 0.05rem;
                height: .24rem;
                line-height: .24rem;
            }
        }
        .goto-input {
            & > input {
                height: .24rem;
                line-height: .24rem;
            }
        }
        .pagination-select {
            & > div {
                height: .24rem;
                line-height: .24rem;
            }
        }
    }
}