.top-buttons {
    position: absolute;
    top: 5px;
    left: 5px;
    height: 30px;
    background-color: white;
    padding: 5px;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.5);

    &.right {
        right: 20px;
        left: auto;
        padding: 0;
        
        button {
            padding: 2px;
            padding-bottom: 0;
            background: white;
            box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.5);

            img {
                filter: invert(100%);
                height: 35px;
                
            }
        }
    }

    .flip-hor {
        transform: scale(-1, 1);
    }

    .flip-ver {
        transform: scale(1, -1);
    }

    .rotate90 {
        transform: rotate(90deg);
    }

    .rotate-90 {
        transform: rotate(-90deg);
    }

    .toolbox-button {
        border: none;
        width: 30px;
        height: 30px;
        padding: 5px;
        cursor: pointer;

        &:disabled {
            opacity: 0.2;
        }

        &:hover {
            background: rgb(233, 232, 232);
        }

        &.active {
            background-color: #d7d7d7;
            cursor: default;
        }

        &.hidden {
            display: none;
        }

        &:focus {
            padding: 5px;
        }

        img {
            height: 20px;
            width: 20px;
            filter: invert(100%);
        }

        &.right {
            position: absolute;
            right: 8px;
            top: 3px;
        }

        &.separated {
            border-right: 1px solid black;
        }
    }
}

.picker-container {
    position: relative;
    outline: none;
    cursor: pointer;
    width: 57%;
    height: 30px;
    background: #fff;
    border-radius: 1px;
    box-shadow: 0 0 0 1px white;
    display: inline-block;
    vertical-align: middle;

    .swatch {
        border-radius: 1px;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
        display: inline-block;
        cursor: pointer;
        width: 100%;
        height: 100%;

        &.unknown {
            &:before {
                content: "?";
                position: absolute;
                color: darkred;
                font-weight: bold;
                font-size: 25px;
                margin-left: 15px;
            }
        }
    }

    .default {
        opacity: 0.4;
    }

    .picker-dropdown {
        &.visible {
            display: block;
        }

        display: none;
        border-radius: 3px;
        position: absolute;
        background-color: white;
        z-index: 2;
        padding: 5px;
        margin-top: 4px;
        box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        overflow-x: hidden;
        right: -10%;
        width: 87px;

        .colors-container {
            .color-input {
                width: 70px;
                margin: 1px;
                vertical-align: top;
                padding: 4px;
                font-size: 11px;
            }

            padding: 2px;
            overflow-y: hidden;
            overflow-x: hidden;

            > div {
                border: 1px solid transparent;
                display: inline-block;
                width: 35px;
                height: 35px;
                margin-left: 2px;
                margin-right: 2px;
                text-align: center;

                &.empty {
                    border: 1px solid red;
                }

                &.current {
                    box-shadow: 0 0 0 2px black;
                    opacity: 0.9;
                }
            }
        }
    }
}

.drawing-toolbox {
    position: absolute;
    top: 95px;
    left: 5px;
    width: 60px;
    padding: 5px;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.5);
    background-color: #fff;
    bottom: 20px;
    overflow-y: scroll;

    .upload {
        cursor: pointer;
    }

    .separator {
        height: 1px;
        background-color: black;
        margin-bottom: 2px;
        margin-top: 2px;
    }

    .item {
        
        cursor: pointer;

        .draggable {
            cursor: move;
            width: 50px;
            height: 48px;
        }

        .svg-button {
            width: 40px;
            height: 40px;
            display: inline-block;
           
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        height: 40px;
        padding: 3px;
        position: relative;

        &.current {
            background-color: #cccccc;
        }
    }
}
.edit-text-component {


    &.container {
        position: absolute;
        top: 50px;
        right: 260px;
        width: 220px;
        background-color: white;
        padding: 5px;
        box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.5);
    }

    .fonts-row {
        margin-bottom: 3px;

        select {
            padding: 5px;
            width: 83%;
        }

        .toolbox-button {
            background-color: transparent;
            border: none;
            width: 30px;
            height: 30px;
            padding: 5px;
            cursor: pointer;
            vertical-align: middle;

            img {
                height: 20px;
                width: 20px;
                filter: invert(100%);
            }
        }
    }

    .setting-row {

        margin-bottom: 3px;

        .booth-text {
            width: 64%;
        }

        .booth-font-size {
            width: 46px;
        }
    }
}
.grid-toolbox {

    background-color: white;
    position: absolute;
    bottom: 22px;
    right: 25px;
    width: 180px;
    padding: 5px;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.5);

    .switch-container{
        font-size: 11px;
    }

    .gs {
        display: inline-block;
        width: 12%;
        text-align: center;
        text-decoration: underline;
        cursor: pointer;
        font-size: 12px;
        margin-bottom: 5px;

        &.active {
            cursor: default;
            font-weight: bold;
            text-decoration: none;
        }
    }
}
.groupbutton-header {
    padding-right: 2px;

    &:hover {
        background-color: #ebebeb;
    }
}

