/* Pixelvolution Before After Slider */
.pxv-ba-wrapper {
    width: 100%;
}

.pxv-ba-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
}

.pxv-ba-container[data-orientation="vertical"] {
    cursor: ns-resize;
}

/* After layer - sets container dimensions */
.pxv-ba-after {
    display: block;
    width: 100%;
    position: relative;
}

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

/* Before layer - absolutely positioned, clipped */
.pxv-ba-before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
    z-index: 2;
}

/* Before image - fills container with object-fit cover */
.pxv-ba-before img {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--pxv-container-width, 100%);
    height: 100%;
    object-fit: cover;
    max-width: none;
    pointer-events: none;
}

/* Vertical orientation */
.pxv-ba-container[data-orientation="vertical"] .pxv-ba-before {
    width: 100%;
    height: 50%;
    bottom: auto;
    right: 0;
}

.pxv-ba-container[data-orientation="vertical"] .pxv-ba-before img {
    width: 100%;
    height: var(--pxv-container-height, 100%);
}

/* Labels */
.pxv-ba-label {
    position: absolute;
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    z-index: 5;
    pointer-events: none;
}

.pxv-ba-label-before {
    bottom: 20px;
    left: 20px;
}

.pxv-ba-label-after {
    bottom: 20px;
    right: 20px;
}

.pxv-ba-container[data-orientation="vertical"] .pxv-ba-label-before {
    top: 20px;
    bottom: auto;
    left: 20px;
}

.pxv-ba-container[data-orientation="vertical"] .pxv-ba-label-after {
    bottom: 20px;
    right: auto;
    left: 20px;
}

/* Handle */
.pxv-ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    z-index: 10;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.pxv-ba-container[data-orientation="vertical"] .pxv-ba-handle {
    top: 50%;
    left: 0;
    width: 100%;
    height: auto;
    transform: translateY(-50%);
    flex-direction: column;
}

.pxv-ba-handle-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: #ffffff;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.pxv-ba-container[data-orientation="vertical"] .pxv-ba-handle-line {
    top: 50%;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 4px;
    transform: translateY(-50%);
}

.pxv-ba-handle-circle {
    position: relative;
    width: 44px;
    height: 44px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 11;
    flex-shrink: 0;
}

.pxv-ba-handle-circle svg {
    width: 24px;
    height: 24px;
    color: #333333;
}

.pxv-ba-container[data-orientation="vertical"] .pxv-ba-handle-circle svg {
    transform: rotate(90deg);
}
