I simple unbidden feeling of attraction, if you do not "entertain" it (or permit it to "entertain" you!) and which you do no cooperate with, even in your mind ---- this is a temptation but it is not a sin.
If you cooperate with the thoughts, even just through fantasy, that is a sin. It is an interior act.
I like Mrs. Don-o’s answer. Is this Catholic, Christian, or stock-Christian? (entertaining thought/temptation in the mind being a sin...)
It is plucked straight out of Jewish law, not surprisingly. It’s actually one of my pet peeves against Dennis Prager, who I heard speak once of thinking about sin being not a sin (or a lesser sin.) When Judaism demands control of the actiona, speech, and even the thoughts (after they’ve “popped” into conscious thought.)
Interestingly, we believe the very WILL, which channels the unwanted thoughts, can be changed... which is why I believe the very (supposed) nature of homosexuality can be changed.