Medishare Pricing Calculator
.medishare-calculator-container {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f9f9f9;
padding: 25px;
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
max-width: 700px;
margin: 20px auto;
border: 1px solid #e0e0e0;
}
.medishare-calculator-container h2 {
color: #2c3e50;
text-align: center;
margin-bottom: 20px;
font-size: 1.8em;
}
.medishare-calculator-container p {
color: #555;
line-height: 1.6;
margin-bottom: 15px;
}
.calculator-form .form-group {
margin-bottom: 18px;
display: flex;
flex-direction: column;
}
.calculator-form label {
font-weight: bold;
margin-bottom: 8px;
color: #34495e;
font-size: 0.95em;
}
.calculator-form input[type="number"],
.calculator-form select {
padding: 10px 12px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 1em;
width: 100%;
box-sizing: border-box;
background-color: #fff;
}
.calculator-form input[type="number"]:focus,
.calculator-form select:focus {
border-color: #007bff;
outline: none;
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}
.calculator-form button {
background-color: #28a745;
color: white;
padding: 12px 25px;
border: none;
border-radius: 5px;
font-size: 1.1em;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.2s ease;
width: 100%;
box-sizing: border-box;
margin-top: 15px;
}
.calculator-form button:hover {
background-color: #218838;
transform: translateY(-2px);
}
.calculator-form button:active {
transform: translateY(0);
}
.result-container {
background-color: #e9f7ef;
border: 1px solid #d4edda;
border-radius: 8px;
padding: 15px 20px;
margin-top: 25px;
text-align: center;
}
.result-container h3 {
color: #28a745;
margin-top: 0;
font-size: 1.4em;
}
.result-output {
font-size: 2em;
font-weight: bold;
color: #007bff;
margin: 10px 0 5px;
}
.medishare-article {
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #eee;
}
.medishare-article h3 {
color: #2c3e50;
margin-bottom: 15px;
font-size: 1.5em;
}
.medishare-article h4 {
color: #34495e;
margin-top: 20px;
margin-bottom: 10px;
font-size: 1.2em;
}
.medishare-article ul,
.medishare-article ol {
margin-left: 20px;
margin-bottom: 15px;
color: #555;
}
.medishare-article li {
margin-bottom: 8px;
line-height: 1.5;
}
@media (max-width: 600px) {
.medishare-calculator-container {
padding: 15px;
margin: 10px;
}
.calculator-form button {
padding: 10px 15px;
font-size: 1em;
}
.result-output {
font-size: 1.8em;
}
}
function calculateMedishareShare() {
var householdSize = document.getElementById("householdSize").value;
var oldestMemberAge = parseInt(document.getElementById("oldestMemberAge").value);
var annualHouseholdPortion = parseInt(document.getElementById("annualHouseholdPortion").value);
var estimatedMonthlyShare = 0;
// Input validation
if (isNaN(oldestMemberAge) || oldestMemberAge 99) {
document.getElementById("estimatedMonthlyShare").innerHTML = "Please enter a valid age between 18 and 99.";
return;
}
// Base Monthly Share calculation based on Household Size and Age
if (householdSize === "individual") {
if (oldestMemberAge >= 18 && oldestMemberAge = 30 && oldestMemberAge = 40 && oldestMemberAge = 50 && oldestMemberAge = 60) {
estimatedMonthlyShare = 390;
}
} else if (householdSize === "couple") {
if (oldestMemberAge >= 18 && oldestMemberAge = 30 && oldestMemberAge = 40 && oldestMemberAge = 50 && oldestMemberAge = 60) {
estimatedMonthlyShare = 710;
}
} else if (householdSize === "family") {
if (oldestMemberAge >= 18 && oldestMemberAge = 30 && oldestMemberAge = 40 && oldestMemberAge = 50 && oldestMemberAge = 60) {
estimatedMonthlyShare = 880;
}
}
// AHP Adjustment
if (annualHouseholdPortion === 9000) {
estimatedMonthlyShare += 60;
} else if (annualHouseholdPortion === 6000) {
estimatedMonthlyShare += 120;
} else if (annualHouseholdPortion === 3000) {
estimatedMonthlyShare += 180;
}
// For AHP 12000, no adjustment (it's the base)
if (estimatedMonthlyShare > 0) {
document.getElementById("estimatedMonthlyShare").innerHTML = "$" + estimatedMonthlyShare.toFixed(2);
} else {
document.getElementById("estimatedMonthlyShare").innerHTML = "Could not calculate. Please check inputs.";
}
}