
.orgchart-container {
    position: relative;
    display: inline-block;
    min-height: 420px;
    width: calc(100%);
    border: 1px dashed #aaa;
    border-radius: 5px;
    overflow: auto;
    text-align: center
}

.orgchart {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    display: inline-block;
    min-height: 202px;
    min-width: 202px;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
   /*
    background-image: -webkit-gradient(linear, left top, right top, color-stop(10%, rgba(200, 0, 0, .15)), color-stop(10%, transparent)), -webkit-gradient(linear, left top, left bottom, color-stop(10%, rgba(200, 0, 0, .15)), color-stop(10%, transparent));
    background-image: linear-gradient(90deg, rgba(200, 0, 0, .15) 10%, transparent 0), linear-gradient(rgba(200, 0, 0, .15) 10%, transparent 0);
    background-size: 10px 10px;
    */
    border: 1px dashed transparent;
    padding: 20px
}

.orgchart .hidden, .orgchart ~ .hidden {
    display: none
}

.orgchart.b2t {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg)
}

.orgchart.l2r {
    position: absolute;
    -webkit-transform: rotate(-90deg) rotateY(180deg);
    transform: rotate(-90deg) rotateY(180deg);
    -webkit-transform-origin: left top;
    transform-origin: left top
}

.orgchart .verticalNodes ul {
    list-style: none;
    margin: 0;
    padding-left: 18px;
    text-align: left
}

.orgchart .verticalNodes ul:first-child {
    margin-top: 2px
}

.orgchart .verticalNodes > td:before {
    content: "";
    border: 1px solid var(--main-color)
}

.orgchart .verticalNodes > td > ul > li:first-child:before {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    top: -4px;
    height: 30px;
    width: calc(50% - 2px);
    border-width: 2px 0 0 2px
}

.orgchart .verticalNodes ul > li {
    position: relative
}

.orgchart .verticalNodes ul > li:after, .orgchart .verticalNodes ul > li:before {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    content: "";
    position: absolute;
    left: -6px;
    border-color: var(--main-color);
    border-style: solid;
    border-width: 0 0 2px 2px
}

.orgchart .verticalNodes ul > li:before {
    top: -4px;
    height: 30px;
    width: 11px
}

.orgchart .verticalNodes ul > li:after {
    top: 1px;
    height: 100%
}

.orgchart .verticalNodes ul > li:first-child:after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    top: 24px;
    width: 11px;
    border-width: 2px 0 0 2px
}

.orgchart .verticalNodes ul > li:last-child:after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    border-width: 2px 0 0
}

.orgchart.r2l {
    position: absolute;
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
    -webkit-transform-origin: left top;
    transform-origin: left top
}

.orgchart > .spinner {
    font-size: 100px;
    margin-top: 30px;
    color: rgba(68, 157, 68, .8)
}

.orgchart table {
    border-spacing: 0;
    border-collapse: separate
}

.orgchart > table:first-child {
    margin: 20px auto
}

.orgchart td {
    text-align: center;
    vertical-align: top;
    padding: 0
}

.orgchart .lines:nth-child(3) td {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    height: 20px
}

.orgchart .lines .topLine {
    border-top: 2px solid var(--main-color);
}

.orgchart .lines .rightLine {
    border-right: 1px solid var(--main-color);
    float: none;
    border-radius: 0
}

.orgchart .lines .leftLine {
    border-left: 1px solid var(--main-color);
    float: none;
    border-radius: 0
}

.orgchart .lines .downLine {
    background-color: var(--main-color);
    margin: 0 auto;
    height: 20px;
    width: 2px;
    float: none
}

.orgchart .node {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    display: inline-block;
    position: relative;
    margin: 0;
    padding: 3px;
    border: 2px dashed transparent;
    text-align: center;
    max-width: 300px
}

.orgchart.l2r .node, .orgchart.r2l .node {
    width: 50px;
    height: 130px
}

.orgchart .node > .spinner {
    position: absolute;
    top: calc(50% - 15px);
    left: calc(50% - 15px);
    vertical-align: middle;
    font-size: 30px;
    color: rgba(68, 157, 68, .8)
}

