/**
 * Block: Before / After Slider — Styles
 */

/* ─── Block Wrapper ───────────────────────────────── */

.abs-ba-slider-block {
    padding: 0;
    margin: 0;
}

/* ─── Slider Wrap ─────────────────────────────────── */

.abs-bas-wrap {
    position: relative;
    width: 100%;
    max-width: 900px;    /* overridden inline per instance */
    margin: 0 auto;
    border-radius: 20px; /* overridden inline per instance */
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 41, 77, .18);
    user-select: none;
    cursor: ew-resize;
}

/* ─── Before Image (full-width base layer) ────────── */

.abs-bas-img-before {
    position: relative;
    width: 100%;
    display: block;
}

.abs-bas-img-before img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ─── After Image (clipped reveal layer, right side) ─ */

.abs-bas-img-after {
    position: absolute;
    inset: 0;
    clip-path: inset(0 0 0 50%); /* updated by JS — reveals right (After) side */
}

.abs-bas-img-after img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

/* ─── Drag Handle ─────────────────────────────────── */

.abs-bas-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* updated by JS */
    transform: translateX(-50%);
    width: 4px;
    background: #ffffff;
    cursor: ew-resize;
    z-index: 5;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

/* ─── Knob Circle ─────────────────────────────────── */

.abs-bas-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f314a;
    font-size: 1rem;
    gap: 2px;
}

/* ─── Labels ──────────────────────────────────────── */

.abs-bas-labels {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 6;
    pointer-events: none;
}

.abs-bas-label {
    background: rgba(0, 0, 0, .55);
    color: #ffffff;
    font-weight: 800;
    font-size: .8rem;
    padding: 5px 10px;
    border-radius: 9999px;
}

/* ─── Placeholder (no images set) ────────────────── */

.abs-bas-placeholder {
    padding: 40px;
    text-align: center;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 12px;
    color: #666;
    max-width: 560px;
    margin: 0 auto;
}

.abs-bas-placeholder p {
    margin: 0;
    line-height: 1.6;
}
