/****************************
 * Flickity fade
 * Use CSS important to override Flickity's JS transition
****************************/
.flickity-enabled.is-fade .flickity-slider > * {
    pointer-events:none; z-index:0;
    opacity:0 !important;
    transition:opacity .45s ease;
}
.flickity-enabled.is-fade .flickity-slider > .is-selected {
    pointer-events:auto; z-index:1;
    opacity:1 !important;
}


/****************************
 * Flickity arrows
****************************/
.flickity-button {
    --flkt-btn-size:55px;
    --flkt-icon-size:50px;
    --flkt-position:20px;
    --flkt-opacity:1;
    --flkt-bg:transparent;
    --flkt-bg-hover:transparent;
    --flkt-color:var(--vii-color-primary);
    --flkt-color-hover:var(--vii-color-primary-highlight);
}
/* button white */
.txt_color_white .flickity-button,
.flickity-button-white .flickity-button {
    --flkt-color:#fff;
    --flkt-color-hover:var(--vii-color-primary);
}

/* button > freeze (no navigation) */
.flickity-button-freeze {display:none;}

/* button */
.flickity-button:disabled,
.flickity-button:disabled:hover,
.flickity-prev-next-button,
.flickity-prev-next-button:focus {
    width:var(--flkt-btn-size); height:var(--flkt-btn-size);
    background:var(--flkt-bg); color:var(--flkt-color);
    opacity:var(--flkt-opacity); box-shadow:none; display:flex; align-items:center; justify-content:center;
    border-radius:0;
}

/* button > position */
.flickity-prev-next-button.previous {left:var(--flkt-position);}
.flickity-prev-next-button.next {right:var(--flkt-position);}
.flickity-rtl .flickity-prev-next-button.previous {right:var(--flkt-position);}
.flickity-rtl .flickity-prev-next-button.next {left:var(--flkt-position);}

/* button > icon */
.flickity-prev-next-button svg {display:none;}
.flickity-prev-next-button:before {
    font-family:var(--vii-font-icomoon), fantasy; font-size:var(--flkt-icon-size);
    position:relative; color:inherit;
}
.flickity-prev-next-button.previous:before {content:"\e906"; /* left:-.1em; */}
.flickity-prev-next-button.next:before {content:"\e90a"; /* left:.1em; */}

/* button > hover */
.flickity-prev-next-button:hover {background:var(--flkt-bg-hover); color:var(--flkt-color-hover);}

/* button > disabled */
.flickity-button:disabled {pointer-events:auto; --flkt-opacity:0.5;}

/* button > responsive */
@media only screen and (max-width:1280px) {
    .flickity-button {
        --flkt-btn-size:40px;
        --flkt-position:10px;
    }
}

/****************************
 * Position relative button
****************************/
.flickity-button-relative {display:flex; gap:var(--vii-spacing-10);}
.flickity-button-relative .flickity-button {position:relative;}
.flickity-button-relative .flickity-prev-next-button {transform:none; top:auto;}
.flickity-button-relative .flickity-prev-next-button.previous {left:auto;}
.flickity-button-relative .flickity-prev-next-button.next {right:auto;}

/****************************
 * Button visible on hover (this class should be added to the div.flickity-enabled)
****************************/
.vc_desktop .flickity-button-visible-hover:not(:hover) .flickity-button {--flkt-opacity:0; visibility:hidden;}
.vc_desktop .flickity-button-visible-hover:not(:hover) .flickity-prev-next-button.previous {margin-left:20px;}
.vc_desktop .flickity-button-visible-hover:not(:hover) .flickity-prev-next-button.next {margin-right:20px;}

/****************************
 * Adaptive height transition
****************************/
.flickity-viewport {transition:height .3s ease;}

/****************************
 * Flickity Dots
****************************/
body .flickity-page-dots {
    --dot-color:rgba(17, 16, 16, .3);
    --dot-color-selected:var(--vii-color-secondary);

    position:absolute; margin:0; bottom:25px;
    display:flex; align-items:center; justify-content:center;
    gap:10px;
}
body .flickity-page-dots li {padding:0;}
body .flickity-page-dots .dot {
    opacity:1; margin:0; background:var(--dot-color); width:12px; height:auto; aspect-ratio:1;
    box-shadow:0 0 0 1px #c79a395e;
}
body .flickity-page-dots .dot:hover {background:var(--dot-color-selected);}
body .flickity-page-dots .dot.is-selected {background:var(--dot-color-selected);}


body .flickity-button-white .flickity-page-dots {
    --dot-color:#fff;
    --dot-color-selected:var(--vii-color-primary);
}

/****************************
 * Flickity > Avoid layout shift
****************************/
.avoid-cls-slider:not(.flickity-enabled) > *:not(:first-child) {
    position:absolute; top:0; left:0;
    opacity:0; visibility:hidden;
}