.drag-hover {
    outline: 1px dashed cadetblue;
}

.dialog-graph-error {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    display: flex;
    justify-content: center;
    align-items: center;
}

.dialog-graph-error h1 {
    font-size: 30px;
    font-weight: bold;
}

.dialog-graph-error > div {
    text-align: center;
}

.dialog-graph-error button {
    margin: 20px 0;
}

.graph-background {
    min-width: 800px;
    height: 100%;
    overflow: auto;
    padding: 0 14px;

    position: relative;
}

.graph-controller {
    height: 40px;
    padding-top: 15px;

    display: flex;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.graph-controller > div {
    flex: 1;
}

.graph-controller > div:last-child {
    flex: 2;
}

.graph-controller > div form, .graph-zoom-controller {
    display: inline-block;
    vertical-align: middle;
}

.graph-controller > div > * {
    vertical-align: middle;
}

.graph-zoom-controller {
    margin-left: 0px;
}

.graph-zoom-controller > div {
    display: inline-table;
    border-radius: 0;
}

.graph-zoom-controller button {
    position: relative;
    display: inline-block;
    overflow: hidden;
    box-sizing: border-box;
    cursor: auto;
    border: 1px solid #e8e8e8;
    width: 35px;
    border-radius: inherit;
    background: #f8f8f8;
    height: 35px;

    margin: 2px 0;
}

.graph-zoom-controller .graph-zoom-in {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    border-right: none;

    cursor: pointer;
}

.graph-zoom-controller button:hover {
    background-color: #efefef;
}

.graph-zoom-controller button:focus {
    outline: 0;
}

.graph-zoom-in::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #7e7e7e;
    height: 40%;
    width: 2px;
}

.graph-zoom-in::after {
    content: '';
    position: absolute;
    transform: translate(-50%, -50%);
    height: 2px;
    width: 41%;
    background: #7e7e7e;
    top: 50%;
    left: 50%;
}

.graph-zoom-controller .graph-zoom-out {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;

    cursor: pointer;
}

.graph-zoom-controller .graph-zoom-out[disabled], .graph-zoom-controller .graph-zoom-in[disabled] {
    background-color: #ddd;
    cursor: default;
    user-select: none;
    color: #aaa;
}

.graph-zoom-out::after {
    content: '';
    position: absolute;
    transform: translate(-50%, -50%);
    height: 2px;
    width: 41%;
    background: #7e7e7e;
    top: 50%;
    left: 50%;
}

.graph-controller select {
    border-radius: 6px;
    border: 1px solid #d7d7d7;

    width: 100px;
    height: 35px;
    outline: 0;
}

.graph-controller .refresh {
    position: relative;
    display: inline-block;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid #e8e8e8;
    width: 35px;
    background: #f8f8f8;
    height: 35px;
    border-radius: 6px;

    margin: 0 10px;

    text-align: left;
}

.graph-controller .refresh img {
    padding-top: 4px;
    padding-left: 5px;
}

.graph-controller .graph-button {
    display: inline-block;

    width: 90px;
    height: 35px;
    text-align: center;
    cursor: pointer;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 4px;
    vertical-align: top;

    letter-spacing: 0.3px;

    border: 1px solid #ddd;

    margin: 2px 0;
}

.graph-controller .graph-button:hover {
    background-color: #efefef;
}

.graph-controller .save {
    border: 0;
    color: #fff;
    background: #038eda;
}

.graph-controller .save:hover {
    background: #0075b7;
}

.graph-controller .graph-button[disabled], .graph-controller .graph-button.disabled {
    background-color: #ddd;
    cursor: default;
    user-select: none;
    color: #aaa;
}

.graph-controller .graph-button[disabled]:hover, .graph-controller .graph-button.disabled:hover {
    background-color: #ddd;
}

.graph-body {
    position: absolute;
    top: 126px;
    left: 14px;
    right: 14px;
    bottom: 0;

    transition: right 0.5s;

    overflow: auto;

    padding: 0 20px;
    margin-bottom: 10px;
}

.graph-body.focused {
    outline: 1px dashed #ddd;
}

#graphDialogCanvas {
    position: relative;
    white-space: nowrap;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none;
    /* Non-prefixed version, currently
                                     supported by Chrome and Opera */

    display: inline-block;
}

#graphDialogCanvas svg {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    display: inline-block;

    z-index: -1;
}

.graph-dialog-item {
    position: relative;

    width: 200px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    margin-top: 20px;
    display: inline-block;
    margin-right: 14px;

    box-sizing: border-box;

    box-shadow: 0 1px 11px rgba(0, 0, 0, 0.1), 0 1px 11px rgba(0, 0, 0, 0.1);

    cursor: pointer;
}

.graph-dialog-children {
    display: inline-block;
    vertical-align: top;
}

.graph-dialog-item.selected {
    border-color: #bfe3f6;
}

