/*
Theme Name: Avada Child Theme
Template: Avada
Author: Huaiqing Han
Version: 1.0
*/
/* Apply styles ONLY on the WooCommerce checkout page */


body.woocommerce-checkout .checkout .shop_table tfoot th {
    text-align: left !important;
    width: 20% !important;
}

body.woocommerce-checkout #shipping_method {
    font-size: 12px !important;
}

body.woocommerce-checkout .checkout .shop_table tfoot td {
    width: 80% !important;
}

/* Custom Radio Button Styles (Green dot inside Yellow Circle) */
body.woocommerce-checkout #shipping_method input[type="radio"],
body.woocommerce-checkout .input-radio {
    appearance: none; /* Remove default styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    background-color: white;
    cursor: pointer;
    border: 2px solid yellow; /* Yellow circle */
    width: 18px;
}

body.woocommerce-checkout #shipping_method input[type="radio"]:checked::before,
body.woocommerce-checkout .input-radio:checked::before {
    content: "";
    width: 10px;
    height: 10px;
    background-color: green; /* Green dot */
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Padding for Shipping Method Labels */
body.woocommerce-checkout .fusion-woo-checkout-order-review-tb ul.woocommerce-shipping-methods li label {
    padding-left: 5px !important;
}

/*Cart Fix*/

/* Ensure the shipping title (th) is aligned and takes full width */
body.woocommerce-cart .woocommerce-shipping-totals th {
    text-align: left;
    font-weight: bold;
    padding-bottom: 5px;
    vertical-align: top; /* Ensure it aligns properly with the td */
}

/* Ensure the td container remains structured */
body.woocommerce-cart .woocommerce-shipping-totals td {
    padding-top: 5px;
}

/* Ensure the shipping methods align below the title */
body.woocommerce-cart .woocommerce-shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Adjust spacing between options */
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Ensure radio buttons and labels are properly aligned */
body.woocommerce-cart .woocommerce-shipping-methods li {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 5px 0;
}

/* Ensure radio buttons are aligned */
body.woocommerce-cart .woocommerce-shipping-methods input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0; /* Prevents radio buttons from shrinking */
}

/* Ensure labels appear next to the radio buttons and take up remaining space */
body.woocommerce-cart .woocommerce-shipping-methods label {
    font-size: 14px;
    cursor: pointer;
    flex-grow: 1; /* Allows labels to expand fully */
}

/* Ensure the entire shipping section maintains correct spacing */
body.woocommerce-cart .woocommerce-shipping-totals {
    padding: 10px 0;
    border-top: 1px solid #ddd; /* Optional: adds separation */
}

/* Fix shipping row alignment */
body.woocommerce-cart .woocommerce-cart-form__cart-item td,
body.woocommerce-cart .woocommerce-cart-form__cart-item th {
    vertical-align: middle; /* Prevents misalignment of cart items */
    text-align: left;
}

/* Responsive Fix */
@media (max-width: 768px) {
    body.woocommerce-cart .woocommerce-shipping-methods li {
        flex-wrap: wrap;
        gap: 5px;
    }
}

