.yaml-editor {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: $white;
}

.data-market {
  display: block;
  width: 100%;
  height: 100%;
}

.yaml-editor-content {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.yaml-editor-readonly {
  .moving-view {
    z-index: 4;
    padding-top: 6px;
  }
}

.yaml-editor-head {
  display: block;
  width: 100%;
  height: 39px;
  padding: 0 16px;
  line-height: 39px;
  background: $white;
  border-bottom: 1px solid $color-border;
}

.yaml-editor-item {
  position: relative;
  z-index: 2;
  display: inline-block;
  width: 280px;
  height: 170px;
  margin-right: 20px;
  margin-left: 40px;
  vertical-align: top;
  background: $white;
  border-radius: 4px;
  @extend %shallow-shadow;
  cursor: pointer;
  transition: box-shadow 0.3s ease-in-out, transform 0.5s ease-in-out;
  user-select: none;

  svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .item-point {
    position: absolute;
    left: 134px;
    display: block;
    width: 12px;
    height: 12px;
    background: $white;
    border-radius: 100%;
    transition: all 0.3s ease-in-out;

    .iconfont {
      display: block;
      width: 12px;
      height: 12px;
      font-size: 12px;
    }

    &:hover {
      transform: scale(1.3);
      @extend %hover-shadow;
    }
  }

  .bottom-point {
    bottom: -6px;
  }

  .top-point {
    top: -4px;
  }

  .icon-ellipsis {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
  }
}

.yaml-item-title-container {
  display: flex;
  align-items: center;
  height: auto;
  margin: 0 16px;
  padding: 12px 0;
  border-bottom: 1px solid $platinum;
}

.disabled-item {
  background-color: $platinum;
}

.yaml-item-title-container-move {
  //cursor: move;
}

.yaml-editor-item-title-name {
  display: inline-block;
  flex: 1;
  // width: calc(100% - 72px);
  height: auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.yaml-editor-item-status {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  vertical-align: middle;
  border-radius: 100%;
}

.yaml-editor-item-name {
  display: block;
  height: 20px;
  font-size: 12px;
  line-height: 20px;
}

.yaml-editor-item-icon {
  display: inline-block;
  width: 40px;
  height: 40px;
  margin-right: 12px;
  vertical-align: middle;

  .iconfont {
    font-size: 40px;
  }
}

.yaml-editor-item-title {
  display: block;
  height: 20px;
  color: $color-dark-8;
  font-weight: bold;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
}

.yaml-editor-item-one-title {
  display: inline-block;
  height: 40px;
  color: rgba(0, 0, 0, 0.8);
  font-weight: bold;
  font-size: 16px;
  line-height: 40px;
  letter-spacing: 0;
  vertical-align: middle;
}

.item-container-view {
  position: relative;
  z-index: auto;
  display: block;
  width: 100%;
  height: 100%;
  padding-top: 48px;
  padding-bottom: 20px;
  overflow: auto;
}

.pipeline-view {
  padding-top: 10px;
}

.scale-view {
  z-index: 1;
  padding: 0;
  overflow: initial;
}

.auto-z-index {
  z-index: auto;
}

.yaml-editor-item-content {
  display: block;
  height: calc(100% - 65px);
  padding: 12px 16px;
  overflow-y: auto;
  white-space: normal;
  text-overflow: ellipsis;
}

.yaml-editor-item-column {
  display: block;
}

.dice-yaml-group {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  height: auto;
  min-height: 40px;
  padding: 30px 0;
  white-space: nowrap;
  background: transparent;
}

.yaml-editor-split {
  position: relative;
  z-index: 2;
  display: inline-block;
  width: 40px;
  height: 100%;
}

.item-moving {
  position: absolute;
  z-index: 9999;
  //cursor: move;
  animation: item-moving 0.3s ease-in-out;
  animation-fill-mode: forwards;
}

.new-point {
  display: none;
  width: 280px;
  height: 170px;
  margin-right: 20px;
  margin-left: 40px;
  line-height: 170px;
  text-align: center;
  vertical-align: top;
  background: url(/images/resources/new-point.png) no-repeat center;
  background-size: contain;
  border-radius: 4px;
  box-shadow: 0 0 4px lightgrey;
  opacity: 0.5;
}

.drop-over {
  background: rgba(0, 0, 0, 0.04);
  user-select: none;

  &:hover {
    .new-point {
      display: inline-block;
    }
  }
}

@keyframes item-moving {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.02);
  }
}

.yaml-editor-drawer {
  position: fixed;
  top: 0;
  right: 32px;
  z-index: 6;
  display: none;
  height: 100%;
  overflow-x: auto;
  background: $white;
  border: 1px solid $color-border;
  border-radius: 0 3px 3px 0;
  box-shadow: -2px 0 8px $color-dark-2;
  transition: right 0.3s ease-in-out;

  .yaml-editor-drawer-title {
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    color: rgba(0, 0, 0, 0.85);
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
  }

  .yaml-editor-drawer-content {
    display: block;
    width: 100%;
    height: calc(100% - 52px);
    padding: 4px 16px 16px 16px;
    overflow-x: auto;
  }

  .yaml-editor-drawer-close {
    float: right;
    margin-top: 3px;
    color: $color-dark-4;
    cursor: pointer;
  }
}

@include md-width() {
  .yaml-editor-drawer {
    right: 16px;
  }
}

.yaml-editor-background-container {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.yaml-editor-block-container {
  position: relative;
  width: 100%;
  height: 100%;
  background-repeat: repeat;
  background-size: 100%;
  border-bottom: 1px solid $platinum;

  .yaml-editor-block-title {
    position: absolute;
    top: 16px;
    left: 16px;
    width: auto;
    color: $color-dark-8;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 0;
    text-align: center;
    vertical-align: middle;
  }

  .yaml-editor-block-content {
    position: relative;
    width: 100%;
    height: 100%;
    vertical-align: middle;
  }
}

.selected-item {
  z-index: 4;
}

.selected-group {
  z-index: auto;
}
