"madra" is of the fourth declension
confirmed by the dictionary, which also shows its male...
rules for fourth declension are here
so, "madra" nom. sing. has modified to "madra" gen. sing.
No other rules apply because no articles nor possessives are present
It says "pending approval". So tearma.ie is considering someone's submission. They haven't decided yet.
Foclóir is the most up-to-date source for vocab.
"Bia madraí" is the logical construction because it is food suitable for dogs not just one dog. "Bia madra" is a calque, i.e., a direct translation from English.
At the very least, Duolingo should make "bia madraí" an acceptable alternative answer.
PS: I've lodged a complaint with tearma.ie about the error.