/* ===== Calculator Page Styles ===== */
.calculator-section {
    padding: 8rem 0 6rem;
    background: var(--bg-light);
    min-height: 100vh;
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

/* Calculator Inputs */
.calculator-inputs {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    height: fit-content;
}

.input-group {
    margin-bottom: 2.5rem;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.125rem;
}

.calculator-select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.calculator-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Slider Styles */
.slider-container {
    position: relative;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) 50%, #e5e7eb 50%, #e5e7eb 100%);
    outline: none;
    transition: var(--transition-smooth);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.slider-value {
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

/* Calculator Results */
.calculator-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.main-result {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.main-result h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.emi-amount {
    font-size: 3rem;
    font-weight: 800;
    animation: fadeInScale 0.5s ease;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Chart Container */
.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apply-btn {
    width: 100%;
    text-align: center;
    padding: 1.25rem;
    font-size: 1.125rem;
}

/* Amortization Section */
.amortization-section {
    margin-top: 4rem;
    background: white;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.amortization-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.breakdown-summary {
    margin-top: 2rem;
}

.breakdown-bar {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.breakdown-fill {
    height: 100%;
    transition: width 0.6s ease;
}

.breakdown-fill.principal {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.breakdown-fill.interest {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.breakdown-legend {
    display: flex;
    gap: 3rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.legend-color.principal {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.legend-color.interest {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Responsive Design */
@media (max-width: 968px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .emi-amount {
        font-size: 2.5rem;
    }

    .breakdown-legend {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .calculator-section {
        padding: 6rem 0 4rem;
    }

    .calculator-inputs,
    .amortization-section {
        padding: 1.5rem;
    }

    .emi-amount {
        font-size: 2rem;
    }

    .result-value {
        font-size: 1.25rem;
    }

    .slider-value {
        font-size: 1.25rem;
    }
}