/**
 * Modern Clip-Path Before & After Slider (No Text Overlap)
 *
 * @package OncoDermCare
 */

.ba-slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    user-select: none;
    cursor: ew-resize;
    background-color: var(--color-surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ba-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}

/* Base "AFTER" Layer (Full width) */
.ba-after-img {
    z-index: 1;
}

/* Clipped "BEFORE" Layer */
.ba-before-img {
    z-index: 2;
    clip-path: inset(0 calc(100% - var(--ba-pos, 50%)) 0 0);
}

/* Badges */
.ba-badge {
    position: absolute;
    bottom: 16px;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: var(--radius-sm);
    pointer-events: none;
}

.ba-badge-before {
    left: 16px;
    background-color: rgba(31, 36, 33, 0.85);
    color: #fff;
    z-index: 4;
}

.ba-badge-after {
    right: 16px;
    background-color: rgba(198, 146, 85, 0.95);
    color: #fff;
    z-index: 4;
}

/* Draggable Divider Line & Thumb */
.ba-handle-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--ba-pos, 50%);
    width: 3px;
    background-color: #fff;
    z-index: 5;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.ba-handle-arrows {
    width: 38px;
    height: 38px;
    background-color: var(--color-primary);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    letter-spacing: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}