@import '~@zgfe/business-lib/es/assets/styles/inner.less';
@keyframes fresh-rotate {
  to {
    transform: rotate(405deg);
  }
}

.visual-workbench {
  &-guide-tip .ant-tooltip-inner {
    text-align: right;

    & > div:first-of-type {
      font-size: 16px;
      font-weight: 500;
      line-height: 24px;
      color: #021429;
      text-align: left;
    }

    & > div:last-of-type {
      color: #67727f;
      text-align: left;
      padding-left: 24px;
      margin: 8px 0;
    }
  }

  &-center {
    flex: 1;
    flex-direction: column;
    overflow: hidden;
  }

  &-mobile {
    flex: 1;
    padding: 26px 0;
    overflow: auto;
    width: 100%;
  }

  &-tocanvas {
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 10px rgb(0 0 0 / 10%);
  }

  &-canvas {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
  }

  .element {
    border-width: 1px;
    border-style: solid;
    cursor: pointer;

    &.active,
    &:hover {
      border-width: 2px;
      box-shadow: @box-shadow-base;
    }
  }

  .defined {
    background: rgb(251 85 71 / 20%);
    border-color: #fb5547;
  }

  .definable {
    background: rgb(41 189 82 / 10%);
    border-color: #29bd52;
  }

  .defining {
    background: rgb(154 161 169 / 20%);
    border-color: #9aa1a9;
    border-width: 2px;
  }

  .defined,
  .definable,
  .defining {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: text-bottom;
    border-radius: 1px;
  }

  &-controller {
    height: 32px;
    line-height: 32px;
    padding: 12px 16px 0 24px;
    box-sizing: content-box;

    & > .ant-space {
      float: right;
    }
  }

  &-status {
    display: inline-block;
    text-align: center;
    padding: 0 8px;
    height: 24px;
    line-height: 24px;
    border-radius: 2px;

    &.success {
      background: #d4f2dc;
      color: #29bd52;
    }

    &.disconnected {
      background: #ffecd9;
      color: #fd9f41;
      cursor: pointer;
    }
  }

  &-fresh {
    float: right;
    font-size: 24px !important;
    color: #5f6085;
    margin-left: 14px;
    cursor: pointer;

    &.loading {
      color: @disabled-color;
      animation: fresh-rotate 1.2s infinite linear;
      cursor: not-allowed;
    }
  }

  &-scal {
    float: right;
    border: 1px solid #cacdd4;
    border-radius: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    padding: 0 14px;
    margin-bottom: @margin-md;
    margin-left: @margin-md;

    .bsicon {
      color: #5f6085 !important;
      cursor: pointer;

      &.disable {
        cursor: not-allowed;
        color: @disabled-color !important;
      }
    }

    .ant-space-item:last-of-type .bsicon {
      color: inherit !important;
    }
  }

  &-relink {
    .ant-modal-body {
      padding: 80px 0;
      text-align: center;

      & > div:first-of-type {
        font-size: 18px;
        font-weight: 600;
      }

      .bsicon {
        color: @error-color;
        margin-right: 8px;
      }
    }
  }

  &-toqrcode {
    display: inline-block;
    margin-top: 16px;
    border: 1px solid #e6e7ea;
    padding: 8px;
  }

  &-footer {
    flex: none;
    height: 64px;
    line-height: 64px;
    padding: 0 @padding-lg;
    background: white;
    border-top: 1px solid @border-color-split;
    position: relative;

    &-type {
      display: inline-block;
      height: 24px;
      line-height: 24px;
      text-align: center;
      background: #f6f6f6;
      color: @text-color;
      padding: 0 8px;
      border-radius: 2px;

      &.pv-defined {
        color: #165dff;
        background: #e8efff;
        border-radius: 2px;
      }
    }

    &-label {
      color: @text-color;
      margin: 0 @margin-sm 0 @margin-md;
    }

    &-path {
      color: #9aa1a9;
    }

    .ant-btn {
      position: absolute;
      right: @padding-lg;
      top: 50%;
      transform: translateY(-50%);
    }
  }
}
