Updated to find button div element for visibility checking