@dark-background-color: #3f403f;
@dark-color: #b0b1aa;
@dark-border-color: #3f403f;
@light-border-color: #dcdbdb;
@light-background-color: #dcdbdb;
@light-color: #333333;
@link-color: #3399cc;

.keyframes(@name;
@arguments) {
    @-moz-keyframes @name {
        @arguments();
    }
    @-webkit-keyframes @name {
        @arguments();
    }
    @keyframes @name {
        @arguments();
    }
}

.animation(@arguments) {
    -webkit-animation: @arguments;
    -moz-animation: @arguments;
    animation: @arguments;
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: url('@{base-path}/fonts/open-sans-v15-latin-regular.woff2') format('woff2');
}

@text-color: #8F8F8F;
@smartface-blue: #3399CC;
@smartface-dark-blue: darken(@smartface-blue,
20%);
@smartface-light-blue: lighten(@smartface-blue,
20%);
@selected-focus-color: @smartface-blue;

@keyframes flash-animation {
    0%,
    50%,
    100% {
        opacity: 1;
    }
    25%,
    75% {
        opacity: 0;
    }
}

.ui-editor-toolbox {
    * {
        user-select: none;
    }
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    align-content: flex-start;
    flex-flow: wrap row;
    &:after {
        content: ' ';
        display: block;
        height: 15px;
        width: 100%;
        position: relative;
        bottom: 0;
    }
    div,
    span,
    a {
        user-select: none;
    }
}

.ui-editor-toolbox div {
    display: flex;
    flex-wrap: wrap;
    flex-grow: 1;
    justify-content: center;
}

.ui-editor-toolbox .toolboxItem {
    height: 93px;
    border-radius: 10px;
    margin-top: 5px;
    min-width: 50%;
    max-width: 50%;
    display: flex;
    padding: 5px 0px 5px 0px;
    justify-content: center;
    align-items: center;
    flex-flow: wrap row;
    flex-direction: column;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition-timing-function: cubic-bezier(0.175, 0.665, 0.320, 1), linear;
    cursor: default;
}

.ui-editor-toolbox .toolboxItem:active {
    opacity: 0.3;
}

.ui-editor-toolbox .toolboxItemIconContainer {
    align-items: center;
    height: 70%;
    fill: dimgray;

    svg {
        height: 70%;
        width: 70%;
    }

    &:hover {
        fill: #3399CC !important;
    }
}

.ui-editor-toolbox .toolboxItemTextContainer {
    top: -10%;
    position: relative;
    align-items: center;
    height: 30%;
    max-width: 100%;
}

.ui-editor-toolbox .toolboxItemText {
    font-family: Open Sans;
    font-size: 13px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: 2.69;
    text-align: left;
    color: @text-color;
    border-radius: 0px;
    cursor: default;
    text-overflow: ellipsis;
    overflow: hidden;
    display: block;
}

.ui-editor-toolbox .toolboxItemIcon {
    height: 90%;
    width: 90%;
    transition-property: all;
    transition-duration: 0.3s;
    transition-timing-function: cubic-bezier(0.175, 0.665, 0.320, 1), linear;
}

@keyframes drag-in {
    from {
        width: 60px;
        height: : 60px;
        margin-left: 0px;
    }
    to {
        width: 100px;
        height: 100px;
        margin-left: -16px;
    }
}

.toolboxItem {
    &.draggingComponent {
        transition: none;
        width: 100px;
        height: 100px;
        pointer-events: none;
        border-radius: 10px;
        margin-left: -16px;
        animation-timing-function: cubic-bezier(0.175, 0.665, 0.320, 1), linear;
        animation-duration: .3s;
        animation-name: drag-in;
        .toolboxItemIconContainer {
            margin: none !important;
            transition: none;
            width: 100px;
            height: 100px;
        }
    }
}

.draggingComponent when (@preferences-flat) {
    background-color: rgba(241, 241, 241, 0.5);
    .toolboxItemIconContainer {}
}

.draggingComponent when not (@preferences-flat) {
    background-color: rgba(241, 241, 241, 0.1);
    .toolboxItemIconContainer {}
}

.tippy-tooltip.smartface-theme {
    max-width: 375px;
    .tippy-content {
        font-size: 12px;
        & when (@preferences-flat) {
            color: @light-color;
        }

        & when not (@preferences-flat) {
            color: @dark-color;
        }
        white-space: pre-line;
        padding: 8px;
    }
    .tippy-backdrop {
        & when (@preferences-flat) {
            background: @light-background-color;
        }
        & when not (@preferences-flat) {
            background: @dark-background-color;
        }
    }
    .tippy-popper {
        margin-top: 25px;
    }
    .tippy-roundarrow {
        & when (@preferences-flat) {
            fill: @light-background-color;
        }
        & when not (@preferences-flat) {
            fill: @dark-background-color;
        }
    }
    text-align: left;
    border-radius: 6px;
    a {
        color: @link-color;
        opacity: 0.8;
        &:hover {
            opacity: 1;
        }
    }
    & when (@preferences-flat) {
        background: @light-background-color;
        border: 1px solid @light-border-color;
        box-shadow: 1px 1px 6px 0 rgba(0, 0, 0, 0.1);
    }
    & when not (@preferences-flat) {
        background: @dark-background-color;
        border: 1px solid @dark-border-color;
        border-radius: 6px;
        box-shadow: 1px 1px 6px 0 rgba(0, 0, 0, 0.3);
    }
}
