
.nav {
    width: 100%;
    margin: 30px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    .pages,
    .action {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }

    .left-skip,
    .right-skip {
        position: relative;

        svg {
            position: absolute;
        }
    }

    .left-skip svg:first-child,
    .right-skip svg:first-child {
        transform: translateX(-3px)
    }

    .left-skip svg:last-child,
    .right-skip svg:last-child {
        transform: translateX(3px)
    }

    @media (max-width: 768px) {
        display: grid;
        grid-template-areas:
            "page page page page page"
            "prev prev span next next";
        grid-template-columns: repeat(5, 1fr);

        .pages {
            grid-area: page;
        }

        .action {
            &.prev {
                grid-area: prev;
            }

            &.next {
                grid-area: next;
            }
        }

        .pages {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
        }

        .action {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
        }
    }

    .item {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .link {
        display: flex;
        justify-content: center;
        align-items: center;
        line-height: 1.5;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        width: 35px;
        height: 35px;
        color: #000;
        border-radius: 5px;

        :global(html.dark) & {
            color: #eee;
        }

        @media (max-width: 768px) {
            width: 40px;
            height: 40px;
        }
    }

    .active .link {
        cursor: default;
        color: #fff;
        background: #000;

        :global(html.dark) & {
            color: #555;
            background: #eee;
        }
    }

    .disabled .link {
        cursor: default;
        color: #ccc;
        background: transparent;

        :global(html.dark) & {
            color: #555;
        }
    }
}
