<!-- Embed the iframe and make it responsive -->
<iframe 
    src="path-to-your-uploaded-file/macros_calculator.html" 
    style="border:none; width: 100%; max-width: 1000px; height: 80vh;">
</iframe>

<!-- JavaScript to ensure total calculation after data loads -->
<script>
window.addEventListener('load', function() {
    const totalElement = document.getElementById("total"); // Replace with actual ID of the total element
    const sauceElement = document.getElementById("sauces"); // Replace with actual ID of the sauce element

    function checkDataAndCalculate() {
        // Ensure sauce data is loaded before calculating total
        if (sauceElement && sauceElement.loaded) {
            // Now, perform the total calculation
            calculateTotal(); // Replace with the actual function to calculate total
        } else {
            setTimeout(checkDataAndCalculate, 500); // Retry in 500ms if data is not yet loaded
        }
    }

    // Start checking when everything is loaded
    checkDataAndCalculate();
});
</script>