/** DO NOT MODIFY THIS FILE. All code here are generated by MachForm Theme Editor **/

#main_body h1 a
{
background-image: url('http://forms.customadecoins.com/images/form_resources/machform.png');
background-repeat: no-repeat;
height: 40px;
}

html
{
background-image: url('http://forms.customadecoins.com/images/form_resources/grey-mild.png');
background-repeat: repeat;
}

#main_body h1
{
background-color: #525252;
background-image: none;
}

#form_container
{
background-color: #ffffff;
border-width: 0px;
border-style: solid;
border-color: #CCCCCC;
}

#main_body form li.highlighted,#main_body .matrix tbody tr:hover td,#machform_review_table tr.alt
{
background-color: #FFF7C0;
}

#main_body form .guidelines
{
background-color: #F5F5F5;
border-width: 1px;
border-style: solid;
border-color: #CCCCCC;
}

#main_body form .guidelines small
{
font-family: 'Lucida Grande','Lucida Grande',Tahoma,Arial,sans-serif;
font-weight: 400;
font-style: normal;
font-size: 80%;
color: #444444;
}

#main_body input.text,#main_body input.file,#main_body textarea.textarea,#main_body select.select,#main_body input.checkbox,#main_body input.radio
{
background-color: #FBFBFB;
font-family: 'Lucida Grande','Lucida Grande',Tahoma,Arial,sans-serif;
font-weight: 400;
font-style: normal;
font-size: 100%;
color: #666666;
}

#machform_review_table td.mf_review_value
{
font-family: 'Lucida Grande','Lucida Grande',Tahoma,Arial,sans-serif;
font-weight: 400;
font-style: normal;
font-size: 100%;
color: #444444;
}

#main_body .form_description h2,#main_body .form_success h2
{
font-family: 'Lucida Grande','Lucida Grande',Tahoma,Arial,sans-serif;
font-weight: 400;
font-style: normal;
font-size: 160%;
color: #444444;
}

#main_body .form_description p,#main_body form ul.payment_list_items li
{
font-family: 'Lucida Grande','Lucida Grande',Tahoma,Arial,sans-serif;
font-weight: 400;
font-style: normal;
font-size: 95%;
color: #444444;
}

#main_body form li span.ap_tp_text
{
color: #444444;
}

#main_body form li label.description,#main_body form li span.description,#main_body .matrix caption,#main_body .matrix td.first_col,#main_body form li.total_payment span,#machform_review_table td.mf_review_label
{
font-family: 'Lucida Grande','Lucida Grande',Tahoma,Arial,sans-serif;
font-weight: 700;
font-style: normal;
font-size: 95%;
color: #444444;
}

#main_body form li span label,#main_body label.choice,#main_body .matrix th,#main_body form li span.symbol,.mf_sigpad_clear,#main_body form li div label,#main_body form li div span.label
{
font-family: 'Lucida Grande','Lucida Grande',Tahoma,Arial,sans-serif;
color: #444444;
}

#main_body form .section_break h3,#main_body form .media h3,#machform_review_table td .mf_section_title
{
font-family: 'Lucida Grande','Lucida Grande',Tahoma,Arial,sans-serif;
font-weight: 400;
font-style: normal;
font-size: 110%;
color: #444444;
}

#main_body form .section_break p,#main_body form .media p,#machform_review_table td .mf_section_content
{
font-family: 'Lucida Grande','Lucida Grande',Tahoma,Arial,sans-serif;
font-weight: 400;
font-style: normal;
font-size: 85%;
color: #444444;
}

#main_body form li.section_break
{
border-top-width: 1px;
border-top-style: dotted;
border-top-color: #CCCCCC;
}



/** Advanced CSS **/

<script>
document.addEventListener('DOMContentLoaded', function () {
    function initCoinPricing() {
        var qtyField = document.getElementById('element_28');
        var displayField = document.getElementById('element_29');

        if (!qtyField || !displayField) {
            return false;
        }

        displayField.readOnly = true;

        function formatMoney(value) {
            return '$' + value.toFixed(2);
        }

        function getPricing(qty) {
            if (qty === 1) {
                return { unitPrice: 24.95, shipping: 4.95 };
            } else if (qty >= 2 && qty <= 9) {
                return { unitPrice: 19.98, shipping: 9.95 };
            } else if (qty >= 10 && qty <= 24) {
                return { unitPrice: 17.76, shipping: 15.95 };
            } else if (qty >= 25 && qty <= 99) {
                return { unitPrice: 15.98, shipping: 29.95 };
            } else if (qty >= 100) {
                return { call: true };
            }
            return null;
        }

        function updatePricing() {
            var qty = parseInt(qtyField.value, 10);

            if (!qtyField.value || isNaN(qty) || qty <= 0) {
                displayField.value = '';
                return;
            }

            var pricing = getPricing(qty);

            if (!pricing) {
                displayField.value = '';
                return;
            }

            if (pricing.call) {
                displayField.value = 'For quantities of 100 or more, please call for pricing and shipping.';
                return;
            }

            var subtotal = qty * pricing.unitPrice;
            var total = subtotal + pricing.shipping;

            displayField.value =
                'Unit Price: ' + formatMoney(pricing.unitPrice) +
                ' | Shipping: ' + formatMoney(pricing.shipping) +
                ' | Subtotal: ' + formatMoney(subtotal) +
                ' | Total: ' + formatMoney(total);
        }

        qtyField.addEventListener('input', updatePricing);
        qtyField.addEventListener('change', updatePricing);
        qtyField.addEventListener('keyup', updatePricing);

        updatePricing();
        return true;
    }

    var tries = 0;
    var maxTries = 50;

    var timer = setInterval(function () {
        tries++;
        if (initCoinPricing() || tries >= maxTries) {
            clearInterval(timer);
        }
    }, 300);
});
</script>