/* Webtron Before/After Image Comparison Styles */

.woa-before-after-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 2rem 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.woa-before-after-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 default aspect ratio */
    overflow: hidden;
    background: #f3f4f6;
}

.woa-before-after-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.woa-after-image,
.woa-before-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    pointer-events: none;
}

.woa-before-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.1s ease-out;
}

.woa-before-after-container[data-orientation="vertical"] .woa-before-image-wrapper {
    clip-path: inset(0 0 50% 0);
}

/* Slider handle */
.woa-slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #fff;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    transition: background 0.2s;
}

.woa-before-after-container[data-orientation="vertical"] .woa-slider-handle {
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    transform: translateY(-50%);
    cursor: ns-resize;
}

.woa-slider-handle:hover {
    background: #2372ce;
}

.woa-handle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #2372ce;
    transition: all 0.2s;
}

.woa-slider-handle:hover .woa-handle-icon {
    background: #2372ce;
    color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.woa-before-after-container[data-orientation="vertical"] .woa-handle-icon svg {
    transform: rotate(90deg);
}

/* Labels */
.woa-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.woa-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woa-label-before {
    left: 20px;
}

.woa-label-after {
    right: 20px;
}

.woa-before-after-container[data-orientation="vertical"] .woa-label-before {
    top: 20px;
    left: 20px;
}

.woa-before-after-container[data-orientation="vertical"] .woa-label-after {
    top: auto;
    bottom: 20px;
    right: 20px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .woa-label {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .woa-handle-icon {
        width: 40px;
        height: 40px;
    }
}

/* Touch device optimization */
.woa-before-after-container.woa-dragging .woa-before-image-wrapper {
    transition: none;
}

.woa-before-after-container.woa-dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
}
