Resignation when a draw is offered In a recent online game, I offered a draw when the endgame is clearly drawing. To my surprise, instead of replying to my draw offer, my opponent resigned. I have no idea why they did so and my best guess is a misclick.
I am brainstorming and I guess there might be some possible scenarios that one may resign when a draw is offered:

In a tournament, if winning is the only meaningful result for a player while drawing and losing make virtually no difference to them. Seeing winning is hopeless, they may resign instead of accepting the draw offer.
A player is clearly losing while his opponent who does not need to win the game, or in a hurry to leave, offered a draw. Embarrassesd at this draw offer, the player chooses to resign instead.
A player chooses to lose a game on purpose, such as keeping their rating lower so that they can enter some tournament with a restriction on rating.

I have two questions related to this:

When a draw is offered, can a player resign as a reply? I think it should be technically legal for them to decline the draw offer first and resign on the next move, but is it legal to reply with resignation when a draw is offered?
Though extremely rare, is it considered unsporting (if legal at all) to resign at a draw offer?
is it legal to reply with resignation when a draw is offered?

Of course. This is all that the FIDE Laws of Chess has to say about resignation:

5.1.2 The game is won by the player whose opponent declares he resigns. This immediately ends the game.

You can resign at any time during the game. It doesn't even need to be your turn. I have done this. I once played a move that would blunder my queen, realized as I pressed the clock and immediately resigned before my opponent could play the move I missed.

is it considered bad sportsmanship ... to resign at a draw offer?

No. Why should it be? There are some circumstances where it could be considered good sportsmanship. Suppose, in the last round of a tournament, player A requires just a draw to win the tournament outright and offers his opponent, player B, a draw in a completely winning position. Player B could accept the draw but it might be more sporting to just resign.