html {
    --top-height: 140px;
}

.img-compare-container {
    position: relative !important;
    display: block;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    margin: 20px 0;
    overflow: hidden;
    border-radius: 8px;
    user-select: none;
}

.img-compare-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--slider-img-width, 100%);
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    max-width: none;
}

.img-compare-before,
.img-compare-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.img-compare-after {
    width: 50%;
}

.img-compare-after img {
    display: block;
    max-width: none !important;
    height: 100%;
    object-fit: cover;
}

.img-compare-slider {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    width: 100% !important;
    transform: translateY(-50%);
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    margin: 0 !important;
    z-index: 10;
    height: 0;
}

.img-compare-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 40px;
    border-radius: 10%;
    background: white;
    border: 3px solid #2980b9;
    cursor: ew-resize;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

.img-compare-slider::-moz-range-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid #2980b9;
    cursor: ew-resize;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

.img-compare-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: white;
    box-shadow: 0 0 6px rgba(0,0,0,0.5);
    pointer-events: none;
    z-index: 5;
    transform: translateX(-50%);
}