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

  .usa-input {
    margin: 0 ($gap * 4) 0 0;
    flex-grow: 2;
  }

  .application-edit__env-list-item-block {
    flex-grow: 1;
  }

  .application-edit__env-list-item__remover {
    @include icon-link;
    @include icon-link-vertical;
    @include icon-link-color($color-red, $color-red-lightest);

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

.app-team-settings-link {
  font-size: $small-font-size;
  font-weight: $font-normal;
}

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

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

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

  .environment-role__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;

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

      .icon-link {
        padding: 0;
      }

      .environment-role__user-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;
          }
        }
      }
    }

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

.environment-roles-new {
  margin-top: 5 * $gap;
  margin-bottom: 8 * $gap;

  .usa-input {
    margin: 2rem 0 2rem 0;

    .usa-input__title-inline {
      line-height: $hit-area;
    }

    legend {
      font-size: $lead-font-size;
      padding: 0;
    }
  }

  .form-row {
    margin: 0;
  }
}

.environment-roles-new__head {
  font-weight: $font-bold;
}

.environment-name--gray {
  font-weight: $font-normal;
  color: $color-gray-medium;
}

.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);
    }
  }
}
