.ba-slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    user-select: none;
}

.ba-slider-image-before,
.ba-slider-image-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* After image is on top, clipped to show before image on the left */
.ba-slider-image-after {
    clip-path: polygon(var(--clip-percentage, 50%) 0, 100% 0, 100% 100%, var(--clip-percentage, 50%) 100%);
    z-index: 2;
}

.ba-slider-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #fff;
    cursor: ew-resize;
    z-index: 10;
}

.ba-slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ba-arrow {
    width: 0;
    height: 0;
    border-style: solid;
    margin: 2px;
}

.ba-arrow-left {
    border-width: 5px 6px 5px 0;
    border-color: transparent #333 transparent transparent;
}

.ba-arrow-right {
    border-width: 5px 0 5px 6px;
    border-color: transparent transparent transparent #333;
}

.ba-label {
    position: absolute;
    bottom: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    z-index: 5;
    pointer-events: none;
}

.ba-label-before {
    left: 15px;
}

.ba-label-after {
    right: 15px;
}

.ba-slider-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 20;
    margin: 0;
}