.groupbutton-container,
.groupbutton-header {
    display: inline-block;

    .badge {
        display: inline-block;
        margin-left: -4px;
        vertical-align: super;
    }

    &.disabled {
        .badge {
            opacity: 0.2;
        }
    }
}

.groupbutton-container {
    border-right: 1px solid #000;

    &:not(.disabled) {
        &:hover {
            .groupbutton-list {
                display: block;
            }
        }
    }
}

.groupbutton-item {
    padding: 3px;
}


.groupbutton-list {
    position: absolute;
    z-index: 100;
    display: none;
    background-color: #f5f5f5;

    &.visible {
        display: initial;
    }
}
.layers-container {
    position: absolute;
    top: 50px;
    left: 5px;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.5);
    background-color: white;
    padding: 11px;
    padding-left: 10px;
    padding-right: 10px;
    width: 240px;
    z-index: 1;

    .layers-header {
        font-weight: bold;
        cursor: pointer;
    }

    .layers {

        margin-top: 3px;
        padding-top: 5px;
        border-top: 1px solid rgb(223, 221, 221);

        .layer {

            .layer-icon {
                width: 20px;
                height: 20px;
                display: inline-block;
                padding: 3px;
                padding-left: 5px;
                cursor: pointer;
                opacity: 0.2;
                fill: gray;

                &.active {
                    opacity: 1;
                }
            }

            .layer-name {
                vertical-align: super;
                padding-left: 10px;
            }
        }
    }


}
.modal {
    &:before {
        content: "";
        display: none;
        background: rgba(0, 0, 0, 0.6);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 15;
    }

    &.opened:before {
        display: block;
        z-index: 2000000000;
    }

    .modal-footer,
    .modal-header {
        line-height: 40px;
        z-index: 2;
    }

    .modal-body {
        flex: 0 1 100%;
        overflow: auto;
        user-select: text;
    }

    .modal-container {
        transform: translateY(-50%);
        top: 45%;
        font-size: 25px;
        line-height: 35px;
        position: absolute;
        text-align: center;
        width: calc(100% - 20px);
        padding: 10px;

        h4 {
            padding: 2px;
            margin: 2px;
        }

        ul {
            margin-top: 2px;
        }
    }

    .modal-header {
        background-color: #f2f2f2;
        color: #969696;
        font-size: 20px;

        .sub-header {
            font-size: 14px;
            line-height: 20px;
            color: #444;
            padding: 5px;
        }

        > div {
            padding-left: 10px !important;
        }
    }

    .modal-footer {
        text-align: right;

        .modal-button {
            color: #fff;
            padding: 6px 12px;
            border: 1px solid transparent;
            margin: 5px;
            cursor: pointer;
            font-weight: bold;

            &.ok-button {
                background-color: #428bca;
            }

            &.cancel-button {
                background-color: #d24836;
            }
        }
    }
}

.opened {
    .modal-dialog {
        z-index: 2000000001;
        transform: translate(0, 0);
        top: 20%;
    }
}

.modal-dialog {
    background: #fefefe;
    border: #333333 solid 0px;
    position: fixed;
    left: 25%;
    top: -100%;
    z-index: 16;
    width: 50%;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    transform: translate(0, -25%);
    transition: transform 0.3s ease-out;
    height: 50%;
    display: flex;
    flex-direction: column;

    &.mini {
        height: 30%;
    }
}

.style-editor {

    &.container {
        position: absolute;
        top: 50px;
        right: 25px;
        padding: 5px;
        box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.5);
        width: 220px;
        background-color: #fff;
    }

    &.body {
        text-align: left;
        margin-top: 5px;
        vertical-align: super;

    }

    table {
        width: 100%;

        /* font-size: 13px;*/
        tr>:first-child {
            width: 60%;
        }

        tr>:last-child {
            position: relative;
        }

        img {
            position: absolute;
            right: 2px;
            width: 20px;
            top: 6px;
            cursor: pointer;
        }
    }

    input {
        width: 42%;
        padding: 5px;
        font-size: inherit;
    }

    select {
        width: 100%;
        padding: 5px;
    }
}
.editor-container {
    min-height: 100%;
    height: 100%;


    .quill {
        height: 100%;
        position: relative;

        .ql-toolbar {
            position: absolute;
            width: 100%;
            z-index: 100;
        }

        .ql-container {
            min-height: 100%;
            padding-top: 40px;
        }

        .ql-flip {
            left: 5px !important;
            z-index: 101;;
        }
    }
}
.scroll-container {
    position: absolute;
    overflow-y: visible;
    background-color: transparent;
    overflow-x: auto;
    z-index: 1999999999 !important;

    &.right {
        width: 19px;
        right: 0px;
        top: 0;
        bottom: 20px;
    }

    &.bottom {
        height: 19px;
        left: 0px;
        right: 20px;
        bottom: 0px;
    }

    .scroller {

        &.right {
            width: 100%;
            height: 5000%;
        }

        &.bottom {
            width: 5000%;
            height: 100%;
        }
    }
}
.setting-header {
    margin: 0;
    font-weight: 400;
    font-size: 16px;
    text-align: center;
    border-bottom: 1px solid #f4eded;
    margin-bottom: 3px;

    .toolbox-button .right {
        position: absolute;
        right: 0;
        top: -2px;
    }
}

