.ldba-gallery,
.ldba-gallery * {
    box-sizing: border-box;
}

.ldba-gallery {
    align-items: center;
    display: grid;
    gap: var(--ldba-gap, 24px);
    grid-template-columns: repeat(var(--ldba-columns, 2), minmax(0, var(--ldba-card-width, 560px)));
    justify-content: var(--ldba-align, center);
    margin: 0 auto;
    padding-block: clamp(24px, 3.2vh, 32px);
    width: 100%;
}

.ldba-gallery.ldba-fill-viewport {
    min-height: calc(100svh - var(--ldba-header-offset, 112px));
}

.ldba-comparison {
    --ldba-position: 50%;
    aspect-ratio: 1200 / 1710;
    background: #eae8e2;
    contain: layout paint;
    cursor: ew-resize;
    isolation: isolate;
    margin: 0;
    overflow: hidden;
    position: relative;
    justify-self: center;
    touch-action: pan-y;
    width: min(100%, var(--ldba-card-width, 560px));
}

.ldba-image-layer {
    inset: 0;
    overflow: hidden;
    position: absolute;
}

.ldba-after-layer {
    clip-path: inset(0 0 0 var(--ldba-position));
    z-index: 2;
}

.ldba-image {
    display: block;
    height: 100% !important;
    inset: 0;
    max-height: none !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center;
    position: absolute;
    width: 100% !important;
    user-select: none;
}

.ldba-comparison .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    white-space: nowrap;
    width: 1px;
}

.ldba-label {
    background: #1d3152;
    color: #fff;
    font-family: inherit;
    font-size: clamp(13px, 1.5vw, 19px);
    font-weight: 500;
    letter-spacing: .04em;
    line-height: 1;
    padding: .8em 1.15em;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

.ldba-label-before {
    left: clamp(10px, 4%, 28px);
}

.ldba-label-after {
    right: clamp(10px, 4%, 28px);
}

.ldba-divider {
    background: #fff;
    bottom: 0;
    left: var(--ldba-position);
    pointer-events: none;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    width: 3px;
    z-index: 5;
}

.ldba-handle {
    align-items: center;
    background: rgba(29, 49, 82, .88);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
    display: flex;
    height: 58px;
    justify-content: center;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
}

.ldba-arrow {
    border-bottom: 7px solid transparent;
    border-top: 7px solid transparent;
    height: 0;
    width: 0;
}

.ldba-arrow-left {
    border-right: 9px solid #fff;
    margin-right: 5px;
}

.ldba-arrow-right {
    border-left: 9px solid #fff;
}

.ldba-range {
    appearance: none;
    background: transparent;
    cursor: ew-resize;
    height: 100%;
    inset: 0;
    margin: 0;
    opacity: 0;
    padding: 0;
    position: absolute;
    touch-action: pan-y;
    width: 100%;
    z-index: 6;
}

.ldba-range::-webkit-slider-thumb {
    appearance: none;
    height: 58px;
    width: 58px;
}

.ldba-range::-moz-range-thumb {
    border: 0;
    height: 58px;
    width: 58px;
}

.ldba-comparison:focus-within .ldba-handle {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .65), 0 2px 12px rgba(0, 0, 0, .3);
}

@media (min-width: 768px) and (max-height: 950px) {
    .ldba-fill-viewport .ldba-comparison {
        width: min(100%, var(--ldba-card-width, 560px), 500px);
    }
}

@media (min-width: 768px) and (max-height: 850px) {
    .ldba-fill-viewport .ldba-comparison {
        width: min(100%, var(--ldba-card-width, 560px), 460px);
    }
}

@media (min-width: 768px) and (max-height: 750px) {
    .ldba-fill-viewport .ldba-comparison {
        width: min(100%, var(--ldba-card-width, 560px), 400px);
    }
}

@media (max-width: 767px) {
    .ldba-gallery {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-block: 22px;
    }

    .ldba-comparison,
    .ldba-fill-viewport .ldba-comparison {
        width: min(100%, var(--ldba-card-width, 560px));
    }

    .ldba-handle {
        height: 50px;
        width: 50px;
    }

    .ldba-range::-webkit-slider-thumb {
        height: 50px;
        width: 50px;
    }

    .ldba-range::-moz-range-thumb {
        height: 50px;
        width: 50px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ldba-comparison * {
        transition: none !important;
    }
}