/*
.orgchart .node:hover {
    -webkit-transition: .5s;
    transition: .5s;
    cursor: default;
    z-index: 20
}
.orgchart .node.focused, .orgchart .node:hover {
    background-color: rgba(238, 217, 54, .5)
}*/

.orgchart .ghost-node {
    position: fixed;
    left: -10000px;
    top: -10000px
}

.orgchart .ghost-node rect {
    fill: #fff;
    stroke: #bf0000
}

.orgchart .node.allowedDrop {
    border-color: rgba(68, 157, 68, .9)
}

.orgchart .node .title {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    height: 20px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background-color: var(--main-color);
    color: #fff;
    border-radius: 4px 4px 0 0
}

.orgchart.b2t .node .title {
    -webkit-transform: rotate(-180deg);
    transform: rotate(-180deg);
    -webkit-transform-origin: center bottom;
    transform-origin: center bottom
}

.orgchart.l2r .node .title {
    -webkit-transform: rotate(-90deg) translate(-40px, -40px) rotateY(180deg);
    transform: rotate(-90deg) translate(-40px, -40px) rotateY(180deg);
    -webkit-transform-origin: bottom center;
    transform-origin: bottom center;
    width: 120px
}

.orgchart.r2l .node .title {
    -webkit-transform: rotate(-90deg) translate(-40px, -40px);
    transform: rotate(-90deg) translate(-40px, -40px);
    -webkit-transform-origin: bottom center;
    transform-origin: bottom center;
    width: 120px
}

.orgchart .node .title .symbol {
    float: left;
    margin-top: 4px;
    margin-left: 2px
}

.orgchart .node .content {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    width: 100%;
    height: 20px;
    font-size: 11px;
    line-height: 18px;
    border: 1px solid var(--main-color);
    border-radius: 0 0 4px 4px;
    text-align: center;
    background-color: #fff;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.orgchart.b2t .node .content {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
    -webkit-transform-origin: center top;
    transform-origin: center top
}

.orgchart.l2r .node .content {
    -webkit-transform: rotate(-90deg) translate(-40px, -40px) rotateY(180deg);
    transform: rotate(-90deg) translate(-40px, -40px) rotateY(180deg);
    -webkit-transform-origin: top center;
    transform-origin: top center;
    width: 120px
}

.orgchart.r2l .node .content {
    -webkit-transform: rotate(-90deg) translate(-40px, -40px);
    transform: rotate(-90deg) translate(-40px, -40px);
    -webkit-transform-origin: top center;
    transform-origin: top center;
    width: 120px
}

.orgchart .node .edge {
    font-size: 15px;
    position: absolute;
    color: rgba(68, 157, 68, .5);
    cursor: default;
    -webkit-transition: .2s;
    transition: .2s
}

.orgchart.noncollapsable .node .edge {
    display: none
}

.orgchart .edge:hover {
    color: #449d44;
    cursor: pointer
}

.orgchart .node .verticalEdge {
    width: calc(100% - 10px);
    width: -moz-calc(100% - 10px);
    left: 5px
}

.orgchart .node .topEdge {
    top: -4px
}

.orgchart .node .bottomEdge {
    bottom: -4px
}

.orgchart .node .horizontalEdge {
    width: 15px;
    height: calc(100% - 10px);
    height: -moz-calc(100% - 10px);
    top: 5px
}

.orgchart .node .rightEdge {
    right: -4px
}

.orgchart .node .leftEdge {
    left: -4px
}

.orgchart .node .horizontalEdge:before {
    position: absolute;
    top: calc(50% - 7px)
}

.orgchart .node .rightEdge:before {
    right: 3px
}

.orgchart .node .leftEdge:before {
    left: 3px
}

.orgchart .node .toggleBtn {
    position: absolute;
    left: 5px;
    bottom: -2px;
    color: rgba(68, 157, 68, .6)
}

.orgchart .node .toggleBtn:hover {
    color: rgba(68, 157, 68, .8)
}

.oc-export-btn {
    display: inline-block;
    position: absolute;
    right: 5px;
    top: 5px;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: #fff;
    background-color: #5cb85c;
    border: 1px solid transparent;
    border-color: #4cae4c;
    border-radius: 4px
}

.oc-export-btn[disabled] {
    cursor: not-allowed;
    -webkit-box-shadow: none;
    box-shadow: none;
    opacity: .3
}

