/* assets/css/before-after.css */
.kdcp-ba-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--kd-radius-md);
    box-shadow: var(--kd-shadow);
    background: #000;
}

/* The Before image defines the natural height of the container */
.kdcp-ba-container > img.kdcp-ba-img {
    position: relative;
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.kdcp-ba-after {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    clip-path: inset(0 0 0 50%);
}

.kdcp-ba-after .kdcp-ba-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.kdcp-ba-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: white;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kdcp-ba-handle {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.kdcp-ba-handle::before,
.kdcp-ba-handle::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}
.kdcp-ba-handle::before {
    border-right: 6px solid var(--kd-primary, #f5b042);
    margin-right: 4px;
}
.kdcp-ba-handle::after {
    border-left: 6px solid var(--kd-primary, #f5b042);
    margin-left: 4px;
}

.kdcp-ba-label {
    position: absolute;
    top: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: var(--kd-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 5;
    backdrop-filter: blur(4px);
}
.kdcp-ba-label-before { left: 1rem; }
.kdcp-ba-label-after { right: 1rem; }

/* ── Shared Lightbox Overlay ── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 30px;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay .lb-content {
    max-width: 70vw;
    max-height: 80vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.9);
    position: relative;
    animation: kdcp-fadeUp 0.35s ease;
}
.lightbox-overlay .lb-content img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 80vh;
    object-fit: contain;
}
.lightbox-overlay .lb-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.6rem;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    background: none;
    border: none;
}
.lightbox-overlay .lb-close:hover { opacity: 1; transform: scale(1.1); }
@keyframes kdcp-fadeUp {
    0% { opacity: 0; transform: scale(0.94) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
