/* FleexKit Image Comparison Styles */

.fleexkit-image-comparison-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
    overflow: hidden;
    line-height: 0;
}

.fleexkit-image-comparison-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
}

.fleexkit-image-comparison-container img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: cover;
}

.fk-img-before {
    width: 100%;
}

.fk-img-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    clip-path: inset(0 0 0 50%); /* Default horizontal clip */
}

/* Orientation Vertical */
.fk-orientation-vertical .fk-img-after {
    clip-path: inset(50% 0 0 0);
}

/* Handle */
.fk-comparison-handle {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.fk-orientation-horizontal .fk-comparison-handle {
    top: 0;
    left: 50%;
    bottom: 0;
    width: 2px;
    cursor: ew-resize;
    pointer-events: auto;
}

.fk-orientation-vertical .fk-comparison-handle {
    left: 0;
    top: 50%;
    right: 0;
    height: 2px;
    cursor: ns-resize;
    pointer-events: auto;
}

.fk-handle-line {
    position: absolute;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.fk-orientation-horizontal .fk-handle-line {
    width: 2px;
    height: 100%;
}

.fk-orientation-vertical .fk-handle-line {
    height: 2px;
    width: 100%;
}

.fk-handle-circle {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.fk-comparison-handle:hover .fk-handle-circle {
    transform: scale(1.1);
}

/* Arrows for Handle */
.fk-handle-circle::before,
.fk-handle-circle::after {
    content: '';
    width: 0;
    height: 0;
    border: 5px solid transparent;
    position: absolute;
}

/* Horizontal Arrows */
.fk-orientation-horizontal .fk-handle-circle::before {
    border-right-color: currentColor;
    left: 6px;
}
.fk-orientation-horizontal .fk-handle-circle::after {
    border-left-color: currentColor;
    right: 6px;
}

/* Vertical Arrows */
.fk-orientation-vertical .fk-handle-circle::before {
    border-bottom-color: currentColor;
    top: 6px;
}
.fk-orientation-vertical .fk-handle-circle::after {
    border-top-color: currentColor;
    bottom: 6px;
}

/* Custom Icon override */
.fk-handle-circle i,
.fk-handle-circle svg {
    font-size: 16px;
}

/* Labels */
.fk-comparison-label {
    position: absolute;
    padding: 8px 12px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fleexkit-image-comparison-wrapper:hover .fk-comparison-label {
    opacity: 1;
}

/* Label Positions */
.fk-label-before { left: 20px; top: 20px; }
.fk-label-after { right: 20px; top: 20px; }

.fk-orientation-vertical .fk-label-before { top: 20px; left: 20px; }
.fk-orientation-vertical .fk-label-after { bottom: 20px; left: 20px; right: auto; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .fk-handle-circle {
        width: 30px;
        height: 30px;
    }
}
