height
auto
config
[{"tag":"div","attributes":{"class":"rc-calc"},"children":[{"tag":"h2","attributes":{"class":"rc-title"},"children":[{"text":"Rewards points estimator"}]},{"tag":"div","attributes":{"class":"rc-tabs"},"children":[{"tag":"button","attributes":{"class":"rc-tab active","data-type":"vmp","type":"button"},"children":[{"text":"Virgin Money Points"}]},{"tag":"button","attributes":{"class":"rc-tab","data-type":"vp","type":"button"},"children":[{"text":"Velocity Points"}]}]},{"tag":"div","attributes":{"class":"rc-layout"},"children":[{"tag":"div","attributes":{"class":"rc-steps"},"children":[{"tag":"div","attributes":{"class":"rc-step","id":"rcStepSettlement"},"children":[{"tag":"div","attributes":{"class":"rc-rail"},"children":[{"tag":"div","attributes":{"class":"rc-node"},"children":[{"tag":"svg","attributes":{"class":"rc-icon rc-icon-home","viewBox":"0 0 24 24","aria-hidden":"true"},"children":[{"tag":"path","attributes":{"d":"M4 11.5L12 5l8 6.5","fill":"none","stroke":"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round"},"children":[]},{"tag":"path","attributes":{"d":"M6.5 10.8V19h11v-8.2","fill":"none","stroke":"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round"},"children":[]},{"tag":"path","attributes":{"d":"M10 19v-5h4v5","fill":"none","stroke":"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round"},"children":[]}]}]},{"tag":"div","attributes":{"class":"rc-line"},"children":[]}]},{"tag":"div","attributes":{"class":"rc-step-body"},"children":[{"tag":"h3","attributes":{},"children":[{"text":"Settlement"}]},{"tag":"p","attributes":{},"children":[{"text":"Your biggest reward starts at settlement. Enter your loan amount to estimate how many points you could earn."}]},{"tag":"div","attributes":{"class":"rc-row"},"children":[{"tag":"div","attributes":{"class":"rc-input-card"},"children":[{"tag":"label","attributes":{},"children":[{"text":"Loan amount"}]},{"tag":"input","attributes":{"type":"text","id":"rcLoan","placeholder":"e.g. $600,000","inputmode":"numeric","autocomplete":"off","value":"$600,000"},"children":[]}]},{"tag":"div","attributes":{"class":"rc-pill"},"children":[{"tag":"strong","attributes":{"id":"rcSettlementPts"},"children":[{"text":"0"}]},{"tag":"span","attributes":{"id":"rcSettlementLabel"},"children":[{"text":"settlement pts"}]}]}]},{"tag":"div","attributes":{"class":"rc-help","id":"rcLoanHelp"},"children":[{"text":"Min $20,000"}]}]}]},{"tag":"div","attributes":{"class":"rc-add-wrap","id":"rcAddY1Wrap"},"children":[{"tag":"button","attributes":{"class":"rc-add-btn","id":"rcAddY1","type":"button","aria-disabled":"false"},"children":[{"tag":"span","attributes":{"class":"rc-plus"},"children":[{"text":"+"}]},{"tag":"span","attributes":{"class":"rc-add-text"},"children":[{"text":"Year 1 Anniversary"}]}]}]},{"tag":"div","attributes":{"class":"rc-step","id":"rcStepY1","style":"display:none;"},"children":[{"tag":"div","attributes":{"class":"rc-rail"},"children":[{"tag":"div","attributes":{"class":"rc-node"},"children":[{"text":"1"}]},{"tag":"div","attributes":{"class":"rc-line"},"children":[]}]},{"tag":"div","attributes":{"class":"rc-step-body"},"children":[{"tag":"h3","attributes":{},"children":[{"text":"Year 1 Anniversary"}]},{"tag":"p","attributes":{},"children":[{"text":"Enter your estimated remaining loan balance at this anniversary."}]},{"tag":"div","attributes":{"class":"rc-row"},"children":[{"tag":"div","attributes":{"class":"rc-input-card"},"children":[{"tag":"label","attributes":{},"children":[{"text":"Remaining loan balance"}]},{"tag":"input","attributes":{"type":"text","id":"rcY1","placeholder":"e.g. $500,000","inputmode":"numeric","autocomplete":"off"},"children":[]}]},{"tag":"div","attributes":{"class":"rc-pill"},"children":[{"tag":"strong","attributes":{"id":"rcY1Monthly"},"children":[{"text":"0"}]},{"tag":"span","attributes":{"id":"rcY1MonthlyLabel"},"children":[{"text":"monthly pts"}]}]},{"tag":"div","attributes":{"class":"rc-pill"},"children":[{"tag":"strong","attributes":{"id":"rcY1Ann"},"children":[{"text":"0"}]},{"tag":"span","attributes":{"id":"rcY1AnnLabel"},"children":[{"text":"anniversary pts"}]}]}]}]}]},{"tag":"div","attributes":{"class":"rc-add-wrap","id":"rcAddY2Wrap","style":"display:none;"},"children":[{"tag":"button","attributes":{"class":"rc-add-btn","id":"rcAddY2","type":"button","disabled":"disabled","aria-disabled":"true"},"children":[{"tag":"span","attributes":{"class":"rc-plus"},"children":[{"text":"+"}]},{"tag":"span","attributes":{"class":"rc-add-text"},"children":[{"text":"Year 2 Anniversary"}]}]}]},{"tag":"div","attributes":{"class":"rc-step","id":"rcStepY2","style":"display:none;"},"children":[{"tag":"div","attributes":{"class":"rc-rail"},"children":[{"tag":"div","attributes":{"class":"rc-node"},"children":[{"text":"2"}]},{"tag":"div","attributes":{"class":"rc-line"},"children":[]}]},{"tag":"div","attributes":{"class":"rc-step-body"},"children":[{"tag":"h3","attributes":{},"children":[{"text":"Year 2 Anniversary"}]},{"tag":"p","attributes":{},"children":[{"text":"Enter your estimated remaining loan balance at this anniversary."}]},{"tag":"div","attributes":{"class":"rc-row"},"children":[{"tag":"div","attributes":{"class":"rc-input-card"},"children":[{"tag":"label","attributes":{},"children":[{"text":"Remaining loan balance"}]},{"tag":"input","attributes":{"type":"text","id":"rcY2","placeholder":"e.g. $400,000","inputmode":"numeric","autocomplete":"off"},"children":[]}]},{"tag":"div","attributes":{"class":"rc-pill"},"children":[{"tag":"strong","attributes":{"id":"rcY2Monthly"},"children":[{"text":"0"}]},{"tag":"span","attributes":{"id":"rcY2MonthlyLabel"},"children":[{"text":"monthly pts"}]}]},{"tag":"div","attributes":{"class":"rc-pill"},"children":[{"tag":"strong","attributes":{"id":"rcY2Ann"},"children":[{"text":"0"}]},{"tag":"span","attributes":{"id":"rcY2AnnLabel"},"children":[{"text":"anniversary pts"}]}]}]}]}]},{"tag":"div","attributes":{"class":"rc-add-wrap","id":"rcAddY3Wrap","style":"display:none;"},"children":[{"tag":"button","attributes":{"class":"rc-add-btn","id":"rcAddY3","type":"button","disabled":"disabled","aria-disabled":"true"},"children":[{"tag":"span","attributes":{"class":"rc-plus"},"children":[{"text":"+"}]},{"tag":"span","attributes":{"class":"rc-add-text"},"children":[{"text":"Year 3 Anniversary"}]}]}]},{"tag":"div","attributes":{"class":"rc-step","id":"rcStepY3","style":"display:none;"},"children":[{"tag":"div","attributes":{"class":"rc-rail"},"children":[{"tag":"div","attributes":{"class":"rc-node"},"children":[{"text":"3"}]},{"tag":"div","attributes":{"class":"rc-line"},"children":[]}]},{"tag":"div","attributes":{"class":"rc-step-body"},"children":[{"tag":"h3","attributes":{},"children":[{"text":"Year 3 Anniversary"}]},{"tag":"p","attributes":{},"children":[{"text":"Enter your estimated remaining loan balance at this anniversary."}]},{"tag":"div","attributes":{"class":"rc-row"},"children":[{"tag":"div","attributes":{"class":"rc-input-card"},"children":[{"tag":"label","attributes":{},"children":[{"text":"Remaining loan balance"}]},{"tag":"input","attributes":{"type":"text","id":"rcY3","placeholder":"e.g. $300,000","inputmode":"numeric","autocomplete":"off"},"children":[]}]},{"tag":"div","attributes":{"class":"rc-pill"},"children":[{"tag":"strong","attributes":{"id":"rcY3Monthly"},"children":[{"text":"0"}]},{"tag":"span","attributes":{"id":"rcY3MonthlyLabel"},"children":[{"text":"monthly pts"}]}]},{"tag":"div","attributes":{"class":"rc-pill"},"children":[{"tag":"strong","attributes":{"id":"rcY3Ann"},"children":[{"text":"0"}]},{"tag":"span","attributes":{"id":"rcY3AnnLabel"},"children":[{"text":"anniversary pts"}]}]}]}]}]}]},{"tag":"div","attributes":{"class":"rc-total"},"children":[{"tag":"span","attributes":{"class":"rc-total-label"},"children":[{"text":"Total"}]},{"tag":"strong","attributes":{"class":"rc-total-value","id":"rcTotal"},"children":[{"text":"240,000"}]},{"tag":"span","attributes":{"class":"rc-total-type","id":"rcTotalType"},"children":[{"text":"Virgin Money Points"}]},{"tag":"a","attributes":{"class":"rc-enquire","href":"https://virginmoney.com.au/home-loans/enquire-now?cid=HL-58-2"},"children":[{"text":"Enquire now"}]}]}]}]},{"tag":"style","attributes":{},"children":[],"content":".rc-calc{background:#f7f7f8;font-family:Inter,Arial,sans-serif;color:#4b4d54;max-width:1180px;margin:0 auto;padding:72px 48px;box-sizing:border-box}.rc-title{font-size:42px;font-weight:800;line-height:1;text-align:center;margin:0 0 42px;color:#4b4d54}.rc-tabs{display:flex;gap:8px;justify-content:center;margin:0 auto 68px;background:#fff;border:1px solid #e5e5e7;border-radius:999px;padding:8px;width:max-content}.rc-tab{border:0;background:transparent;border-radius:999px;padding:13px 22px;font-size:14px;font-weight:800;color:#4b4d54;cursor:pointer}.rc-tab.active{background:#a10808;color:#fff}.rc-layout{display:flex;gap:56px;align-items:flex-start}.rc-steps{flex:1 1 auto;min-width:0}.rc-step{display:flex;gap:28px;position:relative}.rc-rail{width:38px;display:flex;flex-direction:column;align-items:center;flex:0 0 38px}.rc-node{width:34px;height:34px;border-radius:50%;background:#e10a0a;color:#fff;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:900;line-height:1;z-index:2;position:relative}.rc-icon{width:18px;height:18px;display:block;color:#fff}.rc-line{width:6px;background:#e10a0a;flex:1;min-height:94px}#rcStepY3 .rc-line{display:none}.rc-step-body{padding:2px 0 34px;flex:1;min-width:0}.rc-step-body h3{font-size:26px;line-height:1.1;color:#4b4d54;font-weight:800;margin:0 0 6px}.rc-step-body p{font-size:15px;color:#777982;line-height:1.25;margin:0 0 18px;max-width:560px}.rc-row{display:flex;gap:12px;align-items:stretch;flex-wrap:wrap}.rc-input-card{width:350px;min-height:64px;background:#fff;border-radius:16px;padding:12px 18px;box-sizing:border-box}.rc-input-card label{display:block;font-size:11px;color:#777982;margin-bottom:4px}.rc-input-card input{width:100%;border:0;outline:0;background:transparent;font-size:18px;font-weight:800;color:#4b4d54;padding:0}.rc-pill{min-width:118px;background:#e6f5e7;border-radius:14px;padding:12px 16px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center}.rc-pill.velocity{background:#eee8f5}.rc-pill strong{font-size:18px;line-height:1;font-weight:900;color:#4b4d54}.rc-pill span{font-size:11px;color:#777982;margin-top:5px}.rc-help{font-size:12px;color:#777982;margin:8px 0 0 18px}.rc-help.error{color:#e10a0a}.rc-add-wrap{display:flex;align-items:center;margin:-8px 0 30px 0;padding-left:0;position:relative}.rc-add-wrap:before{content:\"\";position:absolute;left:16px;top:-30px;height:30px;width:6px;background:#e10a0a;z-index:0;pointer-events:none}.rc-add-btn{display:inline-flex;align-items:center;border:0;background:#941007;color:#fff;border-radius:999px;padding:0 24px 0 0;min-height:42px;cursor:pointer;position:relative;z-index:5;overflow:hidden;box-shadow:none}.rc-plus{width:54px;height:42px;border-radius:999px 0 0 999px;background:#941007;color:#fff;display:flex;align-items:center;justify-content:center;font-size:34px;font-weight:900;line-height:1;box-shadow:none;position:relative;z-index:2;flex:0 0 54px}.rc-add-text{margin-left:0;background:#941007;border-radius:0;color:#fff;font-size:16px;font-weight:900;padding:9px 6px 9px 2px;min-height:42px;box-sizing:border-box;display:flex;align-items:center;white-space:nowrap;position:relative;z-index:1;letter-spacing:-.1px}.rc-add-btn:disabled{cursor:not-allowed;opacity:1;background:#c1c4c9}.rc-add-btn:disabled .rc-plus,.rc-add-btn:disabled .rc-add-text{background:#c1c4c9;box-shadow:none;color:#fff}.rc-total{width:300px;min-width:300px;max-width:340px;background:#fff;border-radius:24px;padding:36px 32px 34px;box-sizing:border-box;box-shadow:0 2px 18px rgba(0,0,0,.03);position:sticky;top:24px}.rc-total-label{display:block;font-size:23px;font-weight:800;color:#4b4d54;margin-bottom:14px}.rc-total-value{display:block;font-size:50px;font-weight:900;line-height:.95;color:#4b4d54;letter-spacing:-1px}.rc-total-type{display:block;font-size:13px;color:#777982;margin-top:12px}.rc-enquire{display:inline-flex;margin-top:38px;background:#e10a0a;color:#fff!important;text-decoration:none;border-radius:8px;padding:17px 22px;font-size:15px;font-weight:900}.rc-enquire:hover{background:#b00000}.rc-hidden{display:none!important}@media(min-width:901px){.rc-row{display:flex;flex-wrap:nowrap;align-items:stretch}.rc-input-card{width:350px;flex:0 0 350px;min-width:350px}.rc-pill{flex:0 0 118px;min-width:118px}.rc-step-body{max-width:650px}}@media(max-width:900px){.rc-calc{padding:48px 20px}.rc-title{font-size:32px;margin-bottom:28px}.rc-tabs{margin-bottom:36px}.rc-layout{display:block}.rc-total{width:100%;min-width:0;max-width:none;position:static;margin-top:28px}.rc-row{display:block}.rc-input-card{width:100%;margin-bottom:10px}.rc-pill{display:inline-flex;margin:0 8px 8px 0}.rc-step{gap:18px}.rc-step-body h3{font-size:22px}.rc-add-text{white-space:normal;text-align:left}}"},{"tag":"script","attributes":{},"children":[],"content":"(function(){var root=document.querySelector('.rc-calc');if(!root||root.getAttribute('data-ready')==='1')return;root.setAttribute('data-ready','1');var active='vmp',min=20000;var cfg={vmp:{name:'Virgin Money Points',rate:4000,monthly:2000},vp:{name:'Velocity Points',rate:2000,monthly:1000}};var loan=root.querySelector('#rcLoan'),y1=root.querySelector('#rcY1'),y2=root.querySelector('#rcY2'),y3=root.querySelector('#rcY3');function q(id){return root.querySelector('#'+id)}function show(id){var e=q(id);if(e)e.style.display='flex'}function hide(id){var e=q(id);if(e)e.style.display='none'}function visible(id){var e=q(id);return !!e&&e.style.display!=='none'}function hasDigits(v){return /[0-9]/.test(String(v||''))}function num(v){return parseInt(String(v||'').replace(/[^0-9]/g,''),10)||0}function moneyFromValue(n){return '$'+Math.max(0,n).toLocaleString('en-AU')}function moneyFromRaw(v){return hasDigits(v)?moneyFromValue(num(v)):''}function pts(n){return Math.round(n||0).toLocaleString('en-AU')}function settlementPts(n){return n>=min?n/10000*cfg[active].rate:0}function anniversaryPts(n){return n/10000*cfg[active].rate}function validateLoan(){var amt=num(loan.value),h=q('rcLoanHelp');if(!h)return amt;if(hasDigits(loan.value)&&amt<min){h.textContent='Please enter an amount of at least $20,000';h.classList.add('error');return 0}h.textContent='Min $20,000';h.classList.remove('error');return amt}function yearMonthly(stepId){return visible(stepId)?cfg[active].monthly*12:0}function toggleButton(btn,enabled){if(!btn)return;if(enabled){btn.removeAttribute('disabled');btn.setAttribute('aria-disabled','false')}else{btn.setAttribute('disabled','disabled');btn.setAttribute('aria-disabled','true')}}function updateButtonStates(){toggleButton(q('rcAddY1'),true);toggleButton(q('rcAddY2'),hasDigits(y1.value));toggleButton(q('rcAddY3'),hasDigits(y2.value))}function updateLabels(){root.querySelectorAll('.rc-type-label').forEach(function(x){x.textContent=cfg[active].name});root.querySelectorAll('.rc-pill').forEach(function(p){if(active==='vp'){p.classList.add('velocity')}else{p.classList.remove('velocity')}})}function calc(){var l=validateLoan(),a1=visible('rcStepY1')&&hasDigits(y1.value)?num(y1.value):0,a2=visible('rcStepY2')&&hasDigits(y2.value)?num(y2.value):0,a3=visible('rcStepY3')&&hasDigits(y3.value)?num(y3.value):0;var s=settlementPts(l),m1=yearMonthly('rcStepY1'),m2=yearMonthly('rcStepY2'),m3=yearMonthly('rcStepY3'),p1=anniversaryPts(a1),p2=anniversaryPts(a2),p3=anniversaryPts(a3);q('rcSettlementPts').textContent=pts(s);q('rcY1Monthly').textContent=pts(m1);q('rcY2Monthly').textContent=pts(m2);q('rcY3Monthly').textContent=pts(m3);q('rcY1Ann').textContent=pts(p1);q('rcY2Ann').textContent=pts(p2);q('rcY3Ann').textContent=pts(p3);q('rcTotal').textContent=pts(s+m1+m2+m3+p1+p2+p3);q('rcTotalType').textContent=cfg[active].name;updateButtonStates()}function input(e){e.target.value=moneyFromRaw(e.target.value);calc()}[loan,y1,y2,y3].forEach(function(i){i.addEventListener('input',input);i.addEventListener('blur',function(){i.value=moneyFromRaw(i.value);calc()})});q('rcAddY1').addEventListener('click',function(){hide('rcAddY1Wrap');show('rcStepY1');show('rcAddY2Wrap');calc();y1.focus()});q('rcAddY2').addEventListener('click',function(){if(q('rcAddY2').disabled)return;hide('rcAddY2Wrap');show('rcStepY2');show('rcAddY3Wrap');calc();y2.focus()});q('rcAddY3').addEventListener('click',function(){if(q('rcAddY3').disabled)return;hide('rcAddY3Wrap');show('rcStepY3');calc();y3.focus()});root.querySelectorAll('.rc-tab').forEach(function(tab){tab.addEventListener('click',function(){root.querySelectorAll('.rc-tab').forEach(function(x){x.classList.remove('active')});tab.classList.add('active');active=tab.getAttribute('data-type');updateLabels();calc()})});loan.value=moneyFromRaw(loan.value);updateLabels();updateButtonStates();calc()})();"}]