.adan-ba-grid {
    --adan-ba-columns: 2;
    display: grid;
    grid-template-columns: repeat(var(--adan-ba-columns), minmax(0, 1fr));
    gap: 24px;
}

.adan-ba-card {
    min-width: 0;
    opacity: 0;
    transform: translateY(18px);
    animation: adanBaFadeIn 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    will-change: opacity, transform;
}

.adan-ba-card:nth-child(1) {
    animation-delay: 0.06s;
}

.adan-ba-card:nth-child(2) {
    animation-delay: 0.18s;
}

.adan-ba-card:nth-child(3) {
    animation-delay: 0.30s;
}

.adan-ba-card:nth-child(4) {
    animation-delay: 0.42s;
}

.adan-ba-card:nth-child(5) {
    animation-delay: 0.54s;
}

.adan-ba-card:nth-child(6) {
    animation-delay: 0.66s;
}

.adan-ba-card:nth-child(7) {
    animation-delay: 0.78s;
}

.adan-ba-card:nth-child(8) {
    animation-delay: 0.90s;
}

.adan-ba-card:nth-child(n+9) {
    animation-delay: 1.02s;
}

@keyframes adanBaFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.adan-ba-title {
    margin: 0 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    line-height: 1.15;
}

.adan-ba-comparison {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #eef0f2;
    isolation: isolate;
    touch-action: pan-y;
}

.adan-ba-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
}

.adan-ba-image-before {
    z-index: 1;
}

.adan-ba-after-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    clip-path: inset(0 calc(100% - var(--adan-ba-position)) 0 0);
    will-change: clip-path;
}

.adan-ba-label {
    position: absolute;
    z-index: 4;
    top: 14px;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 11px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

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

.adan-ba-divider {
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: var(--adan-ba-position);
    width: 3px;
    transform: translateX(-50%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.adan-ba-handle {
    position: absolute;
    z-index: 6;
    top: 50%;
    left: var(--adan-ba-position);
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.adan-ba-handle span {
    position: relative;
    width: 21px;
    height: 12px;
}

.adan-ba-handle span::before,
.adan-ba-handle span::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
}

.adan-ba-handle span::before {
    left: 0;
    transform: translateY(-50%) rotate(-45deg);
}

.adan-ba-handle span::after {
    right: 0;
    transform: translateY(-50%) rotate(135deg);
}

.adan-ba-range {
    position: absolute;
    z-index: 8;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: ew-resize;
    opacity: 0;
}

.adan-ba-empty {
    display: grid;
    min-height: 220px;
    place-items: center;
    padding: 24px;
    border: 1px dashed #c8ccd2;
    border-radius: 8px;
    color: #52606f;
    text-align: center;
    background: #f7f8f9;
}

@media (max-width: 767px) {
    .adan-ba-grid {
        --adan-ba-columns: 1;
    }

    .adan-ba-title {
        font-size: 22px;
    }

    .adan-ba-label {
        top: 10px;
        min-height: 28px;
        padding: 6px 9px;
        font-size: 11px;
    }

    .adan-ba-label-before {
        left: 10px;
    }

    .adan-ba-label-after {
        right: 10px;
    }

    .adan-ba-handle {
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .adan-ba-card {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
