Refactored Modal and Widget visibility logic to use opacity instead of `display`

- Due to issue calculating heights of elements with hidden (display: none) parents