Custom Record Rules: Add a background and tweak the layout

(cherry picked from commit 59dd188cd0cafb46b15151827099278df17eae57)