/* BSMN Mortgage Comparison Calculator Styles */

.bsmn-mortgage-calculator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bsmn-calculator-title {
    text-align: center;
    color: #2c3e50 !important;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

/* Input Section */
.bsmn-input-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.bsmn-input-group {
    display: flex;
    flex-direction: column;
}

.bsmn-input-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.bsmn-input {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.bsmn-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Comparison Table */
.bsmn-comparison-table {
    margin-bottom: 30px;
    overflow-x: auto;
}

.bsmn-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bsmn-table th {
    background: #007bff;
    color: #ffffff;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.bsmn-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.bsmn-table tr:hover {
    background: #f8f9fa;
}

.bsmn-table tr:last-child td {
    border-bottom: none;
}

/* Table Inputs and Selects */
.bsmn-down-payment-percent {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.bsmn-down-payment-amount-input {
    width: 120px;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    text-align: right;
}

.bsmn-down-payment-percent:focus,
.bsmn-down-payment-amount-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.bsmn-focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1) !important;
}

.bsmn-payment-frequency,
.bsmn-amortization {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
}

.bsmn-payment-frequency:focus,
.bsmn-amortization:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Amount Display */
.bsmn-down-payment-amount,
.bsmn-cmhc-insurance,
.bsmn-total-mortgage,
.bsmn-payment-amount {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.bsmn-payment-amount {
    color: #28a745;
    font-size: 16px;
}

/* Results Summary */
.bsmn-results-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.bsmn-results-summary h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.bsmn-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.bsmn-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.bsmn-summary-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 14px;
}

.bsmn-summary-value {
    font-weight: 600;
    color: #28a745;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bsmn-mortgage-calculator {
        padding: 15px;
    }
    
    .bsmn-input-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bsmn-table {
        font-size: 12px;
    }
    
    .bsmn-table th,
    .bsmn-table td {
        padding: 8px 6px;
    }
    
    .bsmn-down-payment-percent {
        width: 60px;
        font-size: 12px;
    }
    
    .bsmn-payment-frequency,
    .bsmn-amortization {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .bsmn-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .bsmn-calculator-title {
        font-size: 24px;
    }
    
    .bsmn-table {
        font-size: 11px;
    }
    
    .bsmn-table th,
    .bsmn-table td {
        padding: 6px 4px;
    }
}

/* Loading States */
.bsmn-loading {
    opacity: 0.6;
    pointer-events: none;
}

.bsmn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: bsmn-spin 1s linear infinite;
}

@keyframes bsmn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.bsmn-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

.bsmn-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

/* Success States */
.bsmn-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1) !important;
} 