While i was in Makkah my period occurred while in the mosque and we were really far from the hotel so i was determined to pray all the prayers with my parents in the mosque for i couldn't go back or stay alone knowing that i am a 17 yrs old girl. The question is, what i have done is counted as a sin or as a neglect of my religion?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The scholars stated that a woman in menses is not allowed to stay in the mosque as the Prophet said: “I do not make the mosque lawful for a woman in menses or a person in a state of sexual defilement.” [Abu Daawood]
There is no doubt that if it is forbidden for a woman in menses to stay at any mosque, then it is more forbidden for her to stay at Al-Haraam mosque which is the first house built for people to worship Allah.
Besides, the scholars stated that committing a sin in Al-Harram mosque is not like committing it in any other place.
Therefore, dear sister, you should repent to Allah for what you did and you should know it is more appropriate to be ashamed of Allah and fear Him. From now on, fearing people should not lead you to committing a sin. Know that whoever fears Allah, Allah protects him from every evil and whoever seeks people's pleasure at the expense of Allah's pleasure, he, in fact, leads himself to destruction.
Allah knows best.
You can search for fatwa through many choices