/* * 1. Overlay Styling 
 * This ensures the loader covers the entire screen, above all other content.
 */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    /* Light, slightly transparent background */
    z-index: 9999;
    /* Ensures it is on top of everything else */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
    /* Smooth fading transition */
}

/* * 2. Spinner Animation Styling 
 * This creates a simple, professional spinning circle.
 */
.loader-spinner {
    border: 5px solid #f3f3f3;
    /* Light grey/white border */
    border-top: 5px solid #156516;
    /* Blue color for the top border (use your brand color here) */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    /* Apply the animation */
}

/* * 3. Keyframes for the Spin Animation 
 */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* * 4. Hiding class 
 * This class is added by JavaScript to hide the loader.
 */
#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}