/* just formatting */
* {
    margin: 0;
    padding: 0;
}

/*html,
body {
    height: 100%;
}

body {
    display: flex;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}*/

.inner {
    max-width: 100%;
    margin: auto;
}

/* image comparison slider */
.comparison-slider {
    position: relative;
    width: 100%;
    margin: auto;
    user-select: none;
    overflow: hidden;
    touch-action: pan-x;
}

.comparison-slider > figure:last-of-type {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.comparison-slider > figure > img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

.comparison-slider > figure > figcaption {
    position: absolute;
    bottom: 0;
    /*display: inline-block;*/
    padding: 5px 10px;
    line-height: 1.5;
    background: rgba(30, 30, 30, 0.0);
    max-width: 30%;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f1f1f1;
    transition: opacity 0.35s, transform 0.35s;
}

.comparison-slider > figure:last-of-type > figcaption {
    right: 0;
}

.comparison-slider > figure > figcaption.hide {
    opacity: 0;
    transform: translate3d(-10px, 0, 0);
}

.comparison-slider > figure:last-of-type > figcaption.hide {
    transform: translate3d(10px, 0, 0);
}

.comparison-slider > .slider {
    position: absolute;
    top: calc(50% - 20px);
    left: 50%;
    display: flex;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transform: translate3d(-20px, 0, 0);
    background: #f1f1f1;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.45);
    text-align: center;
    cursor: grab;
}

.comparison-slider.dragging,
.comparison-slider.dragging > .slider {
    cursor: grabbing;
}

.comparison-slider.dragging > .slider {
    background: #d2abff;
}

.comparison-slider > .slider > svg {
    pointer-events: none;
}
