.care-cost-calculator {
    width: 380px;
    max-width: 380px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Make sure all inner elements respect the container width */
.care-cost-calculator .input-section,
.care-cost-calculator .input-group,
.care-cost-calculator .form-field,
.care-cost-calculator .results {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.calculator {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.calculator h2 {
    color: #1a237e;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    line-height: 1.4;
}

.calculator h3 {
    color: #303f9f;
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8eaf6;
    line-height: 1.3;
}

.calculator .input-group {
    background: #fafafa;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.calculator .form-field {
    margin-bottom: 1rem;
}

.calculator .form-field:last-child {
    margin-bottom: 0;
}

.calculator label {
    display: block;
    margin-bottom: 0.4rem;
    color: #424242;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.calculator input[type="number"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #ffffff;
    margin: 0;
    height: auto;
}

.calculator input[type="number"]:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.calculator input[type="number"]:hover {
    border-color: #9fa8da;
}

.calculator .results {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #e8eaf6;
    position: relative;
}

.calculator .results h3 {
    color: #1a237e;
    margin-top: 0;
    border-bottom: none;
}

.calculator .cost-comparison {
    background: #ffffff;
    padding: 1rem;
    margin: 0.8rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.calculator .highlight {
    color: #303f9f;
    font-weight: 600;
    font-size: 1.1rem;
}

.calculator #comparisonResult {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 8px;
    color: #424242;
    line-height: 1.6;
}

/* Loading State */
.calculator input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Error State */
.calculator input:invalid {
    border-color: #ef5350;
}

/* Success Indicator */
.calculator .cost-comparison.positive .highlight {
    color: #43a047;
}

.calculator .cost-comparison.negative .highlight {
    color: #e53935;
}

/* Responsive Design */
@media (min-width: 768px) {
    .calculator {
        display: block;
    }
    
    .calculator h2 {
        margin-bottom: 1.5rem;
    }
}
