.query-form {
  &__wrapper {
    position: relative;
    font-size: $x-small;

    .query-page__warning {
      margin: 0;
      margin-top: $pad-large;
    }

    .form-field--input {
      margin: 0;
    }
  }

  &__title-bar {
    display: flex;
    justify-content: space-between;

    .form-field {
      margin-bottom: 0px;
    }

    .input-field,
    .input-field__text-area {
      min-height: auto;
      line-height: normal;
      white-space: normal;
    }

    /* Hide scrollbar for Chrome, Safari and Opera */
    .input-field::-webkit-scrollbar {
      display: none;
    }

    /* Hide scrollbar for IE, Edge and Firefox */
    .input-field {
      -ms-overflow-style: none; /* IE and Edge */
      scrollbar-width: none; /* Firefox */
    }

    .edit-link {
      cursor: pointer;
    }

    .name-description {
      flex-grow: 1;
      margin: $pad-medium 24px 0 0;
      .query-name-wrapper {
        display: flex;
        &:not(.query-form--editing) {
          textarea:hover {
            cursor: pointer;
            color: $core-vibrant-blue;
          }
        }
        .edit-icon {
          position: relative;
          left: 3px;
          top: 13px;
        }
        .query-form__query-name,
        .input-sizer::after {
          font-size: $large;
        }
        .component__auto-size-input-field {
          letter-spacing: -0.5px;
          line-height: 2.3rem;
          padding-top: 2px;
        }
      }
      .query-description-wrapper {
        display: flex;
        padding-top: $pad-small;
        &:not(.query-form--editing) {
          textarea:hover {
            cursor: pointer;
            color: $core-vibrant-blue;
          }
        }
        .edit-icon {
          position: relative;
          left: 3px;
          top: 0;
        }
      }
      .edit-icon {
        width: 14px;
        height: 14px;
        opacity: 1;
        transition: opacity 0.2s;
        &.hide {
          opacity: 0;
        }
      }
    }

    .author {
      flex-shrink: 1;
      margin-top: 24px;
      text-align: right;
      justify-content: right;
      white-space: nowrap;

      b {
        text-align: right;
      }

      img,
      div {
        display: flex;
        align-items: center;
      }

      span {
        padding-left: $pad-small;
      }
    }
  }

  &__query-name,
  &__query-description {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    resize: none;
    white-space: normal;
    background-color: transparent;
    &:hover:not(.focus-visible):not(.no-hover) {
      color: $core-vibrant-blue;
      cursor: pointer;
    }
    &.focus-visible {
      outline: 0;
      cursor: text;
    }
  }

  &__query-name {
    margin-top: 0;
    font-size: $large;

    &.input-field--error {
      border: 1px solid $core-vibrant-red;
    }
  }

  &__query-description {
    margin-top: 0;
    font-size: $x-small;
  }

  &__query-observer-can-run-wrapper {
    margin: 0;
    margin-top: $pad-large;
    font-weight: $bold !important; // override checkbox default

    & + p {
      margin: 0;
      margin-top: $pad-small;
    }
  }

  &__button-wrap {
    margin: 0;
    margin-top: $pad-large;

    &--new-query {
      display: flex;
      align-items: center;
    }
    &--modal {
      display: flex;
      justify-content: flex-end;
      align-items: center;
    }
    button:not(:first-of-type) {
      margin-left: $pad-medium;
    }
  }

  &__button-wrap--save-query-button:first-child {
    margin-right: $pad-medium;
  }

  &__button-wrap--save-query-button:not(:first-child) {
    margin-left: $pad-medium;
  }

  &__save-query-btn,
  &__cancel-btn {
    margin-right: $pad-xsmall;
  }

  &__title {
    color: $core-fleet-black;
    display: inline-block;
    font-size: $large;
  }

  &__loading-overlay {
    display: flex;
    flex-grow: 1;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1;
    align-items: center;
  }
}
