to have one's head in the clouds
O aluno foi mal na prova porque a única coisa que fazia era andar nas nuvens durante as aulas.
The student did poorly because the only thing he did was daydream during class.
Andar nas nuvens ("to walk in the clouds") draws on the age-old image of clouds as something high, distant and out of reach. Someone whose mind is up there has drifted away from the solid ground of the here and now.
Falando's Idiom Trainer teaches you to recognize idiom meanings and create sentences using them, so you can speak like a Brazilian.