FR 6409 then FR 188 at Madrid
Sofia → Madrid → Edinburgh
Timetable, Madrid time
20:10FR 6409 from Sofia at the gate
10:30FR 188 to Edinburgh leaves the gate
14 h 20 apart on the timetable, overnight
FR 188 leaves 14 h 20 after FR 6409 arrives on the timetable: more than half a day, so not a connection we count.