// editor-transform
.editor-transform{
    box-sizing: border-box;
    // border: 1px solid #FFF;
    position: absolute;
    z-index: 5;
    cursor: move;

    &:before{
        content: "";
        box-sizing: content-box;
        border: 2px solid #6CCFFF;
        height: 100%;
        width: 100%;
        position: absolute;
        left: 0;
        top: 0;
        z-index: 1;
        margin:-2px 0 0 -2px;
    }
    &:after{
        content: "";
        cursor: move;
        height: 25px;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        display: none;
    }
    &-3drotate {
        &:before {
            border-width: 1px;
            border-color: rgba(108, 207, 255, 0.3)
        }
    }
    &-multiple {
        &:before {
            // border-width: 1px;
            border-style: dotted;
        }
    }
    &-editing{
        &:after{
            display: block;
        }
    }

    &-lock{
        .editor-lock-icon{
            .icon(lock, #fff);
            width: 23px;
            height: 23px;
            background-color: #000;
            background-size: 14px 14px;
            background-position: 5px 4px;
            background-repeat: no-repeat;
            position: absolute;
            bottom: -11px;
            right: -11px;
            border-radius: 50%;
            z-index: 2;
            cursor: pointer;
        }

        cursor: default;
        .editor-grip,
        .editor-rotator{
            display: none;
        }
    }

    .editor-grip{
        padding: 11px;
        position: absolute;
        left: 0;
        top: 0;
        z-index: 5;
        transform: translate(-50%, -50%);
        transition: .3s opacity;

        b{
            box-sizing: border-box;
            display: block;
            background: #FFF;
            border:1px solid #C0C5CF;
            box-shadow: 0px 0px 2px 0px rgba(86, 90, 98, 0.2);
            border-radius: 6px;
        }

        &.editor-grip-fadeout {
            opacity: 0;
        }
    }
    .editor-grip-nw{
        margin-left: -1px;
        margin-top: -1px;
    }
    .editor-grip-n{
        cursor:  ns-resize;
        left: 50%;
        margin-top: -1px;
    }
    .editor-grip-ne{
        cursor: nesw-resize;
        left: 100%;
        margin-top: -1px;
        margin-left: 1px;
    }
    .editor-grip-e{
        cursor: ew-resize;
        left: 100%;
        top: 50%;
        margin-left: 1px;
    }
    .editor-grip-se{
        cursor: nwse-resize;
        left: 100%;
        top: 100%;
        margin-left: 1px;
        margin-top: 1px;
    }
    
    .editor-grip-s{
        cursor: ns-resize;
        left: 50%;
        top: 100%;
        margin-top: 1px;
    }

    .editor-grip-sw{
        cursor: nesw-resize;
        top: 100%;
        margin-left: -1px;
        margin-top: 1px;
    }

    .editor-grip-w{
        cursor: ew-resize;
        top: 50%;
        left: 0;
        margin-left: -1px;
    }

    .editor-grip-w,
    .editor-grip-e {
        b {
            height: 16px;
            width: 7px;
        }
    }

    .editor-grip-s,
    .editor-grip-n {
        b {
            width: 16px;
            height: 7px;
        }
    }

    .editor-grip-ne,
    .editor-grip-se,
    .editor-grip-sw,
    .editor-grip-nw,
    .editor-grip-round {
        z-index: 6;
        b {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }
    }

    .editor-rotator{
        cursor: pointer;
        margin: 14px 0 0 -11px;
        position: absolute;
        left: 50%;
        top: 100%;
        z-index: 4;
        transition: .3s opacity;

        b{
            .icon(rotator);
            width: 22px;
            height: 22px;
            background-size: 100% 100%;
            position: relative;
            z-index: 2;
            display: block;

            span{
                font-weight: normal;
                font-style: normal;
                position: absolute;
                top: 40px;
                left: 50%;
                transform: translateX(-50%);
                height: 28px;
                line-height: 28px;
                padding: 0 8px;
                font-size: 12px;
                background: #0E1217;
                border-radius: 4px;
                color: white;
            }
        }

        &.editor-rotator-fadeout {
            opacity: 0;
        }
    }

    .editor-rotator-three{
        position: absolute;
        width: 28px;
        height: 28px;
        top: 100%;
        left: 50%;
        margin-left:-14px;
        margin-top: -14px;
        z-index: 6;
        border-radius: 50%;
        cursor: pointer;
        background-color: #3a3a3a;
        transition: .3s opacity;

        b{
            .icon(rotator3d);
            width: 28px;
            height: 28px;
            background-repeat: no-repeat;
            background-size: 20px;
            background-position: center
        }
        &.editor-rotator-fadeout {
            opacity: 0;
        }
    }
    
    &.editor-transform-inner{
        @bdw: 4px;

        border: 0;
        cursor: move;
        overflow: hidden;

        .editor-grip{
            cursor: nwse-resize;
            left: initial;
            top: initial;
            padding: 0;
            position: absolute;
            z-index: 5;
            margin: 0;
            b{
                box-sizing: border-box;
                display: block;
                position: absolute;
                background: transparent;
                border-color: black;
                border-radius: 0;
                box-shadow: none;
            }
        }
        .editor-grip-ne{
            cursor: nesw-resize;
            left: 100%;
            b{
                right: 50%;
                top: 50%;
                border-width: @bdw @bdw 0 0;
            }  
        }
        .editor-grip-nw{
            cursor: nwse-resize;
            b{
                left: 50%;
                top: 50%;
                border-width: @bdw 0 0 @bdw;
            }
        }
        .editor-grip-se{
            cursor: nwse-resize;
            left: 100%;
            top: 100%;
            b{
                right: 50%;
                bottom: 50%;
                border-width: 0 @bdw @bdw 0;
            }
        }
        .editor-grip-sw{
            cursor: nesw-resize;
            top: 100%;
            b{
                left: 50%;
                bottom: 50%;
                border-width: 0 0 @bdw @bdw;
            }       
        }
        .editor-grip-n{
            cursor:  ns-resize;
            left: 50%;
            b{
                left: 0;
                top: 50%;
                border-width: @bdw 0 0 0;
            }        
        }
        .editor-grip-e{
            cursor: ew-resize;
            top: 50%;
            left: 100%;
            b{
                top: 0;
                right: 50%;
                border-width: 0 @bdw 0 0;
            }
        }
        .editor-grip-s{
            cursor: ns-resize;
            left: 50%;
            top: 100%;
            b{
                left: 0;
                bottom: 50%;
                border-width: 0 0 @bdw 0;
            }
        }
        .editor-grip-w{
            cursor: ew-resize;
            top: 50%;
            left: 0;
            b{
                top: 0%;
                left: 50%;
                border-width: 0 0 0 @bdw;
            }
        }
    }

    &.octant0 .editor-grip-n{cursor: ns-resize}
    &.octant1 .editor-grip-n{cursor: nesw-resize}
    &.octant2 .editor-grip-n{cursor: ew-resize}
    &.octant3 .editor-grip-n{cursor: nwse-resize}
    &.octant4 .editor-grip-n{cursor: ns-resize}
    &.octant5 .editor-grip-n{cursor: nesw-resize}
    &.octant6 .editor-grip-n{cursor: ew-resize}
    &.octant7 .editor-grip-n{cursor: nwse-resize}

    &.octant0 .editor-grip-ne{cursor: nesw-resize}
    &.octant1 .editor-grip-ne{cursor: ew-resize}
    &.octant2 .editor-grip-ne{cursor: nwse-resize}
    &.octant3 .editor-grip-ne{cursor: ns-resize}
    &.octant4 .editor-grip-ne{cursor: nesw-resize}
    &.octant5 .editor-grip-ne{cursor: ew-resize}
    &.octant6 .editor-grip-ne{cursor: nwse-resize}
    &.octant7 .editor-grip-ne{cursor: ns-resize}

    &.octant0 .editor-grip-e{cursor: ew-resize}
    &.octant1 .editor-grip-e{cursor: nwse-resize}
    &.octant2 .editor-grip-e{cursor: ns-resize}
    &.octant3 .editor-grip-e{cursor: nesw-resize}
    &.octant4 .editor-grip-e{cursor: ew-resize}
    &.octant5 .editor-grip-e{cursor: nwse-resize}
    &.octant6 .editor-grip-e{cursor: ns-resize}
    &.octant7 .editor-grip-e{cursor: nesw-resize}

    &.octant0 .editor-grip-se{cursor: nwse-resize}
    &.octant1 .editor-grip-se{cursor: ns-resize}
    &.octant2 .editor-grip-se{cursor: nesw-resize}
    &.octant3 .editor-grip-se{cursor: ew-resize}
    &.octant4 .editor-grip-se{cursor: nwse-resize}
    &.octant5 .editor-grip-se{cursor: ns-resize}
    &.octant6 .editor-grip-se{cursor: nesw-resize}
    &.octant7 .editor-grip-se{cursor: ew-resize}

    &.octant0 .editor-grip-s{cursor: ns-resize}
    &.octant1 .editor-grip-s{cursor: nesw-resize}
    &.octant2 .editor-grip-s{cursor: ew-resize}
    &.octant3 .editor-grip-s{cursor: nwse-resize}
    &.octant4 .editor-grip-s{cursor: ns-resize}
    &.octant5 .editor-grip-s{cursor: nesw-resize}
    &.octant6 .editor-grip-s{cursor: ew-resize}
    &.octant7 .editor-grip-s{cursor: nwse-resize}

    &.octant0 .editor-grip-sw{cursor: nesw-resize}
    &.octant1 .editor-grip-sw{cursor: ew-resize}
    &.octant2 .editor-grip-sw{cursor: nwse-resize}
    &.octant3 .editor-grip-sw{cursor: ns-resize}
    &.octant4 .editor-grip-sw{cursor: nesw-resize}
    &.octant5 .editor-grip-sw{cursor: ew-resize}
    &.octant6 .editor-grip-sw{cursor: nwse-resize}
    &.octant7 .editor-grip-sw{cursor: ns-resize}

    &.octant0 .editor-grip-w{cursor: ew-resize}
    &.octant1 .editor-grip-w{cursor: nwse-resize}
    &.octant2 .editor-grip-w{cursor: ns-resize}
    &.octant3 .editor-grip-w{cursor: nesw-resize}
    &.octant4 .editor-grip-w{cursor: ew-resize}
    &.octant5 .editor-grip-w{cursor: nwse-resize}
    &.octant6 .editor-grip-w{cursor: ns-resize}
    &.octant7 .editor-grip-w{cursor: nesw-resize}

    &.octant0 .editor-grip-nw,
    &.octant8 .editor-grip-nw{cursor: nwse-resize}
    &.octant1 .editor-grip-nw{cursor: ns-resize}
    &.octant2 .editor-grip-nw{cursor: nesw-resize}
    &.octant3 .editor-grip-nw{cursor: ew-resize}
    &.octant4 .editor-grip-nw{cursor: nwse-resize}
    &.octant5 .editor-grip-nw{cursor: ns-resize}
    &.octant6 .editor-grip-nw{cursor: nesw-resize}
    &.octant7 .editor-grip-nw{cursor: ew-resize}

    &.octant0 .editor-rotator,
    &.octant8 .editor-rotator{cursor: url(../assets/cursor/ic_mouse_rotation_0.svg) 11 9, pointer;}
    &.octant1 .editor-rotator{cursor: url(../assets/cursor/ic_mouse_rotation_-45.svg) 11 11, pointer;}
    &.octant2 .editor-rotator{cursor: url(../assets/cursor/ic_mouse_rotation_-90.svg) 13 11, pointer;}
    &.octant3 .editor-rotator{cursor: url(../assets/cursor/ic_mouse_rotation_-135.svg) 11 11, pointer;}
    &.octant4 .editor-rotator{cursor: url(../assets/cursor/ic_mouse_rotation_180.svg) 11 13, pointer;}
    &.octant5 .editor-rotator{cursor: url(../assets/cursor/ic_mouse_rotation_135.svg) 11 11, pointer;}
    &.octant6 .editor-rotator{cursor: url(../assets/cursor/ic_mouse_rotation_90.svg) 9 11, pointer;}
    &.octant7 .editor-rotator{cursor: url(../assets/cursor/ic_mouse_rotation_45.svg) 11 11, pointer;}
}

.editor-transform-inner{
    cursor: move;
}
