@hide-color: rgba(24, 26, 36, 0.8);

.nodeCard {
  filter: drop-shadow(0px 0px 40px rgba(0, 0, 0, 0.24));
  background-color: rgba(35, 38, 48,.8);
  width: 160px;
  position: relative;
  padding-bottom: 6px;
  border: 2px solid var(--easyv-background-6);
  border-radius: 2px;
  // cursor: move;

  .typeColor {
    border-radius: 1px 1px 0px 0px;
    height: 2px;
  }
  .title {
    height: 28px;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 8px;
    font-size: 14px;
    color: #fff;
    .left {
      height: 100%;
      display: flex;
      align-items: center;
      .icon {
        width: 16px;
        height: 16px;
        overflow: hidden;
        margin-right: 2px;
        & > span,
        svg {
          height: 100%;
          width: 100%;
          vertical-align: top;
        }
      }
      & > span,
      .name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        max-width: 100px;
      }
    }
    .right {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      position: relative;
      div[data-handleid] {
        opacity: 0;
      }
      span {
        width: 10px;
        height: 10px;
        display: inline-block;
      }
    }
    .switch {
      width: 16px;
      height: 4px;
      background-color: #3a89fd;
      border-radius: 20px;
      position: relative;
      cursor: no-drop;
      &::after {
        content: '';
        display: inline-block;
        position: absolute;
        right: 0;
        box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
        border-radius: 50%;
        background-color: #fff;
        top: -3px;
        width: 10px;
        height: 10px;
      }
    }
    .switchReverse {
      background: rgba(255, 255, 255, 0.16);
      &::after {
        left: 0;
      }
    }
  }
  .moduleName {
    background: rgba(0, 0, 0, 0.16);
    height: 22px;
    line-height: 22px;
    text-align: right;
    padding: 0 8px;
  }
  .identifying {
    margin: 8px;
    background: rgba(0, 0, 0, 0.32);
    border-radius: 10px;
    padding: 0 8px;
    height: 20px;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.4);
  }
  :global {
    .endpoint {
      width: 8px;
      position: absolute;
      // cursor: pointer;
      display: inline-block;
      height: 8px;
    }
  }

  .events,
  .actions {
    padding: 4px 0;
    li {
      height: 24px;
      line-height: 24px;
      text-align: right;
      color: rgba(255, 255, 255, 0.8);
      display: flex;
      justify-content: flex-end;
      align-items: center;
      position: relative;
      :global {
        .endpoint {
          margin-right: -5px;
        }
      }
    }
  }
  .actions {
    li {
      text-align: left;
      justify-content: flex-start;
      :global {
        .endpoint {
          margin-left: -5px;
        }
      }
    }
  }
}
.action {
  border-color: var(--easyv-primary-color);
}

.hide,
.defaultHide,
.interactHidden,
.error {
  .mask {
    &::after {
      content: '';
      position: absolute;
      border-radius: 1px;
      top: -2px;
      background-color: @hide-color;
      left: -2px;
      bottom: -2px;
      right: -2px;
    }
  }
  .actions,
  .events {
    li {
      :global {
        .endpoint {
          z-index: 1;
        }
      }
    }
  }

  filter: none;
}
.hide:not(.action){
  :global{
    .easyv__handle{
      border-color: #555;
      background-color: @hide-color;
      z-index: 1;
    }
  }
}

.hide.action{
  :global{
    .easyv__handle{
      z-index: 1;
      border-color: #555;
      background-color: @hide-color;
    }
  }
}

.action:not(.hide){
  :global{
    .easyv__handle{
     border-color: var(--easyv-primary-color);
     background-color: var(--easyv-background-6);
     border-width: 2px;
    width: 8px;
    height: 8px;
    }
    .easyv__handle-left{
    left: -5px;
    }
    .easyv__handle-right{
      right: -5px;
    }
  }
}

.defaultHide {
  .mask {
    &::after {
      background-color: rgba(76, 255, 231, 0.15);
    }
  }
}
.error {
  .errorIcon {
    transform: translate(-50%, -50%);
    width: 35px;
    position: absolute;
    left: 50%;
    top: 50%;
    font-size: 35px;
    height: 35px;
    line-height: 35px;
    color: #eb515a;
  }
}

.interactHidden {
  // 交互隐藏
  .mask {
    &::after {
      background-color: @hide-color;
    }
  }

  .actions,
  .events {
    li {
      :global {
        .endpoint {
          z-index: 1;
        }
      }
    }
  }
}

.conditionBox {
  background: rgba(34, 60, 131, 0.8);
  border-radius: 2px;
  .title {
    background: rgba(56, 94, 200, 0.8);
    border-radius: 2px 2px 0px 0px;
    margin-bottom: 8px;
    padding-right: 5px;
  }
  .conditions {
    position: relative;
  }
  .condition {
    padding: 4px 12px;
    span {
      display: block;
      background: rgba(0, 0, 0, 0.32);
      border-radius: 11px;
      height: 20px;
      padding: 0 12px;
      line-height: 20px;
    }
  }
  .actions,
  .events {
    position: absolute;
    width: 8px;
    height: 8px;
    top: 50%;
    display: inline-block;
  }
  .actions {
    left: 0;
  }
  .events {
    right: 0;
    text-align: right;
  }
}
.action {
  border-color: var(--easyv-primary-color);
}

// 组
.group {
  background: rgba(179, 82, 52, 0.04);
  .groupHeader {
    height: 30px;
    padding-left: 10px;
    background: rgba(179, 82, 52, 0.12);
    border-radius: 2px 2px 0px 0px;
    line-height: 30px;
    font-size: 14px;
    .target {
      width: 10px;
      height: 10px;
      display: inline-block;
    }
    .groupState {
      color: #fff;
    }
    .groupIcon {
      width: 16px;
      height: 16px;
      display: inline-block;
      vertical-align: middle;
      line-height: 16px;
      margin-top: -3px;
      position: relative;
      :global {
        div[data-handleid] {
          opacity: 0;
        }
        span {
          vertical-align: middle;
        }
        svg {
          width: 100%;
          height: 100%;
        }
      }
    }
  }
}