.oc-export-btn:active, .oc-export-btn:focus, .oc-export-btn:hover {
    background-color: #449d44;
    border-color: #347a34
}

.orgchart ~ .mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
    text-align: center;
    background-color: rgba(0, 0, 0, .3)
}

.orgchart ~ .mask .spinner {
    position: absolute;
    top: calc(50% - 54px);
    left: calc(50% - 54px);
    color: hsla(0, 0%, 100%, .8);
    font-size: 108px
}

.orgchart .node {
    -webkit-transition: opacity .3s, -webkit-transform .3s;
    transition: opacity .3s, -webkit-transform .3s;
    transition: transform .3s, opacity .3s;
    transition: transform .3s, opacity .3s, -webkit-transform .3s
}

.orgchart .slide-down {
    opacity: 0;
    -webkit-transform: translateY(40px);
    transform: translateY(40px)
}

.orgchart.l2r .node.slide-down, .orgchart.r2l .node.slide-down {
    -webkit-transform: translateY(130px);
    transform: translateY(130px)
}

.orgchart .slide-up {
    opacity: 0;
    -webkit-transform: translateY(-40px);
    transform: translateY(-40px)
}

.orgchart.l2r .node.slide-up, .orgchart.r2l .node.slide-up {
    -webkit-transform: translateY(-130px);
    transform: translateY(-130px)
}

.orgchart .slide-right {
    opacity: 0;
    -webkit-transform: translateX(130px);
    transform: translateX(130px)
}

.orgchart.l2r .node.slide-right, .orgchart.r2l .node.slide-right {
    -webkit-transform: translateX(40px);
    transform: translateX(40px)
}

.orgchart .slide-left {
    opacity: 0;
    -webkit-transform: translateX(-130px);
    transform: translateX(-130px)
}

.orgchart.l2r .node.slide-left, .orgchart.r2l .node.slide-left {
    -webkit-transform: translateX(-40px);
    transform: translateX(-40px)
}

/**
AGGIUNTE
 */

.orgchart-container {
    --main-color: rgba(79, 164, 217, 0.8);
    --font-color-inverse: white;
}

.orgchart-container.senza-contenitori {
    border: 0 !important;
    overflow: visible !important;
    background: white;
    width: auto !important;
}
.orgchart-container.senza-contenitori .orgchart table {
    background: white !important;
}

[data-type="equipment"] {
    --main-color: rgba(79, 164, 217, 0.8);
    --selected-color: rgba(9, 103, 162, 0.8);
    --area-color: rgba(79, 164, 217, 1);
    --riepilogo-area-color: #a6d1ec;
}
[data-type="natural"] {
    --main-color: rgb(27, 77, 0, 0.8);
    --selected-color: rgba(16, 40, 1, 0.8);
    --area-color: rgba(27, 77, 0, 1);
    --riepilogo-area-color: #8ca57f;
}
[data-type="ISAHP"] {
    --main-color: rgba(255, 166, 0, 0.86);
    --selected-color: rgba(110, 71, 0, 0.86);
    --area-color: rgba(255, 166, 0,  1);
    --riepilogo-area-color: #ffd27f;
}

.causa[data-type="area"] {
    /*
    background-color: var(--area-color);
    color: var(--font-color-inverse);
    */
}
.causa[data-type="cluster"] {
    /*
    background-color: var(--area-color);
    color: var(--font-color-inverse);
     */
}

.causa.implicitamente-selezionata {
    border: 0 !important;
    background-color: var(--area-color) !important;
    color: var(--font-color-inverse) !important;
}
.causa[data-pre-selected="1"], .causa[data-pre-selected="1"][data-selected="1"] {
    border: 4px solid #d2c100;
    background-color: #f5da47;
    color: #333;
}
.causa[data-selected="1"] {
    border: 4px solid var(--selected-color) !important;
    background-color: var(--area-color) !important;
    color: var(--font-color-inverse) !important;
}
.causa.hover:hover {
    border: 1px solid var(--selected-color);
    background: rgba(0,0,0,.1);
}

.riepilogo .riepilogo-box {
    border: 1px solid var(--selected-color) !important;
    background-color: var(--riepilogo-area-color) !important;
    color: var(--font-color-inverse) !important;
}
