.fm-ba-slider {
    width: 100%;
}

.fm-ba-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.fm-ba-wrapper,
.fm-ba-wrapper img {
    display: block;
}

.fm-ba-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.fm-ba-image {
    position: absolute;
    top: 0;
    left: 0;
}

.fm-ba-image-after {
    position: relative;
    z-index: 1;
}

.fm-ba-image-before {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

/* Barra */
.fm-ba-handle {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background-color: #ffffff;
    cursor: ew-resize;
}

.fm-ba-slider.fm-ba-orientation-vertical .fm-ba-handle {
    width: 100%;
    height: 3px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    cursor: ns-resize;
}

/* Icona sopra la barra, centrata */
.fm-ba-icon {
    position: absolute;
    z-index: 4;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.6); /* cerchio */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff; /* colore frecce o icona */
    transform: translate(-50%, -50%);
    overflow: hidden;
}

/* Default: frecce CSS */
.fm-ba-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.fm-ba-arrow-left {
    border-right: 8px solid currentColor;
    left: 10px;
}

.fm-ba-arrow-right {
    border-left: 8px solid currentColor;
    right: 10px;
}

/* Verticale: frecce su/giù */
.fm-ba-slider.fm-ba-orientation-vertical .fm-ba-arrow-left,
.fm-ba-slider.fm-ba-orientation-vertical .fm-ba-arrow-right {
    border: none;
}

.fm-ba-slider.fm-ba-orientation-vertical .fm-ba-arrow-left {
    border-bottom: 8px solid currentColor;
    top: 10px;
}

.fm-ba-slider.fm-ba-orientation-vertical .fm-ba-arrow-right {
    border-top: 8px solid currentColor;
    bottom: 10px;
}

/* Quando c'è icona custom, nascondi le frecce */
.fm-ba-slider.fm-ba-has-custom-icon .fm-ba-arrow {
    display: none;
}

/* Modalità hardcore: icona custom come mask, colore preso da `color` */
.fm-ba-slider.fm-ba-has-custom-icon .fm-ba-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: currentColor;
    -webkit-mask-image: var(--fm-icon-mask);
    mask-image: var(--fm-icon-mask);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 60% 60%;
    mask-size: 60% 60%;
}
