.igallery_container.carousel {
    --image-height: 500px;
    --small-image-height: calc(var(--image-height) * .6);
    --image-gap: 0px;
    --carousel-items: 5;
    --outer-margin-adjustment: -80px;

    margin: 0 calc(var(--outer-margin-adjustment) - var(--image-gap)) 0 var(--outer-margin-adjustment);
}

.igallery_container.carousel {
    padding: 50px 0 10px;
}

.igallery_container.carousel .photostyle {}

.igallery_container.carousel .photostyle .owl-stage {
    place-content: center;
    align-items: center;
    display: flex;
    gap: var(--image-gap);
}

.igallery_container.carousel .photostyle .owl-stage-outer {
    overflow: visible;
    transform: scale(.9);
}


.igallery_container.carousel .photostyle .owl-stage > div {
    transition: all 400ms cubic-bezier(0.000, 0.835, 0.255, 1.000);
    margin: 0 10px;
}

.igallery_container.carousel .photostyle .owl-stage {}
.igallery_container.carousel .photostyle .owl-stage > div.active {}

.igallery_container.carousel .photostyle .owl-stage a {
    display: flex;
    justify-content: center;
    background: #fff;
    align-items: center;
    padding: 12px;
    min-height: 370px;
}
.igallery_container.carousel .photostyle .owl-stage > div:hover {
    z-index: 1;
    transform: scale(1.08);
    box-shadow: 2px 2px 10px 2px #0004;
}

.igallery_container.carousel .photostyle img {
    width: unset;
}


/* ============ Admin Buttons ============ div*/

.igallery_container.carousel .backendlink,
.igallery_container.carousel .mod_uploadigallery_default {
    width: 42px;
    height: 42px;
    border: 2px solid white;
    float: left;
    position: relative;
    z-index: 2;
    margin: 0 0 20px 12px;
    display: flex;
    justify-content: center;
    align-items:  center;
    font-weight: bold;
    font-size: 20px;
    transition: transform .1s ease-in-out;
    cursor: pointer;
}
.igallery_container.carousel .backendlink {
    margin-left: 50px;
}
.igallery_container.carousel .backendlink a {
    height: 100%;
    width: 100%;
}
.igallery_container.carousel .backendlink a span {
    filter: saturate(10) brightness(10) contrast(10);
    height: 100%;
    width: 100%;
    transform: scale(1.1);
}

.igallery_container.carousel .backendlink:hover,
.igallery_container.carousel .backendlink:focus,
.igallery_container.carousel .mod_uploadigallery_default:hover,
.igallery_container.carousel .mod_uploadigallery_default:focus {
    color: black;
    background: white;
    transform: scale(1.2);
    z-index: 3;
}


.igallery_container.carousel .backendlink:active,
.igallery_container.carousel .mod_uploadigallery_default:active {
    color: black;
    background: white;
    border-color: var(--color-main-2);
}

.igallery_container.carousel .backendlink:hover a span,
.igallery_container.carousel .backendlink:active a span,
.igallery_container.carousel .backendlink:focus a span {
    filter: brightness(0) contrast(2);
    transform: scale(1.2);
    background-position: 1px 1px;
}

.igallery_container.carousel .tooltip::before,
.igallery_container.carousel .backendlink .img_path {
    font-size: 14px;
    left: -3px;
    top: calc(100% + 2px);
    box-shadow: 2px 2px 6px 0 #0004;
    padding: 3px 8px 3px;
    background: #fffd;
    border: 1px solid var(--color-main-2);
    line-height: 19px;
    font-variant: normal;
    color: black;
    pointer-events: none;
    opacity: 0;
    display: block;
}

.igallery_container.carousel .backendlink:hover .img_path,
.igallery_container.carousel .backendlink:active .img_path,
.igallery_container.carousel .backendlink:focus .img_path,
.igallery_container.carousel .tooltip:hover:before {
    transition: opacity .2s ease-in-out .5s;
    opacity: 1;
    left: 5px;
    top: calc(100% - 5px);
}


/* ============ Tooltips ============ div*/
.igallery_container.carousel .tooltip {
    position: relative;
}
.igallery_container.carousel .tooltip:before {
    content: attr(data-tooltip);
    position: absolute;
    white-space: nowrap;
}

/* ============ Navigation Buttons ============ div*/
.igallery_container.carousel .owl-nav.disabled {display: block;}

.igallery_container.carousel .owl-prev,
.igallery_container.carousel .owl-next {
    height:0;
    width: 0;
    overflow: hidden;
}

.igallery_container.carousel .owl-prev::before,
.igallery_container.carousel .owl-next::before {
    height: 80px;
    width: 42px;
    background: #0006;
    position: absolute;
    top:50%;
    transform: translateY(-50%);
    place-content: center;
    display: flex;
    align-items: center;
    color: white;
    font-weight: bold;
}

