The CSS :has() selector
The :has() selector is really powerful and has so many interesting use cases. If you're looking to get a better understanding of how it works and what can do, you'd be hard pressed to find a better article than this one by Ahmad Shadeed:
Update 19/03/2024
Here are some more cool use cases from Andy Bell: