We're taught that the Battle of the Bulge was a surprise attack on the American forces which cost the western allies a great deal. But how much of a surprise was it? Were the allies thinking that the war would be over in a few weeks to a month and already kicking back, or did they have at least a little time to prepare for the offensive?
Were the allies thinking that the war would be over in a few weeks to a month and already kicking back,
No, not by a long shot. The 1st and 9th Armies (about to be struck by the Ardennes Offensive) were just winding down on Operation Queen, an operation meant to bring the Allies to and across the Ruhr. The Americans were still making decisive moves towards German industrial centers and realized in September (with the failure of Market Garden and the battle of Metz beginning) that the Germans had managed to coalesce and recover enough to prolong the war. The attitude and actions of the Allies in November-December 1944 plainly show that they realized the war was far from over; and they were maintaining an aggressive tempo all along the front with what supplies they could; attacks ranged from limited moves (such as the XX Corps on the Westwall) to bold, multiple-army level movements such as Operation Queen.
Operation Queen itself ended indecisively and on the wrong side of the Ruhr, and both sides recoiled - presumbly to lick their wounds. The offensive that would lead to the Battle of the Bulge was launched on the same day Queen ended; December 16th.
But how much of a surprise was it?
I'm reluctant to say 'total' - but near enough. The Americans had just run into limited enemy reserves during Operation Queen, and had given as good as they got. They presumed that the faltering German army had neither the strength nor the reserves to launch operational counterattacks. Coupled onto that is the realization that even if they could launch Operational counterattacks, it would be sheer folly to do so. A sense of security lulled the 12th Army Group, and units that had just taken part in Queen were convalescing and were rotating entirely new formations onto the line in what was thought to be a quiet sector.
or did they have at least a little time to prepare for the offensive?
Attempting to avoid hindsight; they were preparing for local counteroffensives. Many units all along the American front, across all the major armies on the line at that time (1st, 3rd, 7th, 9th) had produced alarming salients in the German's Siegfried line. Local, tactical counterattacks were expected and happened frequently. To be clear, these 'local' counterattacks could be as small as a Company trying to retake a lost town, to a handful of divisions attempting to hammer the line back into a coherent shape. What happened on December 16th, was far larger. The Ardennes offensive opened with a sharp, hour and a half artillery barrage on a wide frontage, but the initial efforts by German infantry units on either 'shoulder' of the advance stalled out or were ineffectual; and thus units that should've been reporting major efforts along the entire front were simply acting as if these were routine probes.
German momentum didn't truly begin to build until late on December 17th, when units on the flanks began to make significant headway towards areas like St. Vith. Units in the center of the attack zone, heavily outnumbered by the concentrated mass, began to get pushed back as their flanks were effectively pinned. A massive salient was developing by December 19th; but it was very much a trickle suddenly becoming a flood. The American command in some instances was hesitant to declare they were under major attack until as late as December 20th. Necessary reactionary moves weren't ordered until December 19th for mobile units (such as the 2nd Armored), when the situation had become much clearer.
So, they had time to prepare, but they weren't prepared for such a powerful attack because (a) they felt it was strategically and operationally foolish and (b) overestimated the continuing confusion and demoralization of the German army from the period of July-September. Finally, the units in the Bulge zone weren't 'kicking back' because they believed the war won, to the contrary, they were resting and re-arming after a hard month of fighting to reach the Ruhr river. Given the incredible difficulty that the Germans faced in the crucial first two days of the offensive, it is clear that the Units, fresh or alternatively as tired as they were, reacted as well as they could given the surprise and confusion.