/* Calculator Layout */
.calculator-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

@media (max-width: 900px) {
    .calculator-box {
        grid-template-columns: 1fr;
        padding: 16px;
        /* Reduce padding on mobile */
    }

    .chart-container {
        width: 200px;
        /* Smaller chart on mobile */
        height: 200px;
    }

    .monthly-emi-value {
        font-size: 2rem;
    }
}

/* Input Section */
.calc-inputs {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-md);
}

.input-group {
    margin-bottom: var(--spacing-lg);
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.input-label {
    font-weight: 600;
    color: var(--text-main);
}

.input-value-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    width: 140px;
}

@media (max-width: 480px) {
    .input-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .input-value-wrapper {
        width: 100%;
        /* Full width on mobile */
    }

    /* For tenure toggle container */
    .input-header .d-flex {
        width: 100%;
        justify-content: space-between;
    }
}

.currency-symbol {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 4px;
}

.calc-input {
    border: none;
    outline: none;
    width: 100%;
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
    font-size: 1rem;
    background: transparent;
}

/* Range Slider Styling */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #E0E0E0;
    border-radius: 5px;
    outline: none;
    margin-top: 8px;
    cursor: pointer;
}

/* ... existing code ... */

.monthly-emi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.breakdown-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .breakdown-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
    }
}

.breakdown-item {
    text-align: center;
    padding: 12px;
    background: #FAFAFB;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.breakdown-label {
    font-size: 0.8rem;
    color: #808191;
    /* Explicit dark-theme compatible grey */
    display: block;
    margin-bottom: 4px;
}

.breakdown-value {
    font-weight: 600;
    font-size: 1rem;
    color: #11142D;
    /* Explicit dark color since background is light */
}

.chart-container {
    position: relative;
    height: 250px;
    width: 250px;
    margin: 0 auto 20px;
}

/* Toggle Switch for Tenure (Yr/Mo) */
.tenure-toggle {
    display: flex;
    background: #EAECEF;
    border-radius: 4px;
    padding: 2px;
}

.toggle-option {
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.2s;
}

.toggle-option.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}