.after-before {
    height: 587px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.after-before .comparison-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.after-before img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.after-before .beforeContainer {
    position: absolute;
    inset: 0;
    z-index: 10;
    clip-path: inset(0 50% 0 0);
    user-select: none;
}

@media (max-width: 767px) {
    .after-before .beforeContainer {
        clip-path: inset(0 100% 0 0);
    }
}

.after-before .after-layer {
    position: absolute;
    inset: 0;
    user-select: none;
}

.after-before .label {
    position: absolute;
    top: 28px;
    color: var(--text-color-primary-bg);
    font-size: 22px;
    font-weight: bold;
    user-select: none;
}

body.dark .after-before .label {
    color: var(--dark-body-text);
}
.after-before .label-after { right: 24px; }
.after-before .label-before { left: 24px; }

.after-before .dragHandle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--text-color-primary-bg);
    left: 50%;
    transform: translateX(-50%);
    cursor: col-resize;
    z-index: 20;
}

body.dark .after-before .dragHandle {
    background: var(--dark-body-bg);
}

.after-before .dragIcon {
    position: absolute;
    top: 50%;
    left: -14px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--text-color-primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark .after-before .dragIcon {
    background: var(--dark-body-bg);
}
