popup: use visibility instead of margin for hide