.root{
    width: 100%;
    position: relative;
    height: var(--carousel-height, inherit);
    aspect-ratio: var(--carousel-aspect-ratio);
    user-select: none;

    img{
        -webkit-user-drag: none;
    }



    &[data-touching]{
        .pagination-group,
        .slide-item {
            pointer-events: none;
        }
        .nav-group{
            pointer-events: none;
        }
    }

    &[data-gpu-render] {
        .container{
            will-change: transform;
        }
    }

    &[data-per-view-auto] {
        .slide-item__card{
            container-type: normal;
        }
    }

    .slide-item__card{
        container-type: inline-size; /* fix height & width auto */
    }


    &[data-first-page][data-last-page] .pagination-group,
    &[data-first-page] .nav-prev-button,
    &[data-last-page] .nav-next-button{
        opacity: 0;
        /*pointer-events: none; 避免連續點消失後點到背後 */
    }


    &[data-mouse-move] {
        .container{
            cursor: pointer;
        }
    }
    &[data-debug] {
        .slide-item[data-active]{
            border: 1px solid #f64f4f;
        }

        .content:before {
            content: '';
            position: absolute;
            left: calc(50%);
            /*background-color: #a4a4a4;*/
            height: 100%;
            width: 0;
            border-left: 1px dashed #a4a4a4;
            z-index: 50;
            pointer-events: none;
        }
    }

}


.test-number{
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 2;
    font-size: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    pointer-events: none;
    overflow: auto;
}

.window-size{
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    background-color: rgba(0, 0, 0, .5);
    font-size: 12px;
    padding: 5px 10px;
}

.pagination-group{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;

    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    text-align: center;
    width: auto;
    z-index: 10;
}


.pagination-group .pagination-button{
    width: .5rem;
    height: .5rem;
    border-radius: 7px;
    background-color: #bdbdbd;
    opacity: 0.6;
    box-shadow: 3px 3px 9px 0 rgb(189 189 189 / 12%);
    margin: 0 6px;
}
.pagination-group {
    .pagination-button[data-active]{
        background-color: var(--primary-color, #00a3e0);
    }
}

.pagination-button{
    position: relative;
    display: inline-grid;
    cursor: pointer;
}


.pagination-content{}



.clone-icon-group{
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display:flex;
    flex-direction: row;
    font-size: 12px;
    color: #fff;
}

.clone-icon{
    width: 20px;
    height: 20px;
    background: transparent no-repeat center center;
    background-size: 100%;
    opacity: .5;
}

.nav-button{
    background-color: rgba(255, 255, 255, .5);
    border-radius: 99em;
    opacity: .6;
    color: #fff;
    border: none;
    outline: none;
}
.nav-prev-button, .nav-next-button {
    cursor: pointer;
    overflow: hidden;
    position: absolute;
    z-index: 11;
    top: 0;
    bottom: 0;
    margin: auto 0;
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}


.nav-group{
    > .nav-prev-button{
        left: 10px;
    }
    > .nav-next-button{
        right: 10px ;
        transform: rotate(180deg);
    }
}


.nav-icon{
    height: 20px;
    width: 20px;
    background: transparent no-repeat center;
    background-size: 100%;
    background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNzA2MjMzNzI0NzUwIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQxODgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTI5Ny44MTMzMzMgNDkxLjY0OGwxLjM2NTMzNC0xLjc0OTMzMyAzNzkuMDkzMzMzLTM3Ni4xNDkzMzRhMzguNzg0IDM4Ljc4NCAwIDAgMSA1LjA3NzMzMy00LjA5NiAzNC4zNDY2NjcgMzQuMzQ2NjY3IDAgMCAxIDE0LjI5MzMzNC00Ljk5MmMyLjIxODY2Ny0wLjE3MDY2NyAyLjE3Ni0wLjE3MDY2NyA0LjM5NDY2Ni0wLjE3MDY2NmEzMy40OTMzMzMgMzMuNDkzMzMzIDAgMCAxIDE0LjU0OTMzNCA0LjE4MTMzM2MxMi4zMzA2NjcgNi45OTczMzMgMTguNjg4IDIxLjc2IDE1LjI3NDY2NiAzNS40OTg2NjctMS4yMzczMzMgNS4wNzczMzMtNy4wNCAxMy40NC03LjA0IDEzLjQ0bC0zNTUuNDk4NjY2IDM1Mi44NTMzMzMgMzU0LjA5MDY2NiAzNTQuMzg5MzMzczYuMjcyIDcuOTc4NjY3IDcuODkzMzM0IDEyLjkyOGEzMi4yMTMzMzMgMzIuMjEzMzMzIDAgMCAxLTMzLjc0OTMzNCA0MS41NTczMzRjLTYuNjU2LTAuNjgyNjY3LTE3Ljc0OTMzMy03LjY4LTE3Ljc0OTMzMy03LjY4bC0zNzkuMjIxMzMzLTM3Ny45ODQtMS4yOC0xLjQ1MDY2N2EzMC4zNzg2NjcgMzAuMzc4NjY3IDAgMCAxLTcuODkzMzM0LTE3Ljc0OTMzMyAzMS4wMTg2NjcgMzEuMDE4NjY3IDAgMCAxIDMuNzEyLTE4LjYwMjY2NyAyNy4yMjEzMzMgMjcuMjIxMzMzIDAgMCAxIDIuNjg4LTQuMjI0eiIgcC1pZD0iNDE4OSIgZmlsbD0iI2ZmZmZmZiI+PC9wYXRoPjwvc3ZnPg==);
}







.slide-item{
    box-sizing: border-box;
    transition-property: transform;
    position: relative;
    overflow: hidden;


    flex: 0 0 auto;
    width: var(--carousel-slide-width);
    max-width: 100%; /* fix auto image  size */
    height:  var(--carousel-slide-height);
    padding-left: calc(var(--carousel-space-between) / 2);
    padding-right: calc(var(--carousel-space-between) / 2);
}

.slide-item__image{
    max-width: 100%;
    max-height: 100%;
    width: 100%; /* fix object-fit */
    height: 100%;
}

.slide-item__image-contain{
    object-fit: contain;
}
.slide-item__image-cover{
    object-fit: cover;
}
.slide-item__image-scale-down{
    object-fit: scale-down;
}
.slide-item__image-none{
    object-fit: none;
}

.slide-item__image-preload{
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.slide-item__card{
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-image: var(--slide-card-image);
}
.slide-item__card-contain{
    background-size: contain;
}
.slide-item__card-cover{
    background-size: cover;
}
.slide-item__card-100{
    background-size: 100%;
}



.container{
    position: relative;
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    height: inherit;
    transition-timing-function: ease;

    touch-action: pan-y; /* fix mobile pointermove event target pointercancel */
}


.content{
    top: 0;
    right: 0;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    z-index: 1;

    overflow: hidden;
    position: var(--carousel-content-position);
}




.test-number{
    background-color: rgba(0, 0, 0, .5);
}


