The blue box (in chrome) is the focus outline and is an accessibility aid for keyboard users to show what is in focus. If you remove it then keyboard users won’t be able to follow the link that is around that image very easily.
It can be removed with:
#dialog-modal a{outline:none}
Usually you don’t want to mess with focus styles as I said above.
Also, if anyone knows how to make the modal close by clicking out side it, I would appreciate your help.
That’s really a JS question but I think something like this should work. Add the part shown in bold:
Hehe, that’s if they can get to the link via the keyboard in the first place, which is often a herculean (if not impossible) task with a lot of these modal features.