Capital Gains and resultant action

Hi
I have the below scenario in my portfolio for HDFC Bank Shares. Please help me with the Capital gains and the resultant action on them

Date Quantity Price Remarks
01 April 2024 30 1470.69 Buy
05 April 2024 20 1557.61 Buy
29 May 2024 10 1515.83 Buy
26 August 2025 60 0 Bonus (1:1)

I had total 120 Quantity

I have sold 20 Shares on 25 September 2025 at a price of ₹ 944.

Then what will be the effect on Capital Gains and what price will be considered here ? Will it be considering the Actual Buying Price of the First 30 shares or will it be considering the Average Price of all 120 shares ? Also will there be a net gain or net loss on this transaction ?

Thanks