.policy-form {
  &__platform-selector {
    // override component style
    padding-bottom: 0;
  }
  &__wrapper {
    position: relative;
    font-size: $x-small;

    .policy-page__warning {
      margin: 0;
      margin-bottom: $pad-large;
    }

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

  &__title-bar {
    display: flex;
    justify-content: space-between;
    gap: $pad-large;
  }

  &__policy-name {
    color: $core-fleet-black;
    font-size: $large;
    line-height: $line-height-large;

    // Future iteration: move size="large" into AutoSizeInputField isntead of styling here
    .policy-form__policy-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;
    }
  }

  &__author {
    align-items: right;

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

  .input-field,
  .input-field__text-area {
    min-height: auto;
    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;
    height: 18px;
  }

  &__policy-name,
  &__description,
  &__resolution {
    .button--text-icon {
      // override global form button margin adjustment
      margin: 0;
    }
  }

  &__policy-name-wrapper,
  &__policy-description-wrapper,
  &__policy-resolution-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    width: fit-content;
    &:not(&--editing) {
      &:hover {
        cursor: pointer;
        * {
          color: $core-fleet-green;
          cursor: pointer;
        }
      }
    }
    &--disabled-by-gitops-mode {
      @include disabled;
    }
  }

  &__policy-name-wrapper {
    .no-value {
      min-width: 112px;
    }
  }

  &__policy-description-wrapper {
    .no-value {
      min-width: 106px;
    }
    .edit-icon {
      position: relative;
      top: 0;
    }
  }
  &__policy-resolution-wrapper {
    .no-value {
      min-width: 106px;
    }
  }
  &__edit-icon {
    opacity: 1;
    transition: opacity 0.2s;
    margin-left: 0;
    align-self: initial;
    &--hide {
      opacity: 0;
    }
  }

  &__policy-name,
  &__policy-description,
  &__policy-resolution {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    resize: none;
    white-space: normal;
    background-color: transparent;
    overflow: hidden;
  }

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

  &__autofill-label {
    display: flex;
    justify-content: space-between;
    align-items: center;

    .autofill-tooltip-wrapper {
      display: flex; // Required for vertical centering
    }

    .autofill-button-tooltip {
      font-weight: $regular;
    }
  }

  &__button-wrap {
    &--tooltip {
      display: flex;
    }

    .policy-form__run {
      min-width: 64px;
    }
  }

  &__sql-editor-label-actions {
    display: flex;
    gap: $pad-medium;
  }

  &__platform-checkbox-wrapper {
    margin: 0;

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

    .fleet-checkbox__label {
      transform: translateY(2px);
    }
  }

  &__platform-error {
    font-size: $small;
    font-weight: $bold;
  }

  &__platform-compatibility {
    b,
    img,
    span {
      display: flex;
      align-items: center;
    }

    .platforms-text {
      padding: 0 $pad-small;
    }

    .platforms-select {
      display: flex;
      padding: 0 $pad-medium;
    }

    img {
      height: 16px;
      width: auto;
    }

    button {
      img {
        padding: 0px;
      }
    }

    form,
    label {
      display: inline-flex;
    }

    label {
      font-weight: $regular;
      margin-right: $pad-medium;
    }
  }

  &__sql-editor-label-actions {
    display: flex;
    gap: $pad-large;
  }

  &__critical-checkbox-wrapper {
    // override form child width: 100%
    width: auto;
    .form-field--checkbox {
      margin-bottom: 0;
    }
  }
}
