@media only screen and (max-width: 767px) {
    :root {
        --carousel-slider-full-mode: 0;
    }
}
@media only screen and (min-width: 768px) {
    :root {
        --carousel-slider-full-mode: 1;
    }
}

.carousel-slider {
    position: relative;
    width: fit-content;
    height: fit-content;
}

.carousel-slider #loop {
    position: absolute;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
}

.carousel-slider .item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    overflow: hidden;
    transition: transform 300ms ease-out;
    z-index: -1;
    opacity: 0;
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: center;
}

@keyframes shine {
    0% {
        transform: translate(-230%, -230%) rotateZ(0deg);
    }
    25% {
        transform: translate(230%, -230%) rotateZ(360deg);
    }
    50% {
        transform: translate(230%, 230%) rotateZ(720deg);;
    }
    75% {
        transform: translate(-230%, 230%) rotateZ(1080deg);
    }
    100% {
        transform: translate(-230%, -230%) rotateZ(1440deg);

    }
}

.carousel-slider .item.square .img-border {
    width: 100%;
    height: 100%;
}

.carousel-slider .item.horizontal .img-border {
    width: 100%;
    height: fit-content;
}

.carousel-slider .item.vertical .img-border {
    height: 100%;
    width: fit-content;
}

.carousel-slider .item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
}

.carousel-slider .item.active {
    opacity: 1;
    z-index: 99;
    overflow: visible;
    /* box-shadow: 0px 0px 105px -35px rgba(0, 0, 0, 0.75); */
}

.carousel-slider .carousel-fadeout {
    position: relative;
    width: 100% !important;
    height: 100% !important;
}

.carousel-slider.scaled .item.active .img-border {
    background: transparent !important;
}


@media only screen and (max-width: 767px) {
    .carousel-slider .carousel-fadeout {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .carousel-slider.scaled .carousel-fadeout {
        position: fixed;
        top: 0;
        left: 0;
        padding: 0;
        margin: 0;
        width: 100vw;
        height: 100vh;
        backdrop-filter: blur(2px);
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 90;

        animation: fadeout 0.5s linear;
    }

    .carousel-slider .item.active {
        position: relative;
        transform: none !important;
        top: unset !important;
        left: unset !important;
        margin-right: auto !important;
        margin-left: auto !important;
    }

    @keyframes fadeout {
        0% {
            opacity: 0;
        }
        100% {
            opacity: 1;
        }
    }

    .carousel-slider.scaled .item.active.vertical {
        position: relative;
        height: 70vh !important;
        width: fit-content !important;
        max-width: 100vw !important;

        margin-bottom: 2vh;
    }
    
    .carousel-slider.scaled .item.active.square,
    .carousel-slider.scaled .item.active.horizontal {
        position: relative;
        width: 98% !important;
        height: fit-content !important;
        max-height: 70vh !important;
        
        margin-bottom: 8vh;
    }

    .carousel-slider.scaled .button-container {
        position: absolute;
        top: unset !important;
        left: 5% !important;
        transform: none !important;
        width: 90% !important;
        bottom: 25vh;
    }
}
@media only screen and (min-width: 768px) {
    .carousel-slider.scaled .item.active  {
        position: fixed;
    }

    .carousel-slider.scaled .item.active.square,
    .carousel-slider.scaled .item.active.horizontal  {
        width: 70vw !important;
        height: max-content !important;
        max-height: 65vh !important;
    }

    .carousel-slider.scaled .item.active.vertical  {
        width: max-content !important;
        height: 90vh !important;
    }

    .carousel-slider .item.horizontal .img-border {
        height: auto;
        width: auto;
    }
    .carousel-slider.scaled .item.active img {
        max-height: 90vh;
    }
}

.carousel-slider .item.active img {
    object-fit: contain;
    display: block;
}


.carousel-slider .item.prev {
    z-index: 2;
    opacity: 0.5;
    transform: translate(-130%, -50%) perspective(10cm) rotateY(-45deg) scale(0.5);
}

.carousel-slider .item.next {
    z-index: 2;
    opacity: 0.5;
    transform: translate(30%, -50%) perspective(10cm) rotateY(45deg) scale(0.5);
}

.carousel-slider .button-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 100;
}

.carousel-slider .button-container .button {
    color: #fff;
    font-size: 20pt;
    width: 6%;
    padding-bottom: 6%;
    cursor: pointer;
    position: relative;
    opacity: 0.65;
    background-color: rgba(0, 0, 0, 1);
    border-radius: 50%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
    transition: all 300ms ease-in-out;
}

.carousel-slider .button-container .button:hover {
    opacity: 1;
}

.carousel-slider .button-container .button:nth-child(1),
.carousel-slider .button-container .button:nth-child(1):hover {
    float: left;
    background-image: url("images/star-backward.svg");
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
}

.carousel-slider .button-container .button:nth-child(2),
.carousel-slider .button-container .button:nth-child(2):hover {
    float: right;
    background-image: url("images/star-forward.svg");
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
}