.before-after-container {
    max-width: 100%;
    margin: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.before-after-slider {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background-color: #fff;
}

.before-image, 
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    pointer-events: none;
}

.before-image {
    z-index: 2;
    width: 50%;
    transition: width 0.2s ease;
    background-color: #fff;
}

.after-image {
    z-index: 1;
    width: 100%;
    background-color: #000;
}

.before-image img, 
.after-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 100%;
    z-index: 10;
    cursor: ew-resize;
    transform: translateX(-50%);
    touch-action: none !important;
    user-select: none;
    -webkit-user-select: none;
    transition: left 0.2s ease;
}

.handle-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: #ffa500;
    transform: translateX(-50%);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.slider-handle .handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    background: linear-gradient(90deg, #ffa500, #ffc107);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    border: 2px solid white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    touch-action: none;
    cursor: grab;
    pointer-events: auto !important;
    z-index: 999;
    user-select: none;
}

.slider-handle .handle-circle:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.5);
}

.slider-handle .handle-circle.dragging {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    cursor: grabbing;
}

.slider-handle .handle-circle .handle-arrow {
    color: white;
    font-size: 12px;
    position: absolute;
}

.slider-handle .handle-circle .left-arrow {
    left: 8px;
}

.slider-handle .handle-circle .right-arrow {
    right: 8px;
}


@media (max-width: 768px) {
    .before-after-container {
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
} 