@use '../../../styles/tools/functions';
@use '../../../styles/settings/colours';

.SliderWrap {
    touch-action: none;
    position: relative;
    cursor: grab;

    &:active {
        cursor: grabbing;
    }
}

.Slider {
    display: flex;
    border-radius: functions.pxRem(10);
    overflow: hidden;
    position: relative;

    @media all and (min-width: functions.em(768)) {
        border-radius: functions.pxRem(20);
    }
}

.Image {
    overflow: hidden;
    user-select: none;
    position: relative;

    &:before {
        content: '';
        width: functions.pxRem(2);
        position: absolute;
        top: 0;
        bottom: 0;
        z-index: 1;
        background-color: colours.$orange;
    }

    &--Before {
        &:before {
            right: 0;
        }

        .Label {
            left: functions.pxRem(8);

            @media all and (min-width: functions.em(768)) {
                left: functions.pxRem(20);
            }

            @media all and (min-width: functions.em(1024)) {
                left: functions.pxRem(30);
            }
        }
    }

    &--After {
        margin-left: auto;
        border-right: none;

        &:before {
            left: 0;
        }

        .ImageInner {
            float: right;
        }

        .Label {
            right: functions.pxRem(8);

            @media all and (min-width: functions.em(768)) {
                right: functions.pxRem(20);
            }

            @media all and (min-width: functions.em(1024)) {
                right: functions.pxRem(30);
            }
        }
    }
}

.ImageInner {
    position: relative;

    img {
        width: 100%;
        display: block;
        pointer-events: none;
    }
}

.Label {
    position: absolute;
    top: functions.pxRem(8);
    background-color: colours.$orange-light;
    border-radius: functions.pxRem(6);
    padding: functions.pxRem(4) functions.pxRem(8);
    color: colours.$green;

    @media all and (min-width: functions.em(768)) {
        top: functions.pxRem(20);
    }

    @media all and (min-width: functions.em(1024)) {
        top: functions.pxRem(30);
        font-size: functions.pxRem(16);
    }
}

.GrabberLine {
    width: functions.pxRem(4);
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    background-color: colours.$orange;
    transform: translateX(-50%);
    pointer-events: none;
}

.GrabberCircle {
    width: functions.pxRem(42);
    height: functions.pxRem(42);
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    transform: translate(-50%, -50%);
    background-color: colours.$orange;
    border-radius: 50%;
    display: flex;
    align-items: center;
    
    @media all and (min-width: functions.em(768)) {
        width: functions.pxRem(58);
        height: functions.pxRem(58);
    }
    
    @media all and (min-width: functions.em(1024)) {
        width: functions.pxRem(78);
        height: functions.pxRem(78);
    }

    svg {
        width: 45%;
        margin-left: auto;
        margin-right: auto;
    }
}
