The moon terminator line is the dividing line between the illuminated and dark portions of the Moon. It's caused by the Sun's light hitting the spherical surface of the Moon from a specific angle relative to an observer on Earth. Because the Moon is a sphere, only the half facing the Sun is lit, and the terminator is the line of sunrise or sunset on the lunar surface.

Now, based on your specific observation:
*   **Phase:** You described a "waning" moon. This means the Moon is decreasing in illumination after a full moon.
*   **Terminator Position:** The shadow is at the bottom, with the terminator line running from approximately the 2 o'clock to the 7 o'clock position.
*   **Location:** The moon is in the western sky at about 45 degrees above the horizon.

Let's analyze this step-by-step.

1.  **Visualizing the Clock Face:** Imagine the Moon as a clock face. If you're looking at it in the sky, 12 o'clock is towards the zenith (straight up), and 6 o'clock is towards the horizon directly below the Moon.

2.  **Waning Moon Shadow:** For a waning moon (after full), the shadow always advances from the right side (for observers in the Northern Hemisphere) to cover the disk. Therefore, the illuminated part will be on the left side of the disk.

3.  **Applying the Description:** You said the *shadow is at the bottom* and the terminator runs from 2 o'clock to 7 o'clock. If the shadow is at the bottom, and it's a waning moon (illuminated on the left), this creates a contradiction with the standard celestial mechanics for an observer in the Northern Hemisphere.

However, this configuration is perfectly consistent for an observer in the **Southern Hemisphere**. Let me explain why:

*   In the Southern Hemisphere, the orientation of the Moon is effectively "upside down" compared to the Northern Hemisphere view.
*   For a waning moon in the Southern Hemisphere, the illuminated side is on the *right*, and the shadow advances from the *left*.
*   A terminator line running from 2 o'clock (upper left) to 7 o'clock (lower right) would indeed place the dark shadow in the lower-left portion of the Moon. Your description of the shadow being at the "bottom" aligns with this if we consider the Moon's orientation in the southern sky.

**Conclusion on Sun's Position:**

Given this Southern Hemisphere interpretation of your observation:
*   The illuminated side of the waning moon is on the right (towards the east).
*   Therefore, the Sun's light is coming from the Moon's right side.
*   Since the Moon is in the western sky, the Sun would be further to the west, having already passed the Moon's position. Specifically, the Sun would be **below the horizon**, as the Moon is visible in the evening sky after sunset during its waning phases.

So, the Sun would be located **below the western horizon, to the right (north) of the Moon's position**. The Moon is lit from the side facing the already-set Sun.