EV Calculator Power Output (kW) Estimated Road Tax Cost RM 70.00 Calculate Reset .calculator-box { border: 1px solid #007bff; /* Border color */ border-radius: 8px; /* Rounded corners */ padding: 20px; /* Inner spacing */ margin: 20px; /* Outer spacing */ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Slight shadow for depth */ background-color: #ffffff; /* Background color */ } .calculator-header { color: #007bff; font-size: 22px; margin-bottom: 15px; } .form-control { width: 100%; padding: 10px; font-size: 14px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; } .btn-primary, .btn-secondary { background: linear-gradient(45deg, #007bff, #0056b3); color: white; border: none; border-radius: 4px; cursor: pointer; padding: 10px 20px; transition: background 0.3s, box-shadow 0.3s; box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2); margin: 5px; /* Uniform margin between buttons */ } .btn-primary:hover { background: linear-gradient(45deg, #0056b3, #004494); box-shadow: 0 8px 16px rgba(0, 123, 255, 0.4); } .btn-secondary { background: #6c757d; /* Gray background for secondary button */ } .btn-secondary:hover { background: #5a6268; /* Darker gray for hover effect */ } .text-gradient-blue { color: #007bff; font-weight: bold; margin-top: 10px; } .form-group { margin-bottom: 15px; } // JavaScript to calculate the estimated road tax based on power output document.getElementById('ev-road-tax-calculate').addEventListener('click', function(event) { event.preventDefault(); const powerOutput = document.querySelector('input[name="power-output"]').value; const taxRate = 0.7; // Example tax calculation, adjust as needed const estimatedTax = (powerOutput * taxRate).toFixed(2); document.querySelector('[data-id="calculator-result"]').innerText = `RM ${estimatedTax}`; }); // Reset functionality for the calculator document.getElementById('reset-calculator').addEventListener('click', function() { document.querySelector('input[name="power-output"]').value = ''; document.querySelector('[data-id="calculator-result"]').innerText = 'RM 70.00'; // Default value });