Fix popup borders for galleries and video