In this work we study analytic Levi-flat hypersurfaces in complex algebraic surfaces. First, we show that if this foliation admits chaotic dynamics (i.e. if it does not admit a transverse invariant measure), then the connected components of the complement of the hypersurface are modifications of Stein domains. This allows us to extend the CR foliation to a singular algebraic foliation on the ambient complex surface. We apply this result to prove, by contradiction, that analytic Levi-flat hypersurfaces admitting a transverse affine structure in a complex algebraic surface have a transverse invariant measure. This leads us to conjecture that Levi-flat hypersurfaces in complex algebraic surfaces that are diffeomorphic to a hyperbolic torus bundle over the circle are fibrations by algebraic curves.