.ba-grid-container {
    display: grid;
    width: 100%;
    /* Grid gap and columns handled by Elementor dynamic CSS from widget settings */
}

.ba-item {
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    cursor: ew-resize; /* Allows grabbing / sliding visual cue */
    border-radius: 4px; 
    width: 100%;
}

.ba-image-after, .ba-image-before {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevents dragging the image itself */
    max-width: 100%;
}

.ba-image-before {
    position: absolute;
    top: 0;
    left: 0;
    clip-path: inset(0 50% 0 0);
    -webkit-clip-path: inset(0 50% 0 0);
    z-index: 2;
}

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

.ba-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: #FFEDA1; /* Default line color */
    transform: translateX(-50%);
    pointer-events: none; 
    z-index: 10;
}

.ba-slider-handle::after {
    content: '◀ ▶'; /* Arrows */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.4); 
    border: 2px solid #FFEDA1; /* Default circle border color */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    letter-spacing: -2px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.ba-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background-color: #8c9085; /* Matches the grayish box in user's image */
    color: #333; /* Dark text */
    padding: 8px 16px;
    border-radius: 2px;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
}

.ba-label-before { left: 5%; }
.ba-label-after { right: 5%; }

/* Visibility settings controlled by widget options */
.ba-labels-hover .ba-label {
    opacity: 0;
}
.ba-labels-hover .ba-item:hover .ba-label {
    opacity: 1;
}
