Hello Friend. Let me take a moment to review your question.
If I understand correctly, you are having some difficulties with your relationship with your daughter and you are a single mom. It can be a difficult time when your daughter becomes a teenager because they are typically pushing mom away one day, then needing you the next. It can be very confusing, not to mention the hormonal fluctuations that occur and brain changes in the teenage brain.
I understand that it may feel scary to lose her to Dad and to a long court case. You sound like you really want whats best for her and you are a good mom. I would definitely start with therapy between you and your daughter. Find a therapist who specializes in adolescents, and make an appointment for you and your daughter to come in.
With a good therapist, they should talk to you both together, and then let your daughter have alone time with him/her. That way, she will have a safe place to talk about her feelings, and the two of you will have an objective person to mediate the conflicts between you. If you later need to bring in Dad, you can, but I would start with the two of you.
I hope this helps. As I said, you sound like a good, caring mom who wants a good relationship with your daughter, which is great! Keep up the good work, and let me know if there is anything else I can do to help.
Take good care, Dr. Brown