.cn-layout-block:has(.cn-layout-block-design-tool) .cn-ui-card {
  overflow: initial;
}

.cn-layout-block-fold {
  display: none !important;
}

.cn-layout-block-relative {
  position: relative;
}

.cn-layout-block-fold-button {
  background: #f6f7fc !important;
  border: none !important;
}

.cn-layout-block-toggle-container {
  &-fold {
    display: flex;
  }
  width: 16px;
  height: 100%;
  display: none;
  overflow: auto;
  align-items: center;
  position: fixed;
  z-index: 100;
  cursor: pointer;
  &:hover {
    background: rgba(212, 219, 242, 1);
  }
  .cn-layout-block-toggle-button {
    width: 100%;
    height: 64px;
    background: #284cc0;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
  }
}

.cn-layout-block-toggle-button::before,
.cn-layout-block-toggle-button::after {
  content: '';
  display: inline-block;
  color: #fff;
  width: 6px;
  height: 6px;
  border-right: 1px solid;
  border-bottom: 1px solid;
  transform: rotate(310deg);
  margin-right: -1px;
}

.cn-layout-block-add-card {
  position: relative;
  display: none;
  &-btn {
    color: #284cc0;
    position: absolute;
    left: 50%;
    cursor: pointer;
    transform: translate(-50%, 3px);
  }
}
.cn-layout-block {
  &:hover {
    .cn-layout-block-add-card {
      display: block;
    }
  }
}

//块的拖拽工具
.cn-layout-block-design-tool {
  position: absolute;
  right: 0;
  height: 100%;
  z-index: 999;

  &-drag {
    position: absolute;
    height: 100%;
    width: 8px;
    background: #005be5;
    left: 50%;
    bottom: 0;
    top: 0;
    padding: 3px;
    background-clip: content-box;
    opacity: 0;
  }

  &-insert {
    cursor: pointer;
    position: absolute;
    background: #005be5;
    left: -2px;
    background-clip: content-box;
    top: -6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    &::after {
      content: '';
    }

    &:hover {
      left: -6px;
      top: -10px;
      width: 20px;
      height: 20px;

      &::after {
        display: block;
        content: '+';
        font-size: 16px;
        font-weight: 400;
        color: #fff;
      }
    }
  }

  &:hover {
    .cn-layout-block-design-tool-drag,
    .cn-layout-block-design-tool-insert {
      opacity: 1;
    }
  }
}
