/* ============================================================
   OMG Before After Slider  –  slider.css  v1.0.0
   ============================================================ */

/* ── Wrapper ───────────────────────────────────────────────── */
.omg-bas-wrap {
    max-width: 860px;
    margin: 2.5rem auto;
    padding: 0 1rem;
    font-family: inherit;
    text-align: center;
}

/* ── Optional heading / subheading ─────────────────────────── */
.omg-bas-heading {
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: .35rem;
    color: #1a1a2e;
    letter-spacing: -.02em;
}

.omg-bas-subheading {
    font-size: .95rem;
    color: #666;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* ── Slider container ──────────────────────────────────────── */
.omg-bas-container {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18), 0 4px 16px rgba(0, 0, 0, .10);
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;           /* allow vertical scroll unless dragging */
    background: #111;

    /* Reveal animation on load */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease;
}

.omg-bas-container.omg-bas--ready {
    opacity: 1;
    transform: translateY(0);
}

/* ── After image (full, underneath) ────────────────────────── */
.omg-bas-after {
    position: relative;
    width: 100%;
    display: block;
    line-height: 0;
}

.omg-bas-after img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* ── Before image (clipped on left) ────────────────────────── */
.omg-bas-before {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    /* width is set by JS */
}

.omg-bas-before img {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--omg-container-width, 100%); /* JS sets CSS var on container */
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* ── Labels ─────────────────────────────────────────────────── */
.omg-bas-label {
    position: absolute;
    top: 14px;
    padding: 5px 14px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 100px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    z-index: 4;
    transition: opacity .25s;
}

.omg-bas-label--before {
    left: 14px;
    background: rgba(255, 255, 255, .85);
    color: #1a1a2e;
}

.omg-bas-label--after {
    right: 14px;
    background: rgba(26, 26, 46, .75);
    color: #fff;
}

/* ── Divider handle ─────────────────────────────────────────── */
.omg-bas-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    /* left is set by JS */
    width: 44px;
    margin-left: -22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none; /* container captures events */
}

/* Vertical line */
.omg-bas-handle__line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    margin-left: -1.5px;
    background: #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, .35);
}

/* Circular button */
.omg-bas-handle__btn {
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .3), 0 1px 4px rgba(0, 0, 0, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a2e;
    transition: transform .15s ease, box-shadow .15s ease;
}

.omg-bas-container:active .omg-bas-handle__btn,
.omg-bas-container.omg-bas--dragging .omg-bas-handle__btn {
    transform: scale(1.12);
    box-shadow: 0 6px 28px rgba(0, 0, 0, .38), 0 2px 6px rgba(0, 0, 0, .15);
}

/* ── CTA button ─────────────────────────────────────────────── */
.omg-bas-cta {
    display: inline-block;
    margin-top: 1.5rem;
    padding: .75rem 2.25rem;
    background: #1a1a2e;
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 100px;
    box-shadow: 0 6px 24px rgba(26, 26, 46, .22);
    transition: background .2s, transform .15s, box-shadow .2s;
}

.omg-bas-cta:hover {
    background: #2d2d54;
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(26, 26, 46, .28);
    color: #fff;
    text-decoration: none;
}

.omg-bas-cta:active {
    transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .omg-bas-wrap {
        padding: 0 .5rem;
        margin: 1.5rem auto;
    }

    .omg-bas-container {
        border-radius: 12px;
    }

    .omg-bas-handle__btn {
        width: 38px;
        height: 38px;
    }

    .omg-bas-label {
        font-size: .65rem;
        padding: 4px 10px;
    }
}
