/* Main Wrapper */
.lumpsum-calculator-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 2em auto;
}

/* Left Panel (2/3 width) */
.calculator-panel {
    flex: 2;
    min-width: 320px;
}

/* Right Panel (1/3 width) */
.chart-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 250px;
}

/* Header */
.calculator-header .calc-type {
    background-color: #e0f2fe;
    color: #0c4a6e;
    padding: 6px 16px;
    border-radius: 9999px;
    font-weight: 500;
}

/* Input Sections */
.input-group {
    margin: 2rem 0;
}

.label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #475569;
}

.input-value-display {
    font-weight: 600;
    color: #1e293b;
    background-color: #f1f5f9;
    padding: 4px 12px;
    border-radius: 6px;
}

/* Slider Styles */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    outline: none;
    border-radius: 4px;
    opacity: 0.9;
    transition: opacity .2s;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4f46e5;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4f46e5;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

/* Results Section */
.results-divider {
    border: none;
    height: 1px;
    background-color: #e2e8f0;
    margin: 1.5rem 0;
}

.results-group .result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 1rem;
}

.results-group .result-item span:first-child {
    color: #64748b;
}

.results-group .result-item span:last-child {
    font-weight: 600;
    color: #1e293b;
}

.results-group .result-item.total {
    font-size: 1.1rem;
    font-weight: bold;
}

/* Chart Section */
.chart-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}

.chart-legend {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 200px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lumpsum-calculator-wrapper {
        flex-direction: column;
    }
}