.sb-before-after__heading {
    font-weight: 800;
}

.sb-ba-wrap {
    position: relative;
    overflow: hidden;
    user-select: none;
    cursor: ew-resize;
    touch-action: none;
    background: #e9ecef;
    width: 100%;
}

.sb-ba-after {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.sb-ba-before {
    position: absolute;
    inset: 0;
    overflow: hidden;
    clip-path: inset(0 calc(100% - var(--sb-ba-pos, 50%)) 0 0);
}

.sb-ba-before__img {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.sb-ba-label {
    position: absolute;
    bottom: 14px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    pointer-events: none;
    letter-spacing: .03em;
    z-index: 3;
}

.sb-ba-label--before {
    left: 14px;
}

.sb-ba-label--after {
    right: 14px;
}

.sb-ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--sb-ba-pos, 50%);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 4;
    pointer-events: none;
    outline: none;
}

.sb-ba-handle:focus-visible .sb-ba-handle__circle {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .6), 0 2px 12px rgba(0, 0, 0, .3);
}

.sb-ba-handle__line {
    width: 3px;
    flex: 1;
    background: #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, .4);
}

.sb-ba-handle__circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    cursor: ew-resize;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    flex-shrink: 0;
    transition: box-shadow .15s;
}

.sb-ba-handle__circle:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, .4);
}

.sb-ba--radius-sm {
    border-radius: 8px;
}

.sb-ba--radius-md {
    border-radius: 16px;
}

.sb-ba--radius-lg {
    border-radius: 24px;
}

@media (max-width: 575.98px) {
    .sb-ba-wrap {
        cursor: ns-resize;
    }
}

html[data-theme="dark"] .sb-ba-wrap {
    background: #1e293b;
}

html[data-theme="dark"] .sb-ba-handle__line {
    background: rgba(255, 255, 255, 0.85);
}

html[data-theme="dark"] .sb-ba-handle__circle {
    background: #334155;
    color: #e2e8f0;
}