.graph-dialog-item.test-selected {
    border: 2px solid #1f7abb;
}

.graph-dialog .arrow {
    position: absolute;
    top: 0;
    right: 3px;
    bottom: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.graph-dialog-header {
    white-space: normal;

    position: relative;
    background: #f8f8f8;
    border-bottom: 1px solid #d7d7d7;

    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.graph-dialog-item.selected .graph-dialog-header {
    background: #bfe3f6;
    border-bottom: 0;
}

.graph-dialog-header span {
    color: #7e7e7e;
    font-weight: 600;
    font-size: 13px;
    /*padding: 10px 45px 10px 20px;*/
    padding: 8px 45px 4px 20px;
    box-sizing: border-box;

    display: inline-block;

    width: 100%;

    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    word-wrap: normal !important;
}

.graph-dialog-item.selected .graph-dialog-header span {
    color: #038eda;
}

.graph-dialog-header .dialog-more {
    position: absolute;
    top: 0;
    right: 10px;
    bottom: 0;

    width: 24px;

    background-image: url(/modules/playchat/working-ground/dialog-graph/client/imgs/more-black.png);
    background-repeat: no-repeat;
    background-position: center center;

    opacity: 0.5;
}

.graph-dialog-header .dialog-more:hover {
    opacity: 1;
}

.graph-dialog-item.selected .graph-dialog-header .dialog-more {
    background-image: url(/modules/playchat/working-ground/dialog-graph/client/imgs/more-blue.png);
}

.graph-dialog-input {
    position: relative;
    height: 33px;
    /* text-align: center; */
    /* line-height: 43px; */
    line-height: 33px;
}

.graph-dialog-buttons {
    position: relative;
    line-height: 33px;
    overflow: auto;
}

.graph-dialog-buttons > div {
    padding: 5px 0;
}

.graph-dialog-buttons a {
    width: 91%;
    padding: 0 10px;
    display: inline-block;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    word-wrap: normal !important;
}

.graph-dialog-input, .graph-dialog-buttons span {
    font-size: 11px;
    /*color: #656565;*/
    font-weight: 100;
}

.graph-dialog-input {
    height: auto;
    max-height: 80px;
    overflow: hidden;
}

.graph-dialog-input {
    white-space: normal;
    border-bottom: 1px solid #d7d7d7;
    padding: 0 10px;
}

.graph-dialog-item.selected .graph-dialog-input {
    border-color: #b1dbf4;
}

.graph-dialog-input span, .graph-dialog-output span, .graph-dialog-output div {
    /*color: #656565;*/
    font-weight: 700;
    font-size: 13px;
}

.graph-dialog-output {
    position: relative;
    border-bottom: 1px solid #d7d7d7;
    min-height: 45px;
    max-height: 200px;
    cursor: pointer;
    /*text-align: center;*/

    /*padding: 10px;*/
    padding: 10px;

    white-space: normal;

    overflow: hidden;

    font-size: 12px;
}

.graph-dialog-image {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid #d7d7d7;
}

.graph-dialog-item.selected .graph-dialog-output {
    border-color: #b1dbf4;
}

.graph-fold {
    position: absolute;

    top: 0;
    /*right: -29px;*/
    right: -24px;
    z-index: 1000;

    width: 22px;
    height: 22px;
    cursor: pointer;
    text-align: center;
    border-radius: 100%;
    background: #d7d7d7 url(/modules/playchat/working-ground/dialog-graph/client/imgs/fold.png) no-repeat 80% 50%;

    -ms-transform: rotate(180deg); /* IE 9 */
    -webkit-transform: rotate(180deg); /* Chrome, Safari, Opera */
    transform: rotate(180deg);
}

.graph-dialog-item.selected .graph-fold {
    background-color: #038eda;
}

.graph-dialog .graph-fold:hover, .graph-dialog .graph-fold.folded {
    -ms-transform: rotate(0deg); /* IE 9 */
    -webkit-transform: rotate(0deg); /* Chrome, Safari, Opera */
    transform: rotate(0deg);
}

.graph-dialog .graph-fold:hover {
    background-color: #038eda;
}

.graph-body .plus {
    width: 200px;
    height: 36px;
    text-align: center;

    /*border: 1px solid #d7d7d7;*/
    border-radius: 6px;
    outline: 0;

    margin-top: 11px;
    margin-bottom: 10px;

    /*box-shadow: 0 1px 11px rgba(0, 0, 0, 0.1), 0 1px 11px rgba(0, 0, 0, 0.1);*/

    /*margin-left: -11px;*/
    /*margin-top: 20px;*/

    border: 1px dashed #97a7c0;

    color: #97a7c0;

    background-color: white;

    cursor: pointer;
}

.graph-body .plus:hover {
    background: #cedcf1;
}

.graph-body .plus::before {
    font-size: 24px;
    line-height: 34px;
    color: #7e7e7e;
}

.graph-body .plus.selected {
    background: white;
    border-color: #038eda;
}

.graph-body .plus.selected:hover {
    background: #00a6ff;
}

.dialog-menu {
    position: absolute;

    top: 0;
    left: 0;

    width: 150px;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ebebeb;
    box-shadow: 0 1px 11px rgba(0, 0, 0, 0.1), 0 1px 11px rgba(0, 0, 0, 0.1);

    background-color: white;

    z-index: 1000;
}

.dialog-menu .menu-title {
    color: #b5b5b5;
}

.dialog-menu > li {
}

.dialog-menu > li a {
    display: inline-block;
    width: 100%;
    height: 100%;

    padding: 5px;
    box-sizing: border-box;
    border-radius: 2px;

    cursor: pointer;
}

.dialog-menu > li:hover a {
    background-color: #038eda;

    color: white;
}

.dialog-menu > li[data-using=false] {
    color: gray;
}

.dialog-menu > li[data-using=false]:hover a {
    background-color: transparent;
    color: gray;
}

.dialog-menu > li:first-child {
    text-align: center;
}

.dialog-menu .dialog-menu-divider {
    height: 1px;
    background-color: #ebebeb;
    margin: 12px 0;
}

.graph-dialog-input-span {
    font-size: 12px;
}

.graph-dialog-input-span::before {
    /*content: attr(data-key);*/
    /*border-radius: 100%;*/
    /*font-size: 10px;*/
    /*padding: 1px 6px;*/
    /*color: #fff;*/
    /*background-color: #5cb85c;*/
    /*margin-right: 5px;*/
}

.tab {
    padding-top: 35px;
    border-bottom: 2px solid #768ea2;
    height: 47px;
    display: flex;
}

.tab-body {
    height: 100%;
    overflow: hidden;
    white-space: nowrap;

    position: relative;
    top: 2px;
}

.tab-body li {
    width: auto;
    margin: 0 5px 0 0;
}

.tab-body li, .prev-tab, .next-tab {
    display: inline-block;
    padding: 10px 24px 10px;
    background-color: #f5f5f5;
    border-radius: 6px 6px 0 0;
    border: 2px solid #ebebeb;
    border-bottom-color: transparent;
    color: #7e7e7e;
    position: relative;
    top: 2px;
    z-index: 10;
    cursor: pointer;
}

.prev-tab, .next-tab {
    height: 19px;
    top: 2px;
    border: 0;
    background-color: white;
    padding: 0 10px;
    margin: 0;
    position: relative;
    top: 17px;

    opacity: 0.5;
}

.prev-tab:hover, .next-tab:hover {
    opacity: 1;
}

.tab-body li.select_tab {
    background-color: white;
    border-color: #768ea2;
    border-bottom-color: white;
    color: #038eda;
    padding-top: 12px;
    margin: 0;
    top: 4px;
    margin-right: 4px;
}

.tab-body li:hover, .prev-tab:hover, .next-tab:hover {
    background-color: #fefefe;
}

.alert-success {
    display: none;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #d6e9c6;
    border-radius: 4px;
    color: #3c763d;
    background-color: #dff0d8;

    position: absolute;
    top: 120px;
    right: 15px;

    z-index: 1001;

    opacity: 0;

    transition: opacity 0.5s;

    box-shadow: 0 1px 11px rgba(0, 0, 0, 0.1), 0 1px 11px rgba(0, 0, 0, 0.1);
}

.alert-error {
    display: none;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ebccd1;
    border-radius: 4px;
    color: #a94442;
    background-color: #f2dede;

    position: absolute;
    top: 120px;
    right: 15px;

    z-index: 1001;

    opacity: 0;

    transition: opacity 0.5s;

    box-shadow: 0 1px 11px rgba(0, 0, 0, 0.1), 0 1px 11px rgba(0, 0, 0, 0.1);
}

.graph-dialog-line {
    height: 2px;
    background-color: #ddd;

    width: 200px;

    margin-bottom: 5px;

    position: absolute;
}

.dialog-graph-code-editor {
    position: absolute;
    left: 0;
    right: 5px;
    bottom: 0;
    top: 63px;
    z-index: 1001;

    display: none;
}

.dialog-graph-code-editor > div:first-child {
    width: 100%;
    height: 100%;
    background-color: white;
}

.dialog-graph-code-editor-controller {
    width: 100%;
    height: 54px;

    text-align: right;
    padding: 10px 20px;

    background-color: white;

    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.dialog-graph-code-editor-body {
    position: absolute;
    top: 55px;
    border-top: 1px solid #ddd;
    left: 0;
    right: 0;
    bottom: 0;
}

.CodeMirror {
    height: 100% !important;
}

.CodeMirror-code > div {
    font-size: 13px;
}

@media screen and (max-width: 1450px) {
    .graph-controller {
        height: 80px;
    }

    .graph-body {
        top: 160px;
    }
}
