/**=====================
     Pagination scss
==========================**/
.pagination-main {
    @include flex_common;
    margin-top: 30px;

    label {
        color: $light-color;

        @media (max-width: 575.98px) {
            display: none;
        }
    }

    i {
        --Iconsax-Size: 18px;
        --Iconsax-Color: #222;
    }

    .pagination {
        display: flex;
        align-items: center;
        gap: calc(8px + (12 - 8) * ((100vw - 320px) / (1200 - 320)));

        .page-item {
            .page-link {
                @include flex_common;
                color: $light-color;
                width: calc(30px + (35 - 30) * ((100vw - 320px) / (1200 - 320)));
                height: calc(30px + (35 - 30) * ((100vw - 320px) / (1200 - 320)));
                border: none;
                border-radius: 100%;
                padding: 0;
                overflow: hidden;
                z-index: 0;
                position: relative;

                body.dark & {
                    color: rgba($white, 0.6);
                    background-color: #252934;
                    background-image: none
                }

                &::before {
                    @include pos;
                    transition: all 0.15s ease-in-out;
                    top: 0;
                    left: 0;
                    @include pseudowh;
                    background-color: var(--theme-color);
                    opacity: 0;
                    z-index: -1;
                }

                &:hover {
                    background-color: transparent;
                    color: var(--theme-color);

                    &::before {
                        opacity: 0.2;
                    }
                }

                &:focus {
                    border: 1px solid $border-color;
                    outline: none;
                    box-shadow: none;
                }

                span {
                    line-height: 1;
                }
            }

            &.active {
                .page-link {
                    background-color: var(--theme-color);
                    color: $white;
                    font-weight: 600;
                    border-radius: 100%;

                    body.dark & {
                        color: $white;
                        background-color: var(--theme-color);
                    }
                }
            }

            &.disabled {
                .page-link {
                    background-color: transparent;
                }
            }

            &:hover {
                border-radius: 100%;

            }
        }
    }
}

.pagination {
    justify-content: center;
    gap: 10px;

    .page-item {
        &:not(:first-child) {
            .page-link {
                margin: 0;
            }
        }

        &:first-child {
            .page-link {
                color: transparent;
                background-image: url(../images/svg/left.svg);
                background-repeat: no-repeat;
                background-size: 20px;
                background-position: center;

                &:hover {
                    color: transparent;
                }

                [dir="rtl"] & {
                    transform: rotate(180deg);
                }
            }
        }

        &:last-child {
            .page-link {
                color: transparent;
                background-image: url(../images/svg/right.svg);
                background-repeat: no-repeat;
                background-size: 20px;
                background-position: center;

                [dir="rtl"] & {
                    transform: rotate(180deg);
                }

                &:hover {
                    color: transparent;
                }
            }
        }

        &.active {
            .page-link {
                background-color: var(--theme-color);
                color: $white;
            }
        }


        .page-link {
            width: 38px;
            height: 38px;
            cursor: pointer;
            padding: 0;
            @include flex_common;
            border-radius: 4px;
            color: $light-color;
        }
    }
}