/* Movein Loan Calculator Styles */
.movein-calculator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.calculator-tabs {
    background: transparent;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.tab-button {
    flex: 1;
    padding: 16px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #f3f4f6;
    color: #374151;
}

.tab-button.active {
    color: #00335A;
    border-bottom-color: #00335A;
    background: white;
}

.tab-content {
    display: none;
    padding: 32px;
    min-height: 400px;
}

.tab-content.active {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00335A;
    box-shadow: 0 0 0 3px rgba(0, 51, 90, 0.1);
}

.form-note {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

.tab-content h4 {
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f3f4f6;
}

.tab-content h5 {
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.tab-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #00335A;
    color: white;
}

.btn-primary:hover {
    background: #002847;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: transparent;
    color: #00335A;
    border: 2px solid #00335A;
}

.btn-outline:hover {
    background: #00335A;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    width: 100%;
    margin-bottom: 12px;
}

/* Results Styles */
.results-container {
    text-align: center;
}

.loading-spinner {
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #00335A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.result-summary {
    background: #00335A;
    color: white;
    padding: 32px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.result-summary h4 {
    margin: 0 0 16px 0;
    font-size: 18px;
    border: none;
    padding: 0;
    color: white;
}

.eligibility-amount {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.eligibility-amount .currency {
    font-size: 24px;
    opacity: 0.8;
}

.calculation-breakdown {
    background: #f9fafb;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: left;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.breakdown-item:last-child {
    border-bottom: none;
    font-weight: 600;
    color: #1f2937;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h4 {
    margin: 0;
    color: #1f2937;
}

.close-modal {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}

.close-modal:hover {
    color: #374151;
}

.modal form {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .movein-calculator-container {
        padding: 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: 1px solid #e5e7eb;
        border-right: none;
    }
    
    .tab-button.active {
        border-bottom-color: #e5e7eb;
        border-left: 3px solid #00335A;
    }
    
    .eligibility-amount {
        font-size: 36px;
    }
    
    .tab-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .tab-navigation .btn {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* Error and Success Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}