Add IF ELSE statements to PHP code, to specify colour change in text

I currently have a WordPress plugin installed, which sends an email to the owner listing “Key Dates” and their details.

Currently, if the due date has already passed, it will change the text to Red on the email, stating Originally Due on X date (as below screenshot)

Current Email Template

I would like to make a small modification to this, where the text is coloured as below:

Due within 30days – Green

Due within 15days – Yellow

Due less than 15 days/Overdue – Red

I think I need to add some IF/ELSE statements to the below code in the “propertyhive-email-schedule.php” file, however I am not quite sure of the correct code:

$details = '';
                            $schedule_start_date = new DateTime($start_date);
                            if ( $due_date < $schedule_start_date )
                            {
                                // was due in the past
                                $details = '<span style="color:#900">' . __( 'Originally due on', 'propertyhive' ) . ' ' . $due_date->format('jS M') . '</span>';

Could I please get some assistance/pointers on the correct code to put in over here please to make the changes stated above?
The PHP file itself is not too big, happy to attach the entire file if it makes it easier?

Thanks!