Over the last few years, contentious public debates have emerged on issues involving religious liberty, traditional values and civil rights for LGBT people, including whether wedding-related businesses should be required to provide their services to same-sex couples, and – more recently – over the use of public restrooms by transgender people.

Indiana Gov. Mike Pence and Sen. Tim Kaine (D-Va.) could face questions about these issues in the vice presidential debate tonight. Pence, a Republican, signed a state law in 2015 that provides a legal defense for business owners who deny services to LGBT couples on religious grounds.

The general public is close to evenly divided on both of these issues, according to a Pew Research Center study released last week. There also are deep religious and demographic clevages, including wide partisan divisions, over both issues.

Clear majorities of Democrats and independents who lean Democratic say that, regardless of religious objections, those providing wedding services should treat same-sex couples the same as other customers (67%), and that transgender people should be able to use facilities for the gender with which they currently identify (68%). In contrast, similar-sized majorities of Republicans and Republican leaners say that wedding-related business owners should be able to refuse service to same-sex couples on religious grounds (71%), and that transgender people should be required to use the public restrooms of the gender they were assigned at birth (67%).

Within both parties, there also are sizable internal divisions. Among Republicans, there are age and gender differences on each of these issues. And Democrats are split along racial lines on both.

Younger Republicans – whose support for legalizing same-sex marriage has consistently exceeded that of older Republicans – are less likely than their older counterparts to say that business owners should be able to refuse to provide wedding services to same-sex couples. Still, a 58% majority of Republicans under age 30 say this (compared with about three-quarters of older Republicans).

Nearly eight-in-ten Republican men (78%) say businesses should be able to refuse their services to same-sex couples on religious grounds, a view shared by smaller majority (64%) of GOP women.

By comparison, just three-in-ten Democrats overall, including comparable shares of men and women and younger and older Democrats, think owners of wedding-related businesses should be permitted to refuse services to same-sex couples on religious grounds. However, black Democrats are more likely than white Democrats to say this (43% vs. 27%).

The issue of public bathroom use by transgender people follows the same pattern, with older Republicans substantially more likely than younger Republicans to say that transgender people should be required to use the bathroom of the gender they were assigned at birth.

Republicans under age 30 are the only group of Republicans evenly divided on this question: 52% say transgender people should be able to use bathrooms of the gender with which they currently identify, while 45% think they must use the bathroom of their birth gender. No more than about a quarter of older Republicans favor allowing transgender people to use the public bathroom of the gender with which they identify.

While most Democrats say transgender people should be free to use the restrooms that match their current gender identity, white Democrats are more likely than black Democrats to say this: 79% hold this view, compared with a smaller majority (55%) of black Democrats.

Rob Suls  is a former research associate who focused on U.S. politics and policy research at Pew Research Center.