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

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

  &__title-bar {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
  }
  .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 */
  }

  &__query-name-wrapper,
  &__query-description-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    width: fit-content;
    &:not(.edit-query-form--editing) {
      &:hover {
        cursor: pointer;
        * {
          color: $core-fleet-green;
          cursor: pointer;
        }
      }
    }
    &--disabled-by-gitops-mode {
      @include disabled;
    }
  }
  &__query-name-wrapper {
    .no-value {
      min-width: 168px;
    }
  }

  &__query-description-wrapper {
    .no-value {
      min-width: 144px;
    }
  }

  .edit-icon {
    align-self: initial;
    opacity: 1;
    transition: opacity 0.2s;
    &.hide {
      opacity: 0;
    }
  }

  // Author section
  &__author {
    align-items: right;

    img,
    dd {
      display: flex;
      align-items: center;
      gap: $pad-small;
    }
  }

  &__query-name,
  &__query-description {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    resize: none;
    white-space: normal;
    background-color: transparent;
    overflow: hidden;
    &.focus-visible {
      outline: 0;
    }
  }

  // Future iteration: move size="large" into AutoSizeInputField isntead of styling here
  &__query-name-wrapper {
    color: $core-fleet-black;
    font-size: $large;
    line-height: $line-height-large;

    .no-value {
      min-width: 168px;
    }
    .edit-query-form__query-name,
    .input-sizer::after {
      font-size: $large;
      line-height: $line-height-large;
    }
    .component__auto-size-input-field {
      font-size: $large;
      line-height: $line-height-large;
    }

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

  &__query-description {
    color: $ui-fleet-black-75;
  }

  &__button-wrap {
    &--new-query {
      display: flex;
      align-items: center;
    }
  }

  &__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;
  }

  .disabled-by-gitops-mode {
    @include disabled;
  }
}
