.lf-carousel {
    --gap: 20px;
    width: 100%;
    container-type: inline-size;
    container-name: lf-carousel-cont;
    margin: 1.5rem 0 1.5rem 0;
    &.lf-top-margin-no {
        margin-top: 0;
    }
}

.lf-carousel-6, .lf-carousel-1, .lf-carousel-4 {
    --slots: 1;
    --animation-width: calc(((100% - ((var(--slots) - 1) * var(--gap))) / var(--slots)) + var(--gap));
}

/* slot 4 variant */

@container lf-carousel-cont (min-width: 600px) {
    .lf-carousel-4 {
        --slots: 2;
    }
}

@container lf-carousel-cont (min-width: 900px) {
    .lf-carousel-4 {
        --slots: 3;
    }
}
@container lf-carousel-cont (min-width: 1200px) {
    .lf-carousel-4 {
        --slots: 4;
    }
}



/* slot 6 variant */

/* small phones are this size */
@media screen and (min-width: 320px) and (max-width: 480px) {
    .lf-carousel-6 {
        --slots: 2;
    }
}
@container lf-carousel-cont (min-width: 400px) {
    .lf-carousel-6 {
        --slots: 2;
    }
}

@container lf-carousel-cont (min-width: 700px) {
    .lf-carousel-6 {
        --slots: 3;
    }
}
@container lf-carousel-cont (min-width: 940px) {
    .lf-carousel-6 {
        --slots: 4;
    }
}

@container lf-carousel-cont (min-width: 1160px) {
    .lf-carousel-6 {
        --slots: 5;
    }
}
@container lf-carousel-cont (min-width: 1400px) {
    .lf-carousel-6 {
        --slots: 6;
    }
}

@keyframes kf-fade-out {
    from {
        transform: scaleY(1);
        opacity: 1;
    }
    to {
        transform: scaleY(0.5);
        opacity: 0;
    }
}

@keyframes kf-fade-in {
    from {
        transform: scaleY(0.5);
        opacity: 0;
    }
    to {
        transform: scaleY(1);
        opacity: 1;
    }
}


@keyframes kf-slide-right {
    from {
        margin-left: var(--animation-width);
        margin-right: 0px;
    }
    to {
        margin-left: 0px;
        margin-right: var(--animation-width);
    }
}

@keyframes kf-slide-left {
    from {
        margin-right: var(--animation-width);
        margin-left: 0px;
    }
    to {
        margin-right: 0px;
        margin-left: var(--animation-width);
    }
}

.lf-slide-right {
    animation: kf-slide-right 0.5s ease-out forwards;
}

.lf-slide-left {
    animation: kf-slide-left 0.5s ease-out forwards;
}

.lf-fade-out {
    animation: kf-fade-out 0.5s ease-out forwards;
}

.lf-fade-in {
    animation: kf-fade-in 0.5s ease-out forwards;
}


.lf-carousel-inner > div {
    margin-right: var(--gap);
    /* width: calc((100% - ((var(--slots) - 1) * var(--gap))) / var(--slots)); */
}

.lf-carousel-inner > div:last-child {
    margin-right: 0;
}

.lf-carousel-templates {
    display: none;
}

.lf-carousel-outer {
    overflow: hidden;
    padding-left: 37px;
    padding-right: 37px;
    position: relative;
}
.lf-carousel-inner {
    padding-top: 3px;
    display: flex;
    /* overflow: hidden; */
}

.lf-carousel-nav {
    position: absolute;
    top: 40%;
    width: 100%;
}
.lf-carousel-nav-play-pause {
    position: absolute;
    top: 0%;
    width: 100%;
}
.lf-carousel-nav-play-pause button,
.lf-carousel-nav button {
    /* Use em-based sizing so the button is sized relative to its font-size. */
    font-size: 1.4rem;

    width: 33px;
    height: 33px;
    padding: 0;

    /* Make it circular. */
    border-radius: 50%;

    /* A 0.2em border: also scales with font-size. */
    border: 2px solid var(--lf-col-dark);
    color: var(--lf-col-dark);

    /* Fill color, also easy to change. */
    background-color: var(--lf-col-light);

    /* Center the text. */
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* Misc. styles. */
    cursor: pointer;
    box-sizing: border-box;
    margin: 0;
    opacity: 0.6;
}
.lf-carousel-nav-play-pause button:hover,
.lf-carousel-nav button:hover {
    opacity: 1;
}
.lf-carousel-nav-play-pause button span,
.lf-carousel-nav button span {
    display: inline-block;
    line-height: 1;
    width: 24px;
    height: 24px;
}
.lf-carousel-nav button:nth-of-type(1) {
    float:left;
    margin-left: -37px;
}
.lf-carousel-nav button:nth-of-type(2) {
    float:right;
    margin-right: 37px;
}
.lf-carousel-nav-play-pause button.lf-carousel-play-pause {
    position: absolute;
    top: 0px;
    right: 37px;
}
.lf-carousel-dot-nav {
    text-align: center;
}
.lf-carousel-dot-nav button {
    width: 25px;              /* Adjust as desired */
    height: 25px;             /* Adjust as desired */
    border-radius: 50%;
    border: 2px solid var(--lf-col-dark);  /* Outer circled border */
    background-color: var(--lf-col-light);
    display: inline-flex;
    align-items: center;      /* Center the inner circle */
    justify-content: center;  /* Center the inner circle */
    cursor: pointer;          /* Show a pointer on hover */
    padding: 0;               /* Remove default button padding */
    box-sizing: border-box;   /* Ensure border is included in final size */
    opacity: 0.4;
    margin: 0 3px 6px 3px;
}

.lf-carousel-dot-nav button .lf-dot {
    width: 10px;              /* Adjust size as desired */
    height: 10px;
    background-color: transparent;
    border-radius: 50%;
}
.lf-carousel-dot-nav button.lf-active .lf-dot,
.lf-carousel-dot-nav button:hover .lf-dot
{
    background-color: var(--lf-col-dark);
}

.lf-carousel-dot-nav button.lf-active,
.lf-carousel-dot-nav button:hover {
    opacity: 1;
}
