.fault-tree-container {
    position: fixed;
    width: 100%;
    height: 100%;
}

.fault-tree-node {
    width: 100%;
    height: 100%;
    padding: 5px;
    border-radius: 10px;
}

.selected-node {
    box-shadow: 0px 0px 15px red;
}

.fault-tree-node-title-block {
    border: solid red 2px;
    border-radius: 10px;
    position: relative;
    min-width: 100px;
    min-height: 50px;
}

.fault-tree-node-title {
    margin: 10px;
}

.fault-tree-node-title-block.mcs-node {
    background: #F764645C;
}

.fault-tree-node-title-code {
    margin: 0 10px 0 10px;
    max-width: 220px;
    max-height: 55px;
    overflow: hidden;
}

.fault-tree-node-icon-wrapper {
    position: absolute;
    left: 0;
    width: 100%; 
    display: flex;
    justify-content: center; 
    align-items: center; 
}

.fault-tree-node-icon {
    text-align: center;
    position: relative;
}

.fault-tree-node-icon-label {
    position: absolute;
    left: calc(50% + 40px); 
    padding: 4px 8px;
    white-space: nowrap;
}

.fault-tree-node-icon-label.empty {
    display: flex;
    top: 15px;
}

.fault-tree-node-transfer-label {
    position: absolute;
    margin-top: 50px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
}

.fault-tree-container .diagram-port {
    position: absolute;
    display: block;
    width: 15px;
    height: 15px;
    left: 50%;
    background: black;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.fault-tree-container .diagram-port.top {
    top: 0;
}

.fault-tree-container .diagram-port.bottom {
    top: 100%;
}

.diagram-node-description {
    position: absolute;
    font-size: 0.8em;
    top: 120px;
    left: 5px;
    width: max-content;
    max-width: 90px;
}

.diagram-node-description-text {
    max-height: 55px;
    overflow: hidden;
}

.diagram-node-tooltip {
    display: block;
    max-width: 350px;
    word-wrap: break-word;
}

.fault-tree-comment-node {
    padding: 5px;
    border: solid red 2px;
    border-radius: 10px;
    background: var(--background);
    width: var(--width);
    height: var(--height);
}

.fault-tree-comment-node-text-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fault-tree-comment-node-text {
    font-size: var(--font-size);
    font-weight: var(--font-weight);
    font-style: var(--font-style);
    color: var(--font-color);
    white-space: pre-line;
}

.rbd-diagram-container {
    width: calc(100% - 20rem);
    height: 87.4%;
    position: fixed;
    display: inline;
}

.diagram-node-tooltip {
    max-width: 500px;
    max-height: 500px;
    margin: 10px 0;
}

.mud-popover-cascading-value {
    max-width: 500px !important;
    max-height: 500px !important;
}

.rbd-node {
    max-width: 300px;    
    max-height: 150px;
    width: 300px;
    height: 150px;
    padding: 5px;
    border-radius: 10px;
}
.nested-rbd-node {
    box-shadow: 7px 7px 7px red;
}
.rbd-node.selected-node {
    box-shadow: 0px 0px 15px red;
    width: 300px;
    height: 150px;
}
.rbd-node-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 290px;
    max-width: 290px;
    height: 140px;
    max-height: 140px;
    border: solid red 2px; 
    border-radius: 10px;
}
.rbd-node-block-title {
    height: 73px;
    overflow: hidden;
    margin: 5px 10px 0 10px; 
    text-align: center; 
    font-weight: 600;
    color: #FF6157;
}
.rbd-node-block-content {
    margin: 0 10px 10px 10px; 
}

/* System nodes classes */
.rbd-start-end-node {
    width: 40px;
    height: 40px;
    background-color: #070707;
    border-radius: 50%;
    margin-top: 15px;
}
.rbd-start-end-node.selected-special-node {
    box-shadow: 0px 0px 15px red;
    /*width: 300px;*/
    /*height: 150px;*/
}
.rbd-connector-node {
    width: 35px;
    height: 25px;
    background-color: #070707;
    border-radius: 0;
    margin-top: 10px;
}
.rbd-connector-node.selected-special-node {
    box-shadow: 0px 0px 15px red;
    /*width: 300px;*/
    /*height: 150px;*/
}

.rbd-show-elements-text {
    /*font-style: italic;*/
    color: #FF6157;
    font-size: small;
}
.rbd-show-elements-text:hover {
    text-decoration: underline;
}
.rbd-show-elements-tooltip {
    text-align: left;
    width: 300px;
    max-width: 300px;
    height: auto;
    /*max-height: 300px;*/
}

.rbd-diagram-container .diagram-port {
    position: absolute;    
    width: 15px;
    height: 15px;
    background: black;
    border-radius: 50%;    
}

.rbd-diagram-container .diagram-port.left {
    top: 45%;
    left: 0 !important;
}

.rbd-diagram-container .diagram-port.right {
    top: 45%;
    right: 0 !important;
}

.rbd-node-edit .mud-grid-item {
    padding-top: 5px !important;
    margin-bottom: 5px !important;
}

.rbd-block-k-n-list {
    border: solid 1px; 
    border-radius: 10px; 
    width: 100%; 
    margin: 0 0 5px 0; 
    border-color: rgb(51 51 51 / 31%) !important;
}

.rz-datalist-data {
    list-style-type: none;
    margin-left: 20px;
    margin-bottom: 30px;
}

.resize-handles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none; /* чтобы ручки были поверх содержимого, но не мешали кликам */
}

.resize-handle {
    position: absolute;
    background-color: #3f51b5;
    border: 1px solid white;
    pointer-events: auto;
}

.resize-handle.top-left {
    top: -5px;
    left: -5px;
    width: 10px;
    height: 10px;
    cursor: nw-resize;
}

.resize-handle.top {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    cursor: n-resize;
}

.resize-handle.top-right {
    top: -5px;
    right: -5px;
    width: 10px;
    height: 10px;
    cursor: ne-resize;
}

.resize-handle.left {
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    cursor: w-resize;
}

.resize-handle.right {
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    cursor: e-resize;
}

.resize-handle.bottom-left {
    bottom: -5px;
    left: -5px;
    width: 10px;
    height: 10px;
    cursor: sw-resize;
}

.resize-handle.bottom {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    cursor: s-resize;
}

.resize-handle.bottom-right {
    bottom: -5px;
    right: -5px;
    width: 10px;
    height: 10px;
    cursor: se-resize;
}