Adam stunned people at Laracon with this CSS rule. Almost no one had heard of it.
isolation: isolate;
(Tailwind: class="isolate")
Creates a new isolated stacking context so you aren’t creating global z-index coordination bugs.
Once you understand the CSS `isolation` property, you'll basically never wrestle with `z-index` issues again.
Quick one that will fix 99% of your problems — throw `isolate` on your main layout container, so any portaled elements are guaranteed to be in another stacking context.