She was overjoyed when the wallet she'd given up for lost turned up.

Literal

Lost [quotative-と] was-giving-up wallet [subject-が] was-found [and] she [topic-は] greatly was-pleased.

Long embedded clause 無くなったとあきらめていた modifies 財布. あきらめる ('to give up') in ~ていた past progressive. A complete narrative moment in one sentence.