/* EMI Calculator Styles - Professional Clean Version */
.emi-calculator {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.emi-calculator h3 {
    margin: 0 0 1.5rem 0;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
}

.emi-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.emi-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.emi-input-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
}

.emi-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.emi-input-wrapper input[type="number"],
.emi-input-wrapper input[type="range"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.emi-input-wrapper input[type="number"]:focus {
    outline: none;
    border-color: #06b6d4;
}

.emi-input-wrapper .currency-symbol {
    position: absolute;
    left: 1rem;
    color: #718096;
    font-weight: 600;
}

.emi-input-wrapper input.with-symbol {
    padding-left: 2rem;
}

.emi-input-wrapper .unit {
    position: absolute;
    right: 1rem;
    color: #718096;
    font-weight: 600;
}

.emi-input-wrapper input.with-unit {
    padding-right: 3rem;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: linear-gradient(to right, #06b6d4 0%, #06b6d4 var(--range-progress, 50%), #e2e8f0 var(--range-progress, 50%), #e2e8f0 100%);
    border-radius: 5px;
    outline: none;
    padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #06b6d4;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #06b6d4;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.range-value {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.25rem;
}

.calculate-btn {
    background: #06b6d4;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.calculate-btn:hover {
    background: #5568d3;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.calculate-btn:active {
    transform: scale(0.98);
}

/* EMI Results - Clean professional style */
.emi-results {
    position: relative;
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    color: #2d3748;
    display: none;
}

/* Close button */
.emi-close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    background: #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.emi-close-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

.emi-results.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.emi-result-main {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.emi-result-main .label {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

.emi-result-main .amount {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    color: #06b6d4;
}

.emi-result-main .per-month {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 0.25rem;
}

.emi-result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.emi-detail-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.emi-detail-item .label {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

.emi-detail-item .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
}

.emi-breakdown {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.emi-breakdown-bar {
    display: flex;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
}

.emi-breakdown-bar .principal {
    background: #06b6d4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.emi-breakdown-bar .interest {
    background: #fb923c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.emi-legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
}

.emi-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4a5568;
}

.emi-legend-item .color-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.emi-legend-item .color-box.principal {
    background: #06b6d4;
}

.emi-legend-item .color-box.interest {
    background: #fb923c;
}

/* Responsive */
@media (max-width: 768px) {
    .emi-calculator {
        padding: 1.5rem;
    }

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

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