.elementor-12402 .elementor-element.elementor-element-2a18655d{--display:flex;}:root{--page-title-display:none;}/* Start custom CSS for container, class: .elementor-element-2a18655d */<script>
 jQuery(function ($) {
  'use strict';
  $(document).ready(function () {

    const total_el = document.getElementById("wpforms-12413-field_31");
            const init_payment = document.getElementById("wpforms-12413-field_32");
            const est_ins_cov = document.getElementById("wpforms-12413-field_33");
            const term_el = document.getElementById("wpforms-12413-field_34");
            const display_el = document.getElementById("palc_payment_amount");
            const pay_in_full = document.getElementById("wpforms-12413-field_29_1");

    total_el.addEventListener('input', function () {
      updateAmountDue();
    });

    init_payment.addEventListener('input', function () {
      updateAmountDue();
    });
    est_ins_cov.addEventListener('input', function () {
      updateAmountDue();
    });
    term_el.addEventListener('input', function () {
      updateAmountDue();
    });
    pay_in_full.addEventListener('input', function () {
      updateAmountDue();
    });

    // const parentInit = est_ins_cov.closest(".wpforms-field-number");
    const parentTermEl = term_el.closest('.wpforms-field-number');
    let monthlyCost = '';

    function updateAmountDue() {
      const n = total_el.value;

      if (pay_in_full.checked) {
        parentTermEl.style.display = 'none';
        monthlyCost = (n - init_payment.value - est_ins_cov.value) * 0.96;

        let checkVal =
          monthlyCost == 0
            ? `Your total cost with 5% discount could be <span> $${monthlyCost}</span>`
            : `Your total cost with 5% discount could be <span> $${monthlyCost.toFixed(
                2
              )}</span>`;

        display_el.innerHTML = checkVal;
      } else {
        parentTermEl.style.display = 'block';
        let t = parseInt(term_el.value, 10) || 1;
        let e = (n - est_ins_cov.value - init_payment.value) / t;
        let checkVal =
          e == 0
            ? `Your monthly payment could be  <span> $${e}/Month </span>`
            : `Your monthly payment could be  <span> $${e.toFixed(
                2
              )}/Month </span>`;

        display_el.innerHTML = checkVal;
      }
    }

    updateAmountDue();
  });
});

    
</script>/* End custom CSS */