I wouldn’t feel guilty or worried about the flu medicine. You’ve gotta take care of yourself. It’s certainly likely it affected your fast but this is abnormal circumstances. As for the window of eating. Do what you prefer. If you want to go 2-10 some days and be strict on the eating window time that’s up to you but consider that then your fasting window will be shorter the next day if you break at your usual 12 o’ clock and I think the fasting window matters more than the eating window. I personally try to stick to 1- 7 but I also don’t want fasting to interfere with my social life. My only hard and fast rule is to eat only twice a day. If that means some weekends I may have brunch with friends at 11:30 or dinner at 8 that’s fine. I want IF to be a sustainable way of eating and I think to be sustainable you need to decide what flexibility to allow yourself so you don’t give up.
If the cold/flu medicine you took had sugar, then it broke your fast. If it was in pill form, much less likely to have broken it. If you’re doing IF for fat loss, I wouldn’t worry about pills (unless they contain sugar as filler). Hope you feel better soon!
Oh, about the second part: if you eat too close to bedtime, you’re robbing your body of its ability to fully rest and repair because it needs to take time for digestion. As long as you have at least 2 hours between your last meal and bedtime (4 is better), you can make your eating window whatever you want.
Personally, I would focus on fully recovering from the flu. Stick to your feeding/fasting windows the best your can (aka, don’t use the flu as an excuse to binge) and take medication whenever you need it.
Sometimes I get indigestion. If I need a tum I am eating it, breaking my fast or not. Sometimes you gotta do what you gotta do, fast or no fast. I’m not going to live my life in misery because it will break my fast. To each their own, but I would not feel any sort of guilt over taking cough syrup.