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