/* Loan EMI Calculator Styles */
.emi-calculator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.emi-calculator-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.emi-calculator-form h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.input-with-symbol {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-symbol .currency-symbol,
.input-with-symbol .percent-symbol {
    position: absolute;
    padding: 0 12px;
    color: #6c757d;
    font-weight: 500;
}

.input-with-symbol .currency-symbol {
    left: 0;
}

.input-with-symbol .percent-symbol {
    right: 0;
}

.input-with-symbol input {
    padding-left: 30px;
    padding-right: 30px;
}

.tenure-container {
    display: flex;
    gap: 10px;
}

.tenure-container input {
    flex: 2;
}

.tenure-container select {
    flex: 1;
}

.emi-calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emi-calculate-btn:hover {
    background: linear-gradient(135deg, #005a87, #004670);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.emi-calculate-btn:active {
    transform: translateY(0);
}

.emi-results {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.emi-results h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 22px;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.result-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.result-label {
    display: block;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.result-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.amortization-schedule h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
    text-align: center;
}

.schedule-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.amortization-table th {
    background: #007cba;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.amortization-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.amortization-table tr:nth-child(even) {
    background: #f8f9fa;
}

.amortization-table tr:hover {
    background: #e3f2fd;
}

.emi-loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .emi-calculator-container {
        padding: 15px;
    }
    
    .emi-calculator-form,
    .emi-results {
        padding: 20px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tenure-container {
        flex-direction: column;
    }
    
    .amortization-table {
        font-size: 12px;
    }
    
    .amortization-table th,
    .amortization-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .emi-calculator-form h3 {
        font-size: 20px;
    }
    
    .emi-results h3 {
        font-size: 18px;
    }
    
    .result-value {
        font-size: 20px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
}