@import '../../style/index';
@import '../common/handle.less';

@halo-prefix-cls: ~'@{x6-prefix}-widget-halo';

.@{halo-prefix-cls} {
  position: absolute;
  pointer-events: none;

  &-content {
    position: absolute;
    top: 100%;
    padding: 6px;
    font-size: 10px;
    line-height: 14px;
    text-align: center;
    border-radius: 6px;
  }

  &-handles + &-content {
    right: -20px;
    left: -20px;
    margin-top: 30px;
  }

  &-handles.@{handle-prefix-cls}-small + &-content {
    margin-top: 25px;
  }

  &-handles.@{handle-prefix-cls}-small + &-content {
    margin-top: 20px;
  }

  &-handles.@{handle-prefix-cls}-pie + &-content {
    right: 0;
    left: 0;
    margin-top: 10px;
  }
}

// Default theme
.@{halo-prefix-cls} {
  &-content {
    color: #fff;
    background-color: #6a6b8a;
  }

  &.type-node {
    .@{handle-prefix-cls}-toolbar {
      .@{handle-prefix-cls}-remove {
        position: absolute;
        right: 100%;
        bottom: 100%;
        margin-right: 6px;
        margin-bottom: 3px;
      }
    }
  }

  &.type-edge {
    .@{handle-prefix-cls}-surround {
      .@{handle-prefix-cls}-remove {
        background-color: #fff;
        border-radius: 50%;
      }
    }

    .@{handle-prefix-cls}-toolbar {
      margin-top: -60px;
      margin-left: -18px;

      &::after {
        top: -22px;
        left: -9px;
      }
    }
  }
}
