.application-edit__env {
  &-list-item {
    display: flex;
    flex-direction: row;
    align-items: flex-end;

    &-block {
      flex-grow: 1;
    }

    &__remover {
      @include icon-link;
      @include icon-link-vertical;
      @include icon-link-color($color-red, $color-red-lightest);

      margin-bottom: 0;
      margin-right: -$gap;
    }

    .usa-input {
      flex-grow: 2;
    }
  }
}

#modal--add-app-mem,
.form-content--app-mem {
  text-align: left;

  .modal__body {
    min-width: 75rem;
  }

  input[type="checkbox"] + label::before {
    margin-left: 0;
  }

  .input__inline-fields {
    text-align: left;

    .usa-input__choices label {
      font-weight: $font-bold;
    }
  }

  .input__inline-fields {
    padding: $gap * 2;
    border: 1px solid $color-gray-lighter;

    &.checked {
      border: 1px solid $color-blue;
    }

    label {
      font-weight: $font-bold;
    }

    p.usa-input__help {
      margin-bottom: 0;
      padding-left: 3rem;
    }
  }

  .application-member__user-info {
    .usa-input {
      width: 45rem;

      input,
      label,
      .usa-input__message {
        max-width: unset;
      }

      label .icon-validation {
        left: unset;
        right: -$gap * 4;
      }

      &--validation--phoneExt {
        width: 18rem;
      }
    }
  }
}

.environment-roles {
  padding: 0 ($gap * 3) ($gap * 3);

  &-new {
    margin-top: 5 * $gap;
    margin-bottom: 8 * $gap;
    text-align: left;

    .form-row {
      margin: $gap * 2;
    }

    .usa-alert {
      margin: -0.5em 0;
      padding: $gap;
      background-image: unset;

      &-body {
        padding: 0;
        width: 100%;
        display: unset;
      }
    }

    .usa-input {
      &__title-inline {
        font-weight: $font-bold;
      }

      &__help {
        margin-bottom: 0;
      }

      &.env-role__no-access {
        .usa-input__title-inline,
        .usa-input__help {
          color: $color-gray;
        }
      }

      &__choices {
        &.revoke-button label {
          padding: 1rem 2rem;

          &::before {
            display: none;
          }

          &.link {
            color: $color-blue;
            text-decoration: underline;
            text-align: right;
          }
        }
      }
    }

    &__head {
      font-weight: $font-bold;
    }

    hr {
      margin: 0.5em 0;
    }
  }
}

.environment-role {
  padding: ($gap * 2) 0;

  h4 {
    margin-bottom: $gap / 4;
  }

  &__users {
    background-color: $color-gray-lightest;
    padding: ($gap * 1.2) ($gap * 0.6);
    font-size: $small-font-size;
    display: flex;
    flex-wrap: wrap;

    .environment-role__user {
      background-color: $color-white;
      border-radius: 0.5rem;
      padding: ($gap / 2) $gap;
      border: solid 2px $color-blue;
      margin: $gap;
      white-space: nowrap;
      width: 20rem;
      position: relative;
      height: 3.6rem;

      &-field {
        position: absolute;
        background-color: $color-white;
        margin-top: $gap * 2;
        padding: $gap;
        left: -0.1rem;
        border: solid 1px $color-gray-light;
        width: 20rem;
        z-index: 3;

        .usa-input {
          margin: 0;

          li {
            background-color: $color-white;
            border: none;
          }
        }
      }

      &.unassigned {
        border: solid 1px $color-gray-light;
      }

      .icon-link {
        padding: 0;
      }
    }

    .environment-role__no-user {
      margin: $gap;
      padding: ($gap / 2) $gap;
      font-weight: $font-normal;
      height: 3.6rem;
    }
  }
}

.application-list-item {
  .usa-button-primary {
    width: $search-button-width * 2;
  }

  .action-group-cancel {
    position: relative;

    .action-group-cancel__action {
      position: absolute;
      right: $search-button-width * 2 + $gap * 2;
      top: -($gap * 8);
    }
  }
}
