@charset "utf-8";
@import (optional, reference) "var.less";
/*Range input*/
AX-RANGE {
    --_range-sz-handle: 1.6rem;
    --_range-sz-track: .3rem;
    display: inline-flex;
    flex-direction: column;
    width: var(--_w-input);
    box-sizing: border-box;
    vertical-align: middle;
    position: relative;
    input{
        position: fixed;
        left:-100000px;
    }
    [rep=wrap] {
        user-select: none;
        font-size: var(--_sz-ignore);
        height: var(--_sz-input);
        display: flex;
        flex: auto;
        align-items: center;
        justify-content: center;
    }
    [rep=body] {
        position: relative;
        flex: auto;
    }
    [rep=track] {
        height: var(--_range-sz-track);
        border-radius: var(--_range-sz-track);
        position: relative;
        z-index: 1;
        [rep=base] {
            background-color: var(--_c-text-bd);
            width: 100%;
            height: inherit;
            border-radius: inherit;
            transition: background-color var(--_dur-1) ease-out;
            position: relative;
            &:before {
                content: '';
                width: 100%;
                height: calc(var(--_range-sz-track)*5);
                position: absolute;
                left: 0;
                top: calc(-1*var(--_range-sz-track)*2);
            }
        }
        [rep=thumb] {
            width: 0;
            height: inherit;
            border-radius: inherit;
            background-color: var(--_c-prim);
            position: absolute;
            left: 0;
            top: 0;
            &:before {
                content: '';
                width: 100%;
                height: calc(var(--_range-sz-track)*5);
                position: absolute;
                left: 0;
                top: calc(-1*var(--_range-sz-track)*2);
            }
        }
    }
    [rep=increase],
    [rep=decrease] {
        color: #fff;
        background-color: var(--_c-prim);
        font-size: var(--_sz-space);
        font-family: var(--_ff-icon);
        height: var(--_sz-font);
        aspect-ratio: 1/1;
        border-radius: 100%;
        cursor: pointer;
        .v3-flex-center(inline-flex);
    }
    [rep=increase] {
        margin-left: var(--_sz-space);
    }
    [rep=decrease] {
        margin-right:var(--_sz-space);
    }
    [rep=result] {
        margin-left:var(--_sz-space);
        min-width: var(--_sz-body);
        text-align: right;
    }
    [rep=handles] {
        >* {
            width: var(--_range-sz-handle);
            height: var(--_range-sz-handle);
            border-radius: var(--_range-sz-handle);
            border: 2px solid var(--_c-prim);
            background-color: #fff;
            box-shadow: none;
            transition: box-shadow var(--_dur-1) linear, background-color var(--_dur-1) linear, border-color var(--_dur-1) linear;
            box-sizing: border-box;
            position: absolute;
            top: calc(-1*var(--_range-sz-handle)/2 + var(--_range-sz-track)/2);
            z-index: 1;
        }
        >:not([disabled]):hover {
            cursor: col-resize;
            box-shadow: 0 0 0 var(--_range-sz-track) var(--_c-prim-sd);
        }
        >[rep=from] {
            left: 0;
        }
        >[rep=to] {
            left: calc(100% - var(--_range-sz-handle));
            z-index: 2;
        }
        >[rep=single] {
            left: 0;
        }
        >[active] {
            z-index: 3;
        }
    }
    [rep=bubbles] {
        >* {
            font-size: var(--_sz-ignore);
            line-height: var(--_sz-brief);
            padding: 0 .5rem;
            border-radius: var(--_r);
            position: absolute;
            top: calc(-1*var(--_sz-brief) - (var(--_range-sz-handle) - var(--_range-sz-track))/2 - .6rem);
            z-index: 1;
             visibility: hidden;
        }
        [rep=from],
        [rep=to],
        [rep=single],
        [rep=merge] {
            color: #fff;
            background-color: var(--_c-prim);
            transform: translateX(calc(-50% + var(--_range-sz-handle)/2));
            &:before {
                content: "";
                display: block;
                width: 0;
                height: 0;
                margin-left: -3px;
                overflow: hidden;
                border: 3px solid transparent;
                border-top-color: var(--_c-prim);
                position: absolute;
                bottom: -6px;
                left: 50%;
            }
        }
        [rep=from] {}
        [rep=to] {
            z-index: 2;
        }
        [rep=single] {}
        [rep=merge] {
            visibility: hidden;
        }
        [rep=min],
        [rep=max] {
            color: var(--_c-text);
            background-color: var(--_c-text-bg);
        }
        [rep=min] {
            left: 0;
        }
        [rep=max] {
            right: 0;
        }
        [active] {
            z-index: 3;
        }
    }
    &[limitshow] [rep=bubbles]{
        [rep=max],
        [rep=min] {
           visibility: visible;
        }
    }
    &[valshow] [rep=bubbles]{
        [rep=from],
        [rep=to],
        [rep=single] {
           visibility: visible;
        }
    }
    [rep=ruler] {
        --_ruler-major: .8rem;
        --_ruler-minor: .4rem;
        width: calc(100% - var(--_range-sz-handle));
        margin: 0 calc(var(--_range-sz-handle)/2);
        position: absolute;
        left: 0;
        top: var(--_range-sz-track);
        ul {
            position: relative;
            padding-inline-start: 0;
        }
        li {
            position: absolute;
            top: 0;
            &:before {
                content: '';
                width: 1px;
                height: var(--_ruler-major);
                background-color: var(--_c-text-fc);
                border-radius: 0;
                overflow: hidden;
                position: absolute;
                top: 0;
                left: 0;
            }
            &:not([data-content]):before {
                height: var(--_ruler-minor);
            }
            &:after {
                content: attr(data-content);
                color: var(--_c-ignore);
                font-size: var(--_sz-ignore);
                line-height: var(--_sz-ignore);
                white-space: nowrap;
                text-align: center;
                position: absolute;
                top: calc(var(--_ruler-major) + .2rem);
                left: 0;
                transform: translateX(-50%);
            }
        }
        div {
            height: .2rem;
            background-color: var(--_c-text-fc);
            position: absolute;
            top: calc(var(--_ruler-minor) - .2rem);
        }
    }
    &:not([disabled])[multiple] [rep=thumb]:hover {
        cursor: w-resize;
    }
    &._merge [rep=bubbles] {
        [rep=from],
        [rep=to] {
            visibility: hidden;
        }
        [rep=merge] {
            visibility: visible;
        }
    }
    &._tostart [rep=bubbles] [rep=min] {
        visibility: hidden;
    }
    &._toend [rep=bubbles] [rep=max] {
        visibility: hidden;
    }
    &:not([disabled]):hover {
        [rep=track] [rep=base] {
            background-color: var(--_c-prim-bd);
        }
    }
    &[disabled] [rep=wrap] {
        user-select: none;
        pointer-events: none;
        [rep=decrease],
        [rep=increase] {
            color: var(--_c-prim-fc)
        }
        [rep=track] [rep=thumb] {
            background-color: var(--_c-prim-fc)
        }
        [rep=bubbles] [rep=from],
        [rep=bubbles] [rep=to],
        [rep=bubbles] [rep=single],
        [rep=bubbles] [rep=merge] {
            background-color: var(--_c-prim-fc);
            &:before {
                border-top-color: var(--_c-prim-fc);
            }
        }
        [rep=handles]>* {
            border-color: var(--_c-prim-fc);
            box-shadow: none;
        }
    }
    &[axis="y"] {
        display: inline-flex;
        min-width: 9.4rem;
        [rep=wrap] {
            height: 100%;
            flex-direction: column-reverse;
        }
        [rep=body] {
            width: var(--_range-sz-track);
            min-height: 20rem;
        }
        [rep=track] {
            height: 100%;
            width: var(--_range-sz-track);
            border-radius: var(--_range-sz-track);
            [rep=base] {
                width: inherit;
                height: inherit;
            }
            [rep=thumb] {
                width: inherit;
                top: auto;
                bottom: 0;
            }
            [rep=base]:before,
            [rep=thumb]:before {
                height: 100%;
                width: calc(var(--_range-sz-track)*5);
                top: 0;
                left: calc(-1*var(--_range-sz-track)*2);
            }
        }
        [rep=bubbles]>* {
            top: auto;
            left: auto;
            right: auto;
            transform: translateX(calc(-100% - var(--_range-sz-handle)/2 - 0.6rem));
        }
        [rep=bubbles] [rep=max] {
            top: 0;
        }
        [rep=bubbles] [rep=min] {
            bottom: 0;
        }
        [rep=bubbles] [rep=from]:before,
        [rep=bubbles] [rep=to]:before,
        [rep=bubbles] [rep=single]:before,
        [rep=bubbles] [rep=merge]:before {
            border: 3px solid transparent;
            border-top-color: transparent;
            border-left-color: var(--_c-prim);
            left: auto;
            bottom: auto;
            top: calc(50% - 3px);
            right: -6px;
        }
        [rep=bubbles] [rep=merge] {
            transform: translate(calc(-100% - var(--_range-sz-handle)/2 - 0.6rem), calc(50% - var(--_range-sz-handle)/2));
        }
        [rep=bubbles] [rep=merge] i {
            text-align: center;
            display: block;
            transform: rotate(90deg);
            margin: -.6rem auto;
        }
        [rep=handles]>* {
            left: calc((var(--_range-sz-handle) - var(--_range-sz-track))/-2);
            top: auto;
        }
        [rep=handles]>*:not([disabled]):hover {
            cursor: row-resize;
        }
        [rep=ruler] {
            height: calc(100% - var(--_range-sz-handle));
            margin: calc(var(--_range-sz-handle)/2) 0;
            left: var(--_range-sz-track);
            top: 0;
        }
        [rep=ruler] ul {
            height: 100%;
        }
        [rep=ruler] li {
            top: auto;
            left: 0;
            bottom: 0;
        }
        [rep=ruler] li:before {
            height: 1px;
            width: var(--_ruler-major);
            top: auto;
            bottom: 0;
            left: 0;
        }
        [rep=ruler] li:not([data-content]):before {
            height: 1px;
            width: var(--_ruler-minor);
        }
        [rep=ruler] li:after {
            text-align: left;
            top: 0;
            left: calc(var(--_ruler-major) + 0.2rem);
            transform: translateY(-50%);
        }
        [rep=ruler] div {
            height: 0;
            width: 0.2rem;
            top: auto;
            left: calc(var(--_ruler-minor) - 0.2rem);
        }
        [rep=increase],
        [rep=decrease],
        [rep=result] {
            line-height: var(--_sz-font);
        }
        [rep=increase] {
            margin-bottom: var(--_sz-space);
            margin-left: 0;
        }
        [rep=decrease] {
            margin-top: var(--_sz-space);
            margin-right: 0;
        }
        [rep=result] {
            margin-left: 0;
            margin-bottom: var(--_sz-space);
            min-width: auto;
            text-align: center;
        }
        &:not([disabled])[multiple] [rep=thumb]:hover {
            cursor: s-resize;
        }
    }
}
