.umb-editors {
    .absolute();
    overflow: hidden;
    z-index: 7500;

    .umb-editor {
        box-shadow: 0px 0 30px 0 rgba(0,0,0,.3);
        position: fixed;
    }
}

.umb-editor {
    .absolute();
    background: @brownGrayLight;
    z-index: @zIndexEditor;
    max-width: 100%;

    &--infiniteMode {
        transform: none;
        will-change: transform;
        transition: transform 400ms ease-in-out;

        &.umb-editor--moveRight {
            transform: translateX(110%);
        }
    }

    &--outOfRange {
        transform: none;
        display: none;
        will-change: auto;
        transition: display 0s 320ms;
    }

    &--level0 {
        transform: none;
    }

    &--small .umb-property {
        .control-header {
            float: none;
            width: 100%;
        }

        .controls {
            margin-left: 0;
        }
    }
}

// use a loop to build the editor levels
@iterations: 3;
@step: 60px;

.level-loop (@i) when (@i > 0) {
    @x: (@i * @step);
    .umb-editor--level@{i} {
        transform: translateX(@x);
    }

    .umb-editor--n@{i} {
        right:@x;
    }

    .level-loop((@i - 1));
}

.level-loop(@iterations);

// and also use a loop to build editor sizes - easily extended with new sizes by adding to the map
@editorSizes:
    small 500px,
    medium 800px,
    large 1600px;

.create-editor-sizes(@iterator:1) when(@iterator <= length(@editorSizes)) {
    .umb-editor {
        @size: extract(extract(@editorSizes, @iterator), 1);
        @value: extract(extract(@editorSizes, @iterator), 2);

        &--@{size} {
            width: @value;
            will-change: transform;
            left: auto;

            .umb-editor--container {
                max-width: @value;
            }
        }
    }

    .create-editor-sizes((@iterator + 1));
}

.create-editor-sizes();

.umb-editor--large {
    max-width: 1600px;
    width: calc(100% - 50px);
}

.umb-editor__overlay {
    .absolute();
    background: rgba(0,0,0,0.4);
    z-index: @zIndexEditor;
    visibility: hidden;
    opacity: 0;
    transition: opacity 320ms 20ms, visibility 0s 400ms;
}

#contentcolumn > .umb-editor__overlay,
.umb-editor--notInFront .umb-editor__overlay {
    visibility: visible;
    opacity: 1;
    transition: opacity 320ms 20ms, visibility 0s;
}

.umb-editor--trashed-message {
    background:@errorBackground;
    color:@errorText;
    padding:10px;
    margin-bottom:20px;

    i {
        margin-right:5px;
     }
}