.svg-editor-container {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;

    .svg-element {
        outline: none;

        width: 100%;
        height: 100%;

        .selection,
        .highlight {
            fill: black;
            fill-opacity: 0.1;
            stroke-width: 0;
        }

        .highlight {
            fill-opacity: 0.7;
        }

        .size-tooltip {
            stroke-width: 0;
            fill: black;
            fill-opacity: 1;
        }

        .select-box {
            &-rectangle {
                fill-opacity: 0;
                fill: none;

                stroke: black;
            }

            &-rotate-cap {
                fill-opacity: 1;
                fill: #fb254e;
                stroke-width: 0px;
                cursor: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFAAAA////pdmf3QAAAAJ0Uk5T/wDltzBKAAAAUElEQVR42uSTQQoAIAgEp/9/OoKgCFcTb7WnpAF1t2iBeA9gSAPz7kBwT3uB6Is5LHkAyeeA5QO1FrBZSmS5WBNcJy8S8NIsvIdv/oWlLsAAwjEDwzEB/csAAAAASUVORK5CYII=")
                        15 15,
                    auto;
            }

            &-scale-cap {
                fill-opacity: 1;
                fill: black;
                stroke-width: 0px;

                &.nwse {
                    cursor: nwse-resize;
                }

                &.nesw {
                    cursor: nesw-resize;
                }

                &.ns {
                    cursor: ns-resize;
                }

                &.w {
                    cursor: w-resize;
                }
            }
        }

        .clone-booth-add-new {
            fill-opacity: 1;
            fill: white;
            cursor: pointer;
            opacity: 0.1;

            &:hover {
                opacity: 0.8;
            }
        }

        .select-control-point {
            cursor: move;
            fill: #f08409;
            stroke-width: 0px;

            &.start {
                fill: orangered;
            }

            &.bezier {
                fill: blue;
            }
        }

        &.transformation {
            .select-control-point,
            .select-box-rectangle,
            .select-box-rotate-cap,
            .select-box-scale-cap,
            .booths-data-group {
                opacity: 0;
            }
        }

        [data-tagname="line"] {
            stroke-linecap: round !important;
        }

        [data-temp="1"] {
            opacity: 0.1 !important;
        }

        [data-type="selection-wrapper"] {
            opacity: 0.8;

            &:not([stroke-width]) {
                stroke-width: 0.2px !important;
                stroke: #29b6f2 !important;
            }

            &[data-tagname="ptext"] {
                stroke-width: 0.2 !important;
            }
        }
    }
}

.toolbox-label {
    text-align: left;
    margin-bottom: 2px;
    display: block;
    font-size: 12px;
    font-weight: bold;
    position: relative;
}

#toast-container {

    position: absolute;
    z-index: 1;
    left: 120px;
    bottom: 15px;

    .toast-item {
        opacity: 0;     
        background-color: #2dc268;
        color: #fff;
        padding: 10px;
        box-shadow: 0px 5px 6px 2px rgba(0, 0, 0, 0.5);
        font-size: 18px;
        margin: 5px;

        &.show {
            opacity: 1;
            animation: fadein 1.0s;

            &.error {
                background-color: #e5175c;
            }
        }        
    }
}
.switch-container {
    display: inline-block;
    height: 16px;
    line-height: 16px;
    font-size: 14px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    vertical-align: sub;
    margin: 0;

    &.mini {
        width: 30px;
        height: 15px;
        vertical-align: bottom;
    }
}

/* Hide default HTML checkbox */

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-label {
    margin-left: 5px;
    margin-right: 5px;
    display: inline-block;    
}


/* The slider */

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;

    &:before {
        position: absolute;
        content: "";
        height: 14px;
        width: 14px;
        left: 4px;
        bottom: 3px;
        background-color: white;
        -webkit-transition: .4s;
        transition: .4s;
    }

    &.mini:before {
        height: 7px;
        width: 7px;
        left: 3px;
        bottom: 4px;
    }
}


input:checked+.slider {
    background-color: #007bff;
}

input:focus+.slider {
    box-shadow: 0 0 1px #007bff;
}

input:checked+.slider:before {
    transform: translateX(17px);
}

/* Rounded sliders */

.slider.round {
    border-radius: 10px;
}

.slider.round:before {
    border-radius: 50%;
}
.zoom {

    position: absolute;
    width: 40px;
    height: 40px;
    background-color: #fff;
    left: 80px;
    text-align: center;
    color: #777;
    cursor: pointer;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.5);
    font-size: 30px;

    &:hover {
        color: black
    }

    &.zoom-in {
        bottom: 64px;

        &::before {
            content: "\002B";
        }
    }

    &.zoom-out {
        bottom: 20px;

        &::before {
            content: "\002D";
        }
    }
}