.bridge-config {
  .payload-desc {
    margin-top: 4px;
    margin-bottom: 0;
    color: var(--el-text-color-secondary);
  }

  .TLS-base-config {
    .el-form-item {
      margin-bottom: 0;
    }
    .TLS-base-config-title {
      font-size: 14px;
      font-weight: normal;
    }
    & + .TLS-enable-config {
      margin-top: 18px;
    }
  }
  .TLS-enable-config {
    .TLS-input {
      width: 100%;
    }
  }

  .one-of {
    display: flex;
    width: 100%;

    .switch-container {
      flex-shrink: 0;
      margin-right: 12px;
    }

    .oneof-item {
      flex-grow: 1;
      margin-top: 0;
    }
  }
}

.bridge-detail {
  .detail-header img {
    height: 40px;
  }
  .block-title {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: nowrap;
    margin: 0;
  }
  .info-tags {
    .el-tag,
    .node-status {
      margin-right: 8px;
    }
  }
  .el-alert {
    width: 75%;
    margin-bottom: 12px;
  }
}

.el-alert.webhook-tip-alert {
  margin-bottom: 12px;
  .el-icon {
    font-size: 16px;
  }
  .el-alert__content {
    padding-left: 0;
  }
  p {
    margin: 8px 0;
  }
}

/* Type Select */
.target-type-select {
  width: 100%;
  margin-bottom: 24px;

  .el-row {
    width: 100%;
  }

  .el-col {
    margin-bottom: 16px;
  }

  .el-radio__label {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 0 0 52px;
    min-height: 52px;

    .title {
      margin-bottom: 8px;
      font-weight: bold;
      font-size: 14px;
      color: var(--color-title-primary);
      white-space: normal;
    }

    .target-type-desc {
      color: var(--color-title-primary);
      font-size: 12px;
      white-space: normal;
    }
  }

  .target-type-item {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 40%;
    margin-top: 16px;
    padding: 0 12px 0 2px;
    border: 2px solid var(--color-border-primary);
  }

  .target-type-item-img {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
  }

  .target-type-item-bd {
    padding-left: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

.rule-form {
  .part-header {
    margin-bottom: 12px;
  }
  .sub-block-desc {
    margin-bottom: 12px;
    color: var(--el-text-color-secondary);
    font-size: 14px;
  }
  .label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

// rule inputs and rule outputs
.rule-io {
  a.io-item {
    display: block;
  }
  .io-item {
    border: 1px solid var(--color-border-primary);
    box-sizing: border-box;
    border-radius: var(--el-border-radius-base);
    padding: 0 6px;
    margin-bottom: 12px;
    $img-width: 48px;
    $img-margin-right: 12px;
    $op-width: 136px;
    .io-item-main {
      display: flex;
      align-items: center;
      height: 64px;
      color: unset;
      &:hover {
        .io-op {
          display: block;
        }
      }
      > img {
        width: $img-width;
        flex-shrink: 0;
        margin-right: $img-margin-right;
      }
    }

    .io-item-bd {
      flex-grow: 1;
      max-width: calc(100% - $img-width - $img-margin-right - 12px);
      div {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        line-height: 1.6;
      }
      .io-desc {
        color: var(--color-text-secondary);
      }
    }
    .io-op {
      display: none;
      flex-basis: $op-width;
      flex-shrink: 0;
      padding: 0 10px;
      text-align: right;
    }
    &:hover {
      border-color: var(--el-color-primary);
      cursor: pointer;
      .io-op {
        color: var(--el-color-primary);
      }
      .io-item-bd {
        max-width: calc(100% - $img-width - $img-margin-right - $op-width);
      }
    }
    .el-divider {
      margin: 0;
    }
  }
  .fallback-container {
    position: relative;
    margin-top: 8px;
    margin-bottom: 8px;
    .fallback-actions-editor {
      border-radius: 0 0 var(--el-border-radius-base) var(--el-border-radius-base);
    }
  }
  .editor-label {
    position: absolute;
    top: 16px;
    left: 16px;
    display: block;
    // small button height
    line-height: 22px;
  }
  a.io-item {
    color: unset;
  }
  .btn-add {
    margin-top: 24px;
    :deep(span) {
      display: flex;
      align-items: center;
    }
    .el-icon {
      font-size: 16px;
    }
  }
}

.delete-second-confirm {
  padding: 0px 16px 4px;
  .el-dialog__header {
    display: none;
  }
  .el-dialog__body {
    padding-top: 28px;
    padding-bottom: 0px;
  }
  .el-dialog__footer {
    padding-bottom: 12px;
  }
  ul {
    list-style: none;
    padding-left: 36px;
    margin-bottom: 0;
  }
  li {
    margin-right: 4px;
  }
  .data-item {
    display: inline-block;
    padding: 4px 0;
    max-width: 100%;
    .el-tag,
    .el-tag__content,
    a {
      max-width: 100%;
    }
  }
}
