Hirhur Divrei Torah Lifnei Ervah
I know that the Chayei Adam and others pasken that hirhur divrei Torah lifnei ervah is mutar, but would that include a bathroom, or is that a separate problem of ruach raah? Also, does the modern day idea of listening to recorded shiurim fall into the category of hirhurim? Would one be able to listen to a shiur lifnei ervah or in the bathroom, if that is any different?
Hirhur divrei Torah in a bathroom or any other place where there is commonly found excrement is forbidden by Torah law. This includes listening to shiurim. Only in front of ervah is hirhur permitted, which would include shiurim.
The gemara in Shabbos 150a differentiates between the prohibition of Dvarim Shebkdusha in front of Ervah and in front of Tzoah. Even though Hirhur does not have the status if dibur, for tzoah there is a passuk which adds hirhur in the prohibition as well, as opposed to ervah where only dibbur is prohibited. See Biur Halacha 47:4 s”v המהרהר, and Siman 73 in the introduction of the Biur Halacha.