/* Before/After Image Slider Styles */

.ba-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    cursor: ew-resize; /* fallback */
    touch-action: pan-y; /* Prevent horizontal scrolling/jerking on mobile when dragging */
}

.ba-img-before {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh; /* Prevent extremely tall images from ruining mobile UX */
    object-fit: cover;
    pointer-events: none; /* Let the container handle drag events */
}

.ba-img-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Let the container handle drag events */
}

/* 
 * The 'After' image sits on top of the 'Before' image.
 * By default, clip the left 50% so it only shows on the right.
 */
.ba-img-after {
    clip-path: inset(0 0 0 50%);
}

.ba-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--primary, #9300ff);
    transform: translateX(-50%);
    pointer-events: none; /* Let container handle events to avoid stuttering */
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.ba-slider-handle::after {
    content: '< >';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: var(--primary, #9300ff);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: -2px;
    box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

.ba-label {
    position: absolute;
    top: 20px;
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 5;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

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

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