How to display search block in a modal dialog
You can use Lightbox or Colorbox (there are modules for both).

Each has the ability to display inline content in a modal.

All you would need to do is add your search block to the page and hide it with CSS, then adjust your search button link to trigger the lightbox/colorbox.

If using colorbox, you would do something like the following:


  Load content in a Colorbox
  
  Check the "Enable Colorbox load" option in Colorbox settings.
  
  This enables custom links that can open content in a Colorbox. Add the
  class "colorbox-load" to the link and build the url like this
  "[path]?width=500&amp;height=500&amp;iframe=true" or
  "[path]?width=500&amp;height=500" if you don't want an iframe.
  
  If you want to pass the width and height of the Colorbox as a
  percentage (useful for responsive designs), you can format the link
  like this "[path]?width=90%25&amp;height=90%25&amp;iframe=true" or
  "[path]?width=90%25&amp;height=90%25", where the "%25" is the HTML entity
  for "%".
  
  Other modules may activate this for easy Colorbox integration.