/*
 * EDD MPESA Checkout Styles for EDD 3.0+ Blocks Checkout
 * Hides and shows the correct fields based on the selected payment gateway.
 */

/*
 * By default, hide ALL payment-specific fields.
 * The checkout.js script will add a body class (e.g., 'edd-gateway-mpesa')
 * which we will use to show only the correct fields below.
 */
#edd_cc_fields,
#edd-mpesa-fields-wrap {
    display: none;
}

/*
 * Show the M-PESA phone number field ONLY when M-PESA is selected.
 */
body.edd-gateway-mpesa #edd-mpesa-fields-wrap {
    display: block;
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

/*
 * Show the default Credit Card / PayPal fields ONLY when PayPal Commerce is selected.
 * This ensures that when you switch back to PayPal, its fields reappear.
 */
body.edd-gateway-paypal_commerce #edd_cc_fields {
    display: block;
}

