.cba-container {
    position: relative;
    width: 100%;
    display: block;
    /* Wymuszamy blok */
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    user-select: none;
    border-radius: 8px;
    background: #f0f0f0;
    /* Szare tło, żeby było widać kontener jak nie ma fotek */
    min-height: 100px;
    /* Minimalna wysokość - zabezpieczenie przed znikaniem */
}

.cba-image-wrapper {
    width: 100%;
    display: block;
    line-height: 0;
}

.cba-before img {
    width: 100%;
    height: auto;
    display: block;
}

.cba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    z-index: 2;
    will-change: width;
}

.cba-after img {
    display: block;
    height: 100% !important;
    width: auto;
    max-width: none !important;
    object-fit: cover;
}

/* --- NAPISY --- */
.cba-label {
    position: absolute;
    bottom: 20px;
    z-index: 5;
    font-size: 20px;
    font-weight: 800;
    font-family: sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    color: white;
    /* Domyślny biały, jeśli gradient nie zadziała */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Cień dla czytelności */
}

.cba-label-before {
    left: 20px;
    opacity: 1;
    transition: opacity 0.1s;
}

.cba-label-after {
    right: 20px;
    opacity: 0;
    transition: opacity 0.1s;
}

/* --- UCHWYT (Modernizacja) --- */
.cba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.cba-handle-line {
    flex-grow: 1;
    width: 2px;
    background: white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.cba-handle-circle {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    margin: 10px 0;
    border: 3px solid rgba(255, 255, 255, 0.8);
    position: relative;
    box-sizing: border-box;
}

.cba-arrow {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    position: absolute;
}

.cba-arrow-left {
    border-right: 8px solid #333;
    left: 8px;
}

.cba-arrow-right {
    border-left: 8px solid #333;
    right: 8px;
}

input.cba-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    margin: 0;
    z-index: 7;
    cursor: ew-resize;
    -webkit-appearance: none;
}

/* Fix for background focus on some browsers */
input.cba-slider:focus {
    outline: none;
}