* {
    box-sizing: border-box;
    outline: none;
    --taskWidth: 160px;
    --taskHeight: 80px;
    --taskBorderColor: #0077e6;
    --lineColor: #000;
}
.wf-editor {
    user-select: none;
}
.wf-editor-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

.wf-editor-ctrls {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    min-height: 300px;
    background-color: #eee;
    box-shadow: 0 0 2px 2px #ccc;
    z-index: 100;
}
.wf-editor-ctrl {
    width: 60px;
    height: 90px;
    cursor: pointer;
    padding: 10px 0;
}
.wf-editor-ctrl.drag-ctrl {
    cursor: grab;
}
.wf-editor-ctrl:hover {
    background-color: #e5e5e5;
}
.wf-editor-ctrl svg {
    width: 30px;
    height: 30px;
    margin: 0 15px;
}
.wf-editor-ctrl svg path {
    fill: #0077E6;
}
.wf-editor-ctrl.highlight svg path {
    fill: #EDA804;
}
.wf-editor-ctrl-label {
    width: 100%;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 12px;
    color: #333;
}

.wf-editor-task {
    position: absolute;
    width: var(--taskWidth);
    height: var(--taskHeight);
    border-radius: 16px;
    border: 2px solid var(--taskBorderColor);
    background-color: #fff;
    cursor: pointer;
    z-index: 10;
}
.wf-editor-task.systask {
    border-radius: 0;
}
.wf-editor-task.active {
    border-color: #EDA804 !important;
}

.wf-editor-task .icon {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 8px;
    left: 8px;
}
.wf-editor-task .icon svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
.wf-editor-task .icon path {
    fill: var(--taskBorderColor);
}
.wf-editor-task.active .icon path {
    fill: #EDA804;
}
.wf-editor-task .close {
    position: absolute;
    width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 50%;
    top: 6px;
    right: 8px;
    display: none;
    text-align: center;
    font-size: 14px;
}
.wf-editor-task.active .close {
    display: block;
    color: #EDA804;
    z-index: 10;
    cursor: pointer;
}
.wf-editor-task.active .close:hover {
    background-color: #EDA804;
    color: #fff;
}

.wf-editor-task.starttask {
    width: var(--taskHeight);
    height: var(--taskHeight);
    border-color: #00BD81;
    border-radius: 50%;
}

.wf-editor-task.endtask {
    width: var(--taskHeight);
    height: var(--taskHeight);
    border-color: #EA6D4D;
    border-radius: 50%;
}

.wf-editor-task.iftask {
    border-radius: 0;
    border: none;
    background-color: transparent;
}
.wf-editor-task.iftask::before {
    content: '';
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    position: absolute;
    left: -2px;
    top: -2px;
    background-color: var(--taskBorderColor);
    clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}
.wf-editor-task.iftask.active::before {
    background-color: #EDA804;
}
.wf-editor-task.iftask::after {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-color: #fff;
    clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}

.wf-editor-task .link-point {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 6px;
    border: 1px solid #000;
    background-color: #fff;
    cursor: crosshair;
    opacity: 0;
    z-index: 5;
}
.wf-editor-task.active .link-point {
    border: 1px solid #EDA804;
}
.wf-editor-task:hover .link-point {
    opacity: 1;
}
.wf-editor-task .link-point.top {
    left: calc((var(--taskWidth) - 12px - 2px) / 2);
    top: calc((-12px - 2px) / 2);
}
.wf-editor-task .link-point.bottom {
    left: calc((var(--taskWidth) - 12px - 2px) / 2);
    bottom: calc((-12px - 2px) / 2);
}
.wf-editor-task .link-point.left {
    left: calc((-12px - 2px) / 2);
    top: calc((var(--taskHeight) - 12px - 2px) / 2);
}
.wf-editor-task .link-point.right {
    right: calc((-12px - 2px) / 2);
    top: calc((var(--taskHeight) - 12px - 2px) / 2);
}

.wf-editor-task.starttask .link-point.top, .wf-editor-task.endtask .link-point.top {
    left: calc((var(--taskHeight) - 12px - 2px) / 2);
    top: calc((-12px - 2px) / 2);
}
.wf-editor-task.starttask .link-point.bottom, .wf-editor-task.endtask .link-point.bottom {
    left: calc((var(--taskHeight) - 12px - 2px) / 2);
    bottom: calc((-12px - 2px) / 2);
}

.wf-editor-task .body {
    position: absolute;
    left: calc(12px / 2);
    top: calc(12px / 2);
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    cursor: move;
    display: flex;
    align-items: center;
    z-index: 1;
}
.wf-editor-task .taskname {
    width: 100%;
    text-align: center;
    font-size: 14px;
    letter-spacing: 2px;
    color: #000;
}
.wf-editor-task.active .taskname {
    color: #EDA804;
}
div[contenteditable] {
    outline: none;
}

.wf-editor .connect {
    position: absolute;
    min-width: 40px;
    min-height: 24px;
    line-height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}
.wf-editor .connect .connectname {
    display: inline;
    background-color: #fff;
    height: 24px;
    font-size: 14px;
    letter-spacing: 2px;
    color: #000;
    z-index: 10;
}
.wf-editor .connect.active .connectname {
    color: #EDA804;
}
.wf-editor .connect .close {
    display: none;
    width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 50%;
    top: 6px;
    right: 8px;
    text-align: center;
    font-size: 14px;
}
.wf-editor .connect.active .close {
    display: block;
    color: #EDA804;
    z-index: 10;
    cursor: pointer;
}
.wf-editor .connect.active .close:hover {
    background-color: #EDA804;
    color: #fff;
}

.wf-editor .line {
    position: absolute;
    background-color: var(--lineColor);
    cursor: pointer;
    z-index: 9;
}
.wf-editor .line.active {
    background-color: #EDA804;
}
.wf-editor .arrow {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--lineColor);
}
.wf-editor .arrow.active {
    background-color: #EDA804;
}
.wf-editor .arrow.up {
    clip-path: polygon(0 100%, 50% 0, calc(50% + 2px) 0, 100% 100%);
}
.wf-editor .arrow.down {
    clip-path: polygon(0 0, 50% 100%, calc(50% + 2px) 100%, 100% 0);
}
.wf-editor .arrow.left {
    clip-path: polygon(0 50%, 0 calc(50% + 2px), 100% 100%, 100% 0);
}
.wf-editor .arrow.right {
    clip-path: polygon(0 0, 100% 50%, 100% calc(50% + 2px), 0 100%);
}

.wf-editor-options {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background-color: #fff;
    border-left: 1px solid #ccc;
    padding: 15px 20px;
    z-index: 100;
}

.wf-editor-options-title {
    color: #666;
    font-size: 16px;
}
.wf-editor-options-body {
    margin-top: 10px;
    width: 100%;
}
.wf-editor-options-row {
    width: 100%;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    color: #666;
    display: flex;
}
.wf-editor-options-label {
    width: 80px;
    margin-right: 20px;
    display: inline-block;
    text-align: right;
}
.wf-editor-options-value {
    width: calc(100% - 80px);
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
}
.wf-editor-options-value-item {
    width: 100%;
    display: inline-flex;
    align-items: center;
}
.wf-editor-options-value input {
    width: 100%;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 4px;
    color: #333;
}
.wf-editor-options-value input[type=checkbox] {
    width: 16px;
    height: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    padding: 0;
    margin-left: 0;
}
.wf-editor-options-value select {
    width: 100%;
    height: 30px;
    line-height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}