/**
 * ZMND Before After Widget Styles
 */

.ws-zmnd-before-after-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.ws-zmnd-before-image,
.ws-zmnd-after-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Horizontal slider styles */
.ws-zmnd-horizontal .ws-zmnd-before-image {
    position: absolute;
    top: 0;
    left: 0;
    clip-path: polygon(0 0, var(--x-position) 0, var(--x-position) 100%, 0 100%);
    -webkit-clip-path: polygon(0 0, var(--x-position) 0, var(--x-position) 100%, 0 100%);
}

.ws-zmnd-horizontal .ws-zmnd-slider {
    position: absolute;
    top: 0;
    left: var(--x-position);
    width: 4px;
    height: 100%;
    background-color: #fff;
    cursor: ew-resize;
    transform: translateX(-2px);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Vertical slider styles */
.ws-zmnd-vertical .ws-zmnd-before-image {
    position: absolute;
    top: 0;
    left: 0;
    clip-path: polygon(0 0, 100% 0, 100% var(--y-position), 0 var(--y-position));
    -webkit-clip-path: polygon(0 0, 100% 0, 100% var(--y-position), 0 var(--y-position));
}

.ws-zmnd-vertical .ws-zmnd-slider {
    position: absolute;
    top: var(--y-position);
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #fff;
    cursor: ns-resize;
    transform: translateY(-2px);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.ws-zmnd-slider-button {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.ws-zmnd-horizontal .ws-zmnd-slider-button {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ws-zmnd-vertical .ws-zmnd-slider-button {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ws-zmnd-horizontal .ws-zmnd-slider-button::before,
.ws-zmnd-horizontal .ws-zmnd-slider-button::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 2px;
    background-color: #333;
}

.ws-zmnd-horizontal .ws-zmnd-slider-button::before {
    transform: rotate(45deg);
    left: 8px;
}

.ws-zmnd-horizontal .ws-zmnd-slider-button::after {
    transform: rotate(-45deg);
    right: 8px;
}

.ws-zmnd-vertical .ws-zmnd-slider-button::before,
.ws-zmnd-vertical .ws-zmnd-slider-button::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 10px;
    background-color: #333;
}

.ws-zmnd-vertical .ws-zmnd-slider-button::before {
    transform: rotate(45deg);
    top: 8px;
}

.ws-zmnd-vertical .ws-zmnd-slider-button::after {
    transform: rotate(-45deg);
    bottom: 8px;
}

.ws-zmnd-image-label {
    position: absolute;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    pointer-events: none;
}

.ws-zmnd-horizontal .ws-zmnd-before-label {
    bottom: 20px;
    left: 20px;
}

.ws-zmnd-horizontal .ws-zmnd-after-label {
    bottom: 20px;
    right: 20px;
}

.ws-zmnd-vertical .ws-zmnd-before-label {
    top: 20px;
    left: 20px;
}

.ws-zmnd-vertical .ws-zmnd-after-label {
    bottom: 20px;
    left: 20px;
}
