@import '~@zgfe/business-lib/es/assets/styles/inner.less';
.cdp-api {
  &-request {
    .ant-tabs {
      line-height: 1;
    }
    .ant-tabs-tab {
      padding-top: 0 !important;
    }
    .ant-form-item-no-colon {
      transform: translateY(-8px);
    }
  }
  &-response {
    .ant-form-item-control-input-content {
      border: 1px solid @border-color-split;
      border-radius: @border-radius-normal;
      .json-editor {
        border: none;
      }
    }
  }
  &-btn-del {
    &:hover {
      color: @error-color;
      cursor: pointer;
    }
  }
  &-json-row:hover {
    .cdp-api-switch {
      display: inline-block;
    }
  }
  &-switch {
    display: none;
    margin-left: 8px;
    &-checked-row {
      display: inline-block;
    }
    & > span {
      display: inline-block;
      height: 20px;
      margin-right: 8px;
      padding: 0 4px;
      color: #fff;
      line-height: 20px;
      background: #a2beff;
      border-radius: 2px;
      &:hover {
        color: #fff;
        background: @primary-color;
      }
    }
    &-checked {
      color: #fff !important;
      background: @primary-color !important;
    }
  }
  &-table {
    .ant-table-bordered {
      border: none !important;
      .ant-table-container table > thead > tr:first-child th:first-child {
        border-top-left-radius: 8px;
      }
      .ant-table-container table > thead > tr:first-child th:last-child {
        border-top-right-radius: 8px;
      }
      .ant-table-container {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
      }
      .ant-table-footer {
        padding: 0 !important;
        border-radius: 0 0 8px 8px !important;
      }
      .ant-table-thead > tr > th {
        border: inherit !important;
        border-right: 1px solid #e8efff !important;
        border-bottom: 1px solid #e8efff !important;
      }
      .ant-table-cell {
        padding: 8px 14px !important;
        white-space: nowrap;
        // 最后两列
        &:last-of-type {
          padding: 0 16px !important;
        }
      }
      .ant-table-tbody .ant-table-cell {
        padding: 0 !important;
        // 最后两列
        &:last-of-type {
          padding: 0 16px !important;
        }
        .ant-input {
          background-color: #fff !important;
        }
      }
    }
    &.full {
      .ant-table-cell:nth-last-child(-n + 2) {
        padding: 0 16px !important;
      }
    }
  }
  &-btn-add {
    width: 100%;
    height: @height-base;
    padding-left: 20px;
    color: #5f6085;
    line-height: @height-base;
    &:hover {
      color: @primary-color;
      background-color: #e8efff;
      cursor: pointer;
    }
  }
  &-json-label {
    display: inline-block;
    padding: 0 4px;
    color: @success-color;
    background-color: #d4f2dc;
    border-radius: 2px;
    &.checked {
      color: @error-color;
      background: #feddda;
    }
  }
  &-out-param {
    .ant-table-cell {
      height: 32px !important;
      padding: 0 16px !important;
      line-height: 32px !important;
    }
  }
}
