/* Pager */

.pager {
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;

    &__list {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
    }

    &__item {
        display: inline-block;
        padding: 0;
        background: none;
        margin: 0 0.25rem;

        &--first {
            .pager__dots {
                margin-left: 0.25rem;
            }
        }

        &--last {
            .pager__dots {
                margin-right: 0.25rem;
            }
        }
    }

    &__link {
        display: inline-block;
        width: 3rem;
        height: 3rem;
        line-height: 2.9rem;
        background: transparent;
        border: 1px solid $gray;
        color: $black;
        text-align: center;
        text-decoration: none;
        border-radius: 50%;

        &:hover,
        &:active,
        &:focus {
            background: $black;
            border-color: $black;
            color: $white;
            text-decoration: none;
        }

        &--active {
            background: $gray;
            border-color: $gray;
            color: $black;
        }
    }

    &__btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    &__prev {
        margin-right: 1.25rem;
        left: 0;
    }

    &__next {
        margin-left: 1.25rem;
        right: 0;
    }

    &__dots {
        letter-spacing: 1px;
    }
}

@media screen and (max-width: $md) {
    .pager {
        flex-wrap: wrap;
        justify-content: center;

        &__list {
            width: 100%;
            order: 3;
            margin-top: 1rem;
        }

        &__btn {
            position: relative;
            transform: none;
            top: 0;
        }

        &__prev {
            order: 1;
            margin-right: 0.6rem;
            left: auto;
        }

        &__next {
            order: 2;
            margin-left: 0.6rem;
            right: auto;
        }
    }
}
