/**
 * INTERACTIVE BEFORE/AFTER SLIDER
 * Premium draggable slider for transformation showcases
 * 
 * @package DrNaela
 * @version 2.0.0
 */

/* ============================================
   BEFORE/AFTER CONTAINER
   ============================================ */

.before-after-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 20px;
    cursor: ew-resize;
    user-select: none;
}

.before-after-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.before-image {
    z-index: 1;
}

.after-image {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
}

/* ============================================
   SLIDER HANDLE
   ============================================ */

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 3;
    transform: translateX(-50%);
    cursor: ew-resize;
}

.slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    background: rgba(136, 201, 193, 0.95);
    border: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-handle::after {
    content: '⇄';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: white;
    font-weight: bold;
    z-index: 1;
}

.slider-handle:hover::before {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 30px rgba(136, 201, 193, 0.5);
}

/* ============================================
   BEFORE/AFTER LABELS
   ============================================ */

.before-label,
.after-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-weight: bold;
    font-size: 14px;
    border-radius: 8px;
    z-index: 4;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.before-label {
    left: 20px;
}

.after-label {
    right: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .before-after-slider {
        height: 300px;
    }
    
    .slider-handle::before {
        width: 40px;
        height: 40px;
    }
    
    .slider-handle::after {
        font-size: 20px;
    }
    
    .before-label,
    .after-label {
        font-size: 12px;
        padding: 6px 12px;
    }
}

