How to calculate a electrolytic capacitor based on current and voltage to have the smallest ripple
How do I calculate minimum capacity of the electrolytic capacitor
  based on current and voltage to have the smallest ripple?


Smallest ripple is when capacitance is theoretically infinite. You have to accept that there will be ripple and you have to decide how much this ripple can be: -



Taken from here


  How do I know the wattage on AC line? I know that the DC wattage is
  around 25W (313V*0.08A).


The wattage taken from the AC power line is probably a few percent more than what is consumed in the DC circuits you have attached. Power in = power out + losses in rectifier and smoothing capacitor.