This calculator helps you determine the rate at which you can process limes for juicing, based on the number of limes you have and the time it takes you to process them.
.lime-rate-calculator {
font-family: sans-serif;
border: 1px solid #ccc;
padding: 20px;
border-radius: 8px;
max-width: 400px;
margin: 20px auto;
background-color: #f9f9f9;
}
.lime-rate-calculator h2 {
text-align: center;
color: #333;
margin-bottom: 15px;
}
.lime-rate-calculator p {
text-align: center;
color: #555;
margin-bottom: 20px;
font-size: 0.9em;
}
.input-section {
margin-bottom: 15px;
}
.input-section label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #444;
}
.input-section input[type="number"] {
width: calc(100% – 10px);
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
.lime-rate-calculator button {
width: 100%;
padding: 12px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
.lime-rate-calculator button:hover {
background-color: #45a049;
}
#result {
margin-top: 20px;
text-align: center;
font-size: 1.1em;
color: #333;
background-color: #e9e9e9;
padding: 15px;
border-radius: 5px;
}
function calculateLimeRate() {
var numberOfLimes = parseFloat(document.getElementById("numberOfLimes").value);
var processingTimeMinutes = parseFloat(document.getElementById("processingTimeMinutes").value);
var resultDiv = document.getElementById("result");
if (isNaN(numberOfLimes) || numberOfLimes <= 0) {
resultDiv.innerHTML = "Please enter a valid number of limes (greater than 0).";
return;
}
if (isNaN(processingTimeMinutes) || processingTimeMinutes <= 0) {
resultDiv.innerHTML = "Please enter a valid processing time in minutes (greater than 0).";
return;
}
var limesPerMinute = numberOfLimes / processingTimeMinutes;
resultDiv.innerHTML = "Your lime processing rate is: " + limesPerMinute.toFixed(2) + " limes per minute.";
}