Many years ago, I read part of the Shepherd of Hermas. I don't want to argue for how legitimate the writing is, but it is interesting. In it, Hermas is reproved of sinning for his thoughts about a woman.
If a man looks on a woman to desire her-- to be his wife without thinking sexual thoughts-- is this also committing adultery in his heart? A man is not to covet his neighbor's wife.
1:1 The master, who reared me, had sold me to one Rhoda in Rome. After many years, I met her again, and began to love her as a sister.
1:2 After a certain time I saw her bathing in the river Tiber; and I gave her my hand, and led her out of the river. So, seeing her beauty, I reasoned in my heart, saying, "Happy were I, if I had such an one to wife both in beauty and in character." I merely reflected on this and nothing more.
If a man looks on a woman to desire her-- to be his wife without thinking sexual thoughts-- is this also committing adultery in his heart? A man is not to covet his neighbor's wife.