/* Flexbox Container Alignment Wrapper */
.ba-wrapper-flex-6f9f64ed {
    width: 100%;
}
.ba-container-wrapper-6f9f64ed {
    position: relative;
    /* Container inherits width from custom width control */
}

/* Main Container */
.ba-container-6f9f64ed {
    position: relative;
    width: 100%;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    cursor: ew-resize;
    box-sizing: border-box;
    /* Aspect ratio fallback if control isn't set */
    min-height: 200px; 
}
.ba-container-6f9f64ed:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* After Image (Background layer) */
.ba-image-after-6f9f64ed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Before Image Wrapper (Foreground layer that gets clipped/resized) */
.ba-image-before-6f9f64ed {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 2;
    overflow: hidden;
    will-change: width;
}

/* Inner wrapper keeps the image the full width of the main container, preventing squishing */
.ba-image-before-inner-6f9f64ed {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
}

/* Inner Images */
.ba-img-6f9f64ed {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Handle */
.ba-handle-6f9f64ed {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
    will-change: left;
    pointer-events: none;
}

.ba-handle-line-6f9f64ed {
    position: absolute;
    top: 0;
    bottom: 0;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.ba-handle-btn-6f9f64ed {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    pointer-events: auto;
    transition: transform 0.2s ease;
}

.ba-container-6f9f64ed:hover .ba-handle-btn-6f9f64ed {
    transform: scale(1.1);
}
.ba-container-6f9f64ed.is-dragging .ba-handle-btn-6f9f64ed {
    transform: scale(0.95);
}

/* Labels */
.ba-label-6f9f64ed {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.ba-label-before-6f9f64ed {
    left: 20px;
}

.ba-label-after-6f9f64ed {
    right: 20px;
}

/* Overlay Effect */
.ba-overlay-6f9f64ed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    pointer-events: none;
    z-index: 3;
}
.ba-container-6f9f64ed.has-overlay:hover .ba-image-before-6f9f64ed .ba-overlay-6f9f64ed {
    background: rgba(0,0,0,0.15);
}
.ba-container-6f9f64ed.has-overlay:hover .ba-image-after-6f9f64ed .ba-overlay-6f9f64ed {
    background: rgba(0,0,0,0.15);
}
