html {
    text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

body {
    overflow: hidden;
    margin: 0;
    width: 100vw;
    height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'Ubuntu', 'Droid Sans',
        sans-serif, 'PingFang SC';
    font-size: 12px;
    text-rendering: geometricPrecision;
}

.graph {
    overflow: auto;
    width: 100%;
    height: 100%;
}

.canvas {
    display: block;
    position: absolute;
    text-rendering: geometricPrecision;
    user-select: none;
    cursor: grab;
}

path {
    stroke: #666;
    stroke-width: 1px;
    fill: none;
}

line {
    stroke: #666;
    stroke-width: 1px;
    fill: #666;
}

text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif, "PingFang SC";
    font-size: 11px;
    text-rendering: geometricPrecision;
    fill: #000;
}

.node-item {
    path {
        fill: #fff;
        fill-opacity: 1;
        stroke: none;
        transition: fill 0.075s ease-in, fill-opacity 0.075s ease-in;
    }

    text {
        transition: fill 0.075s ease-in;
    }

    &:hover {
        path {
            fill: #2932E1;
            fill-opacity: 1;
        }

        text {
            fill: #fff;
        }
    }
}

.node-item-function path {
    fill: #9BB9E8;
    fill-opacity: 0.7;
}

.node-item-type {
    cursor: pointer;

    path {
        fill: #8BB8FF;
        fill-opacity: 0.9;
    }
}

.node-item-type-constant path {
    fill: #B4CCB7;
}

.node-item-type-control path {
    fill: #A8E9B8;
}

.node-item-type-layer path {
    fill: #DB989A;
    fill-opacity: 0.7;
}

.node-item-type-wrapper path {
    fill: #6DCDE4;
    fill-opacity: 0.7;
}

.node-item-type-activation path {
    fill: #93C2CA;
    fill-opacity: 0.7;
}

.node-item-type-pool path {
    fill: #DE7CCE;
    fill-opacity: 0.7;
}

.node-item-type-normalization path {
    fill: #DA96BC;
    fill-opacity: 0.7;
}

.node-item-type-dropout path {
    fill: #309E51;
    fill-opacity: 0.7;
}

.node-item-type-shape path {
    fill: #D6C482;
    fill-opacity: 0.7;
}

.node-item-type-tensor path {
    fill: #6D7CE4;
    fill-opacity: 0.7;
}

.node-item-type-transform path {
    fill: #CDCB74;
}

.node-item-type-data path {
    fill: #2576AD;
    fill-opacity: 0.7;
}

.node-item-type-custom path {
    fill: #E46D6D;
    fill-opacity: 0.7;
}

.node-item-input {
    cursor: pointer;

    path {
        fill: #fff;
    }
}

.node-item-constant {
    cursor: pointer;

    path {
        fill: #eee;
    }
}

.node-item-undefined {
    cursor: pointer;

    path {
        fill: #CA5353;
        fill-opacity: 0.7;
    }
}

.node-attribute {
    cursor: pointer;

    text {
        font-size: 9px;
        font-weight: normal;
    }
}

.node-attribute path {
    fill: #fff;
    stroke-width: 0;
}

.graph-item-input {
    cursor: pointer;

    path {
        fill: #E49D6D;
        fill-opacity: 0.7;
    }
}

.graph-item-output {
    cursor: pointer;

    path {
        fill: #E4E06D;
        fill-opacity: 0.9;
    }
}

.edge-label text {
    font-size: 10px;
}

.edge-path {
    stroke: #666;
    stroke-width: 1px;
    fill: none;
}

#arrowhead-vee path {
    fill: #666;
}

.edge-path-control-dependency {
    stroke-dasharray: 3, 2;
}

.cluster rect {
    stroke: #000;
    fill: #000;
    fill-opacity: 0.02;
    stroke-opacity: 0.06;
    stroke-width: 1px;
}

.select {

    &.edge-path {
        stroke: #1527C2;
        stroke-width: 2px;
        stroke-dasharray: 6px 3px;
        stroke-dashoffset: 0;
        animation: pulse 4s infinite linear;
    }

    .node.border {
        stroke: #1527C2;
        stroke-width: 2px;
        stroke-dasharray: 6px 3px;
        stroke-dashoffset: 0;
        animation: pulse 4s infinite linear;
    }
}

@keyframes pulse {
    from {
        stroke-dashoffset: 100px;
    }

    to {
        stroke-dashoffset: 0;
    }
}
