/* =========================================================
   Light Before & After — Frontend Styles v1.1.0
   ========================================================= */

.lba-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    cursor: col-resize;
    background: #111;
}

/* ── Images ─────────────────────────────────────────────── */

.lba-before-img,
.lba-after-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.lba-before-img img,
.lba-after-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    max-width: none;
}

/* After image: clipped panel, width set inline & via JS */
.lba-after-img {
    width: 50%;
    overflow: hidden;
    z-index: 2;
}

/* After image's <img> must always fill the full wrapper width */
.lba-after-img img {
    width: 100vw;
    max-width: none;
}

/* ── Divider line ────────────────────────────────────────── */

.lba-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: #ffffff;
    z-index: 10;
    cursor: col-resize;
    pointer-events: none;
}

/* ── Handle ──────────────────────────────────────────────── */

.lba-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2d7a6f;
    display: flex;
    align-items: center;
    justify-content: center;
    /* NO box-shadow / ring border */
    box-shadow: none;
    pointer-events: all;
    cursor: col-resize;
    transition: transform 0.15s ease;
    flex-shrink: 0;
    overflow: hidden;
}

.lba-handle:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

/* Custom icon image inside handle */
.lba-handle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    pointer-events: none;
    display: block;
}

/* Default SVG arrow icon */
.lba-default-icon {
    width: 55%;
    height: 55%;
    color: #fff;
    flex-shrink: 0;
    display: block;
}

/* ── Labels ──────────────────────────────────────────────── */

.lba-label {
    position: absolute;
    bottom: 14px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 4px;
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
    line-height: 1.4;
}

.lba-label-before { right: 14px; }
.lba-label-after  { left: 14px; }

/* ── Hover mode transition ───────────────────────────────── */

.lba-wrapper[data-mode="hover"] .lba-after-img {
    transition: width var(--lba-speed, 300ms) ease;
}

/* ── Click-toggle transition ─────────────────────────────── */

.lba-wrapper[data-mode="click"] .lba-after-img {
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lba-wrapper[data-mode="click"] .lba-divider {
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Mobile ──────────────────────────────────────────────── */

@media (max-width: 768px) {
    .lba-handle {
        width: 36px !important;
        height: 36px !important;
    }
}
