.ba-1573418e-container {
    position: relative;
    width: 100%;
    height: 400px; /* Overridden by inline styles if set */
    overflow: hidden;
    user-select: none;
}

.ba-1573418e-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ba-1573418e-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}

.ba-after {
    width: 50%;
    z-index: 2;
}

.ba-after img {
    /* To keep the image fixed while wrapper changes width */
    width: 100vw;
    max-width: none;
}

/* We need to use CSS variables to sync the image width if possible, 
   but object-fit: cover and keeping img 100% of container is easier */
.ba-before img, .ba-after img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ba-1573418e-container .ba-after img {
    /* Make the image size relative to the container, not the wrapper */
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Let's fix the responsive image behavior */
.ba-1573418e-container {
    --container-width: 100%;
}

.ba-before {
    width: 100%;
    z-index: 1;
}

.ba-after {
    z-index: 2;
    /* We handle width via JS */
}

/* Because the after-wrapper has overflow: hidden, 
   its child img needs to maintain the container's aspect ratio/width. */
.ba-after img {
    width: auto;
    min-width: 100%;
}
/* Better approach: container relative sizes */
.ba-1573418e-container { display: flex; align-items: center; justify-content: center; }
.ba-before img, .ba-after img { object-fit: cover; width: 100%; height: 100%; }
.ba-after { border-right: 2px solid transparent; }
.ba-after img { object-fit: cover; object-position: left center; }


.ba-1573418e-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    outline: none;
    z-index: 10;
    cursor: ew-resize;
    opacity: 0;
}

.ba-1573418e-handle {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 0;
    z-index: 5;
    pointer-events: none;
}

.ba-1573418e-handle-line {
    position: absolute;
    top: 0;
    left: -1px; /* Center the 2px line */
    width: 2px;
    height: 100%;
    background: #ffffff;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.ba-1573418e-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.ba-1573418e-handle-button svg {
    width: 16px;
    height: 16px;
    stroke: #333;
}

.ba-1573418e-label {
    position: absolute;
    top: 20px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.8);
    color: #333;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    pointer-events: none;
    z-index: 3;
}

.label-before { right: 20px; }
.label-after { left: 20px; }

/* Proper Image Fixes */
.ba-1573418e-image-wrapper.ba-before img {
    position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: left top;
}
.ba-1573418e-image-wrapper.ba-after img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    max-width: none;
    width: auto;
}