What are the rules when using someone's name when refering to them as Pan/Pani/Panie. I think the name Maria changes to Pani Mario? I want to know in a more general sense how to change the name endings.
Your question in the example "Pani Mario!" concerns the use of the vocative feminine, whereby "Maria" becomes "Mario".
"Pan" is used in simple commands ("Chodz Pan!" = Come!) or indicative sentences ("Tujest Pan Kowalski."= This is Mr. Kowalski. or "Czy pan jest inzenyerem?" = Are you an engineer, sir?)
"Pani" is the female form for the above. "Panie" is the vocative (seventh case!) masculine, e.g. "Serwus, Panie Witoldzie!" = Greetings, Witold!
The changes are numerous depending of course upon the respective case:
Dzien dobry, Panu Kowalskiemu! = (Dat. masc. "Good evening, Mr. Kowalski!" Gdzie jest Pan Kowalski? = nom. masc. "Where is Mr. Kowalski?" To jest ksziaska Pana Kowalskiego. = gen. masc. "Here is Mr. Kowalski's book. Panie Kowalski, pozdrawiam! voc. masc. = Greetings to you, Mr. Kowalski!
The rest is rather extensive. This is just an intro. Powodzenia!
When I visit family they appear to say as if to call the person - to get there attention. Pani (name). I thought it was a respect thing. There name didn't change when using it. I thought it meant miss ans pan was mr.
I've heard my dad say for pardon/what as well before.
Marek you said Dzien dobry, Panu Kowalskiemu! = (Dat. masc. "Good evening, Mr. Kowalski!" Would I say Dzien dobra as I'm female or does it dempend if you say it to man or woman.
As to your question about "Dzien dobra!" for a woman as opposed to a man, this NEVER would happen in Polish (save as some sarcastic linguistic joke). The male/female thing in gender changes, occurs solely in the past tenses of verbs, e.g. "Ja spalem" (I was sleeping - masculine) vs. "Ja spalam" for the feminine.
you always say "dzień dobry". the adjective "dobry" (=good) has to be in masculine form because it is concorded with the noun "dzień" (=day), it has NOTHING to do with pan/pani or whatever you put after the greeting.
I just realize where you may be coming from
you treat the word dobra as a noun in Genetive form? there's a noun "dobro" (good) as opposed to "zło" (evil), and it has indeed the Genetive "dobra", but it's not what it's here, here it's the adjective "dobry" (dobra would be feminine form, dobre neuter), you don't say, when greeting someone, "day of the good" even in English :)
There is a term 'dobra' which is rendered as O.K., I agree, it is understood ect. Skonczyles ten list? Tak, dobra..is an example of a colloquial form used very often in day to day Polish. However, the term dzien dobra I have never heard as such and is never used in Polish as dzien is a masculine noun. Ja jestem dobra would be correct when spoken by a lady though.