.slider {
    position: relative;

    &__content {
        overflow: hidden;
    }

    &__container {
        margin: 0;
        padding: 0;
        list-style: none;
        position: relative;

        &:not(.tns-slider) {
            display: flex;
            flex-wrap: wrap;
        }
    }

    // panels
    &__panel {
        margin: 0;
        padding: 0;
        position: relative;
        display: block;

        &:not(.tns-item):not(:first-child) {
            //display: none;
        }
    }
}

.slider-controls {
    width: 100%;

    position: absolute;
    top: 50%;
    height: 2rem;
    transform: translateY(-50%);

    &__prev, &__next {
        width: 2rem;
        height: 2rem;
        display: block;

        position: absolute;
        top: 0;

        border: 2px solid $gray;
        border-width: 2px 2px 0 0;

    }

    &__prev {
        transform: rotate(-135deg);
        left: -3rem;
    }

    &__next {
        transform: rotate(45deg);
        right: -3rem;
    }
}


/* Gallery slider */

.gallery-slider {
    &__img {
        display: block;

        img {
            width: auto;
            max-width: none;
            min-height: 100%;
            height: 530px;
            display: block;
        }
    }
}

/* Item slider */

.item-slider {
    .slider {
        &__container {
            //margin-left: calc(-1 * $itemGap);
        }
    }
}

.item-slider[data-items-xl="5"] {
    .slider__panel {
        width: 20%;

        &:not(.tns-item):nth-child(-n + 5) {
            display: block;
        }
    }
}

.item-slider[data-items-xl="4"] {
    .slider__panel {
        width: 25%;

        &:not(.tns-item):nth-child(-n + 4) {
            display: block;
        }
    }
}

.item-slider[data-items-xl="3"] {
    .slider__panel {
        width: 33.33333%;

        &:not(.tns-item):nth-child(-n + 3) {
            display: block;
        }
    }
}

.item-slider[data-items-xl="2"] {
    .slider__panel {
        width: 50%;

        &:not(.tns-item):nth-child(-n + 3) {
            display: block;
        }
    }
}

$sizes: (
    "lg": $lg,
    "md": $md,
    "sm": $sm,
    "xs": $xs,
);

@media screen and (max-width: $xl) {
    .item-slider[data-items-lg="1"] {
        .slider__panel {
            width: 100%;
        }
    }
    .item-slider[data-items-lg="2"] {
        .slider__panel {
            width: 50%;
        }
    }
    .item-slider[data-items-lg="3"] {
        .slider__panel {
            width: 33.33333%;
        }
    }
    .item-slider[data-items-lg="4"] {
        .slider__panel {
            width: 25%;
        }
    }
}

@media screen and (max-width: $lg) {
    .item-slider[data-items-md="1"] {
        .slider__panel {
            width: 100%;
        }
    }
    .item-slider[data-items-md="2"] {
        .slider__panel {
            width: 50%;
        }
    }
    .item-slider[data-items-md="3"] {
        .slider__panel {
            width: 33.33333%;
        }
    }
}

@media screen and (max-width: $md) {
    .item-slider[data-items-sm="1"] {
        .slider__panel {
            width: 100%;
        }
    }
    .item-slider[data-items-sm="2"] {
        .slider__panel {
            width: 50%;
        }
    }
}

@media screen and (max-width: $sm) {
    .person-item-slider {
        .person-item {
            max-width: none;

            &__img {
                width: 100%;
            }
        }
    }

    .slider-controls {
        margin-top: 1rem;
    }

    .item-slider[data-items-xs="1"] {
        .slider__panel {
            width: 100%;
        }
    }
}


.tns-visually-hidden {
    display: none;
}