FB 851 then BA 460 at Heathrow
Sofia → London → Madrid
Timetable, London time
12:10FB 851 from Sofia at the gate
08:45BA 460 to Madrid leaves the gate
20 h 35 apart on the timetable, overnight
BA 460 leaves 20 h 35 after FB 851 arrives on the timetable: more than half a day, so not a connection we count.