I want to calculate the algebraic fundamental group of a an algebraic group over a riemann surface over $\mathbb C$ (or a smooth algebraic projective curve). Let me state the first case where $\mathcal G=G\times X$ where $G$ is a linear algebraic group (affine) and $X$ is the curve. Using the Kenneth formula, it suffishs to calculate both $\pi_1(X)$ and $\pi_1(G)$.
Question: For an affine algebraic group $G$,how could one calculate $\pi_1(G)$? in particular what are $\pi_1(GL_r)$, $SL_r$? and $Sp(r)$?
Thanks in advance!