FR 6814 then FR 2066 at Madrid
Manchester → Madrid → Ibiza
Timetable, Madrid time
20:00FR 6814 from Manchester at the gate
14:40FR 2066 to Ibiza leaves the gate
18 h 40 apart on the timetable, overnight
FR 2066 leaves 18 h 40 after FR 6814 arrives on the timetable: more than half a day, so not a connection we count.