.query-panel {
  z-index: 9;
  height: 40px;
  background: rgb(255, 255, 255);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  left: 48px;
  right: 256px;
  bottom: 0;
  flex: 1 1 auto;
  border: solid rgba(0, 0, 0, 0.125);
  border-width: 1px 0px 0px 0px;
  box-shadow: 0 2px 4px 2px #0000000f;

  .data-panel {
    border: solid rgba(0, 0, 0, 0.125);
    border-width: 0px 1px 0px 0px;
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
    min-height: 41px;
    user-select: none;
  }

  .queries-container {
    width: 100%;

    .queries-header {
      position: sticky;
      top: 0;
      background: #fff;
      z-index: 1;
      display: flex;
      align-items: center;
      border-bottom: 1px solid rgba(0, 0, 0, 0.125);
      height: 54px;
      padding: 0 16px;
      --tblr-gutter-x: 0rem;
      font-weight: 500;
      color: rgba(0, 0, 0, 0.65);
      h5 {
        font-size: 16px;
        margin-bottom: 0;
      }
    }

    .query-btn {
      display: inline-block;
      cursor: pointer;
      height: 16px;
      line-height: 16px;
      width: 16px;
      padding: 0;
      border: 1px solid #999;
      color: #999;
      border-radius: 2px;
      i {
        font-size: 14px;
      }
      &:hover {
        color: @primary-color;
        border: 1px solid @primary-color;
      }
    }

    .query-row {
      padding: 0 8px;
      cursor: pointer;
      border-radius: 4px;
      position: relative;
      border-radius: 0;
      .delete-btn {
        position: absolute;
        display: none;
        right: 16px;
      }
      &:hover {
        background: rgba(0, 0, 0, 0.06);
        .delete-btn {
          display: inline-block;
        }
      }
      &.bg-select {
        background: rgba(0, 0, 0, 0.06);
        color: @primary-color;
      }
    }
  }

  .query-definition-panel-wrapper {
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
    min-height: 41px;
    user-select: none;

    .query-definition-panel .query-definition-header {
      position: relative;
      & > .ant-tabs-bar.ant-tabs-top-bar {
      }
    }

    .ant-tabs {
      overflow: visible;
    }

    .ant-tabs-extra-content {
      display: flex;
      justify-content: center;
      align-items: center;
      margin-top: 6px;
    }
    .ant-tabs-bar {
      height: 54px;
      .ant-tabs-tab {
        padding: 17px 16px;
      }
    }
  }
  &.fixed-bottm {
    h5 {
      margin-left: 16px;
    }
    .cursor-pointer {
      margin-right: 30px;
    }
  }
  .operation-area {
    height: 54px;
    display: flex;
    align-items: center;
    top: 0;
  }
  .move-box {
    height: 5px;
    width: 100%;
    position: absolute;
    top: 0;
    cursor: row-resize;
    z-index: 9;
  }
}

.query-manager-container {
  padding: 0 16px;
  .data-source-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
  }

  .query-url-content {
    display: flex;
    margin-top: 12px;
    .code-hinter {
      border-radius: 0 4px 4px 0 !important;
      border-left: 0 !important;
      padding: 0.08rem 0rem !important;
      pre.CodeMirror-line {
        padding-left: 16px;
      }
    }
  }

  .query-header-content,
  .query-param-content,
  .query-body-content {
    .data-type {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .query-tool {
      display: flex;
      justify-content: end;
    }

    .bulk-button {
      display: inline-block;
      padding: 0 2px;
      font-size: 12px;
      text-align: center;
      color: #52bf63;
      cursor: pointer;
      border-radius: 2px;
      z-index: 1;
      user-select: none;
    }

    .list-content {
      display: flex;
      & > div {
        width: 40%;
        min-height: 48px;
        border-bottom: 1px solid #eee;
        display: flex;
        align-items: center;
        justify-content: left;
        padding-left: 20px;
        border-left: 1px solid #eee;
        &:nth-child(3) {
          width: 13%;
        }
        &:last-child {
          width: 7%;
          border-right: 1px solid #eee;
          justify-content: left;
          padding-left: 20px;
        }

        button {
          padding-left: 0;
        }
      }

      .extra-btn {
        cursor: pointer;
        color: @primary-color !important;
        background-color: transparent;
        border-color: transparent !important;
        box-shadow: none;
      }
      &.font-medium {
        & > div {
          height: 34px;
          border-top: 1px solid #eee;
          background-color: rgba(0, 0, 0, 0.03);
        }
      }
    }
    .container-area {
      & > div {
        justify-content: center;
        padding: 8px 12px;
      }
    }
  }
  .query-options-content {
    .ant-tabs-bar {
      height: 44px;
      margin-bottom: 8px;
      .ant-tabs-tab {
        padding: 12px 16px;
      }
    }
  }
}

.advanced-manager-container {
  .flip-options-content {
    display: flex;
    padding-left: 8px;
    margin-top: 8px;
    .ant-switch {
      height: 16px !important;
      line-height: 16px !important;
      min-width: 28px !important;
      margin-bottom: 4px;
      &::after {
        width: 12px !important;
        height: 12px !important;
      }
    }
  }
  .extra-btn {
    cursor: pointer;
    color: @primary-color !important;
    background-color: transparent;
    border-color: transparent !important;
    box-shadow: none;
  }
}


.query-bulk-editor{
  height: 260px;

  .ant-input-affix-wrapper {
    height: calc(100% - 20px);
  }

  textarea.ant-input,
  textarea.ant-input:focus{
    border: 1px solid #dadcde !important;
    resize: none;
    box-shadow: none;
    height: 100% !important;
  }

  .bulk-editor-info{
    height: 20px;
    font-size: 12px;
  }
}

.query-code-hinter-wrapper {
  position: relative;
  height: 430px;
  overflow: hidden;
  margin-top: -6px;

  .codemirror-wrap{
    position: relative;
    height: 100%;
    overflow-y: auto;
  }

   .CodeMirror {
    height: auto;
    min-height: 426px;
    margin: 0 10px;
    border-radius: 8px;
  }

   .CodeMirror-scroll {
    min-height: 410px;
  }
}

.json-editor {
  position: relative;
  height: 260px;
  overflow: hidden;
  border: 1px solid #e8e8e8;

  .codemirror-wrap{
    position: relative;
    height: 100%;
    overflow-y: auto;
  }

  .json-beautify {
    position: absolute;
    right: 8px;
    top: 8px;
    padding: 0 4px;
    font-size: 12px;
    color: #52BF63;
    background-color: #FFF;
    border: 1px solid #e8e8e8;
    cursor: pointer;
    z-index: 1;
    user-select:none;
  }

   .CodeMirror {
    height: auto;
    min-height: 258px;
  }

   .CodeMirror-scroll {
    min-height: 258px;
  }
}
