/**
* DevExtreme (widgets/common/diagram.less)
* Version: 19.2.7 (build 20126-0327)
* Build date: Tue May 05 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
@import (once) "./drawer.less";
@import (once) "./loadIndicator.less";
@import (once) "./tooltip.less";
@import (once) "./accordion.less";
@import (once) "./scrollView.less";
@import (once) "./form.less";
@import (once) "./toolbar.less";
@import (once) "./contextMenu.less";
@import (once) "./fileUploader.less";
@import (once) "./popup.less";

@TRANSPARENT_BORDER: 1px solid transparent;

.dx-diagram {
    border: @TRANSPARENT_BORDER;
    display: flex;
    flex-flow: column;
    height: 400px;

    .dx-diagram-toolbar-wrapper {
        padding: 5px;
        flex-grow: 0;
    }

    .dx-diagram-content-wrapper {
        display: flex;
        flex-grow: 1;
        flex-basis: 0;
        overflow: hidden;
    }

    .dx-diagram-left-panel {
        flex: 240px 0 0;
        overflow-y: auto;
        position: relative;
        border-right: @TRANSPARENT_BORDER;
    }

    .dx-diagram-left-panel > * {
        position: absolute;
    }

    .dx-diagram-left-panel > .dx-scrollview {
        width: 100%;
    }

    .dx-diagram-drawer-wrapper {
        flex: 1 0;
        overflow: hidden;
        flex-basis: 0;
    }

    .dx-diagram-content {
        height: 100%;
    }

    .dx-diagram-right-panel {
        border-left: @TRANSPARENT_BORDER;
    }

    .dx-diagram-right-panel .dx-scrollview {
        width: 280px;
    }

    .dx-diagram-right-panel .dx-accordion {
        width: 100%;
    }

    .dx-diagram-toolbar-separator {
        height: 100%;
        border-left: @TRANSPARENT_BORDER;
    }

    .dx-diagram-toolbar-menu-separator {
        width: 100%;
        border-top: @TRANSPARENT_BORDER;

        &::before {
            content: none;
        }
    }

    &.dx-diagram-fullscreen {
        left: 0;
        top: 0;
        width: 100% !important; // stylelint-disable-line declaration-no-important
        height: 100% !important; // stylelint-disable-line declaration-no-important
        position: fixed;
        z-index: 2;
    }

    .dxdi-canvas { // stylelint-disable-line selector-class-pattern
        overflow: hidden;
    }
}

.dx-diagram-toolbar,
.dx-dropdownmenu-popup {
    .dx-diagram-select-b,
    .dx-diagram-color-b {
        .dx-texteditor {
            width: auto;
        }

        .dx-dropdowneditor-field-template-wrapper {
            display: flex;
            align-items: center;

            .dx-diagram-i {
                display: block;
            }

            .dx-textbox {
                width: 0;

                .dx-texteditor-input {
                    width: 0;
                    padding-left: 0;
                }
            }
        }
    }
}

.dx-diagram-i {
    background-repeat: no-repeat;
    background-position: 0 0;
    display: inline-block;
}

.dx-diagram-loading-indicator {
    position: absolute;
    top: calc(50% - 32px);
    left: calc(50% - 32px);
    width: 64px;
    height: 64px;
}

.dx-diagram-touchbar.dx-context-menu {
    .dx-menu-items-container {
        display: block;
        height: 100%;
        padding: 0;
    }

    .dx-menu-items-container::after {
        display: block;
        content: "";
        clear: both;
    }

    .dx-menu-items-container > li {
        display: block;
        float: left;
    }

    .dx-menu-item.dx-menu-item-has-text.dx-menu-item-has-icon .dx-menu-item-content .dx-icon {
        margin: 0;
    }

    .dx-menu-item .dx-menu-item-content .dx-menu-item-text {
        display: none;
    }
}

.dx-diagram-touchbar-target {
    position: absolute;
    background-color: transparent;
    pointer-events: none;
}