.igallery_container.carousel .owl-prev::before {
    left:0;
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
}

.igallery_container.carousel .owl-next:before {
    right: 0;
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}

.igallery_container.carousel .owl-prev:hover::before,
.igallery_container.carousel .owl-next:hover::before {
    background: #0007;
}

.igallery_container.carousel .owl-prev:active::before,
.igallery_container.carousel .owl-next:active::before {
    background: #0008;
}


/* -------------------- is video overlay --------------------- */
.igallery_container.carousel .igallery_wrapper .photostyle a[data-type="video"]::after,
.igallery_container.carousel .igallery_wrapper .photostyle a[data-type="youtube"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250' viewBox='-49.5 50.5 250 250'%3E%3Ccircle fill='%23FFF' cx='75.5' cy='175.5' r='125'/%3E%3Ccircle fill='%23B20E10' cx='75.5' cy='175.5' r='122.5'/%3E%3Ccircle fill='%23FFF' cx='75.5' cy='175.5' r='107.5'/%3E%3Cpath fill='%23B20E10' d='M125.45 175.698l-83.027-36.62-.302 72.844 83.33-36.224z'/%3E%3C/svg%3E%0A");
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 35%;
    height: 100%;
    bottom: 0;
    background-position: center;
    background-size: 91%;
    opacity: 0.7;
    background-repeat: no-repeat;
}
.igallery_container.carousel .igallery_wrapper .photostyle a[data-type="video"]:hover::after,
.igallery_container.carousel .igallery_wrapper .photostyle a[data-type="youtube"]:hover::after {
    opacity: 0.8;
    -webkit-transition: opacity 300ms ease-in;
    -moz-transition: opacity 300ms ease-in;
    -o-transition: opacity 300ms ease-in;
    transition: opacity 300ms ease-in;
}

/* ---------------- delete button ------------------ */
.igallery_container.carousel .photostyle div.delete {
    display: none;
    border-radius: 0;
    height: 30px;
    width: 30px;
    right: 0;
    top: 0;
    position:absolute;
    font-size: 17px;
    font-weight: bold;
    line-height: 27px;
    border: 1px solid transparent;
    color: white;
    box-sizing: border-box;
    cursor: pointer;
    text-align: center;
    background: var(--color-main-1);
    transition: transform .1s ease-in-out;
    filter: grayscale(.2) ;
}
.igallery_container.carousel .photostyle span:hover div.delete,
.igallery_container.carousel .photostyle a:hover div.delete {
    display: block;
}
.igallery_container.carousel .photostyle span:hover div.delete:focus,
.igallery_container.carousel .photostyle a:hover div.delete:focus,
.igallery_container.carousel .photostyle span:hover div.delete:hover,
.igallery_container.carousel .photostyle a:hover div.delete:hover {
    transform: scale(1.3);
    filter: grayscale(0);
}

.igallery_container.carousel .photostyle span:hover div.delete:active,
.igallery_container.carousel .photostyle a:hover div.delete:active {
    transform: scale(1.15);
    filter: grayscale(.2) brightness(.6) contrast(1.8);
}
/* ------------ delete fade out ----------- */
.igallery_container.carousel .igallery_wrapper .photostyle span.linkdummy.toremove,
.igallery_container.carousel .igallery_wrapper .photostyle a.toremove {
    -webkit-transition: all 400ms cubic-bezier(0.000, 0.835, 0.255, 1.000);
    -moz-transition: all 400ms cubic-bezier(0.000, 0.835, 0.255, 1.000);
    -o-transition: all 400ms cubic-bezier(0.000, 0.835, 0.255, 1.000);
    transition: all 400ms cubic-bezier(0.000, 0.835, 0.255, 1.000); /* custom */
}
.igallery_container.carousel .igallery_wrapper .photostyle span.linkdummy.toremove.remove,
.igallery_container.carousel .igallery_wrapper .photostyle a.toremove.remove{
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* ================== Mobile ==================*/

@media only screen and (max-width: 1200px) {
    .igallery_container.carousel {
        --outer-margin-adjustment: -40px;
    }
}

@media only screen and (max-width: 768px) {
    .igallery_container.carousel .photostyle .owl-stage > div:hover {
        transform: none;
    }
    .igallery_container.carousel .photostyle div.delete {
        display: block;
    }
}

@media only screen and (max-width: 470px) {
    .igallery_container.carousel .owl-prev::before,
    .igallery_container.carousel .owl-next::before {
        width: 22px;
    }
    .igallery_container.carousel .owl-prev::before {
        left:30px;
    }

    .igallery_container.carousel .owl-next:before {
        right: 30px;
    }
}


/* ================== Wide ==================*/

@media only screen and (min-width: 1600px) {
    .igallery_container.carousel {
        --outer-margin-adjustment: calc((100vw - 1440px) / -2);
    }
}


