Just so I understand this, the space between the selectors separates them instead of looking for modal-lg attached to the component with the role attached?
The space between means you are trying to select a descendant of the first class. So this:
.anvil-role-xl-alert .modal-lg {
}
is looking for elements with the modal-lg class that have a parent with the anvil-role-xl-alert class. Removing the space, however, means you are selecting elements that have both of those classes.
I hope that makes sense. May I suggest this handy guide to using CSS in Anvil? It has a section on CSS selectors and was written by some really cool person: