/**
 * Angular Loading Overlay - Prevents Flash of Uncompiled Templates (FOUCT)
 * Shows gray loading screen like Laravel5 until AngularJS is ready
 */

/* Full-page loading overlay that covers everything until Angular is ready */
.angular-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    /* Light gray background like Laravel5 */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.angular-loading-overlay .loading-content {
    text-align: center;
    color: #666;
}

.angular-loading-overlay .loading-spinner {
    font-size: 2rem;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

.angular-loading-overlay .loading-text {
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0;
}

.angular-loading-overlay .loading-subtext {
    font-size: 0.9rem;
    color: #999;
    margin-top: 10px;
}

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

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

/* Enhanced ng-cloak that works better */
[ng\:cloak],
[ng-cloak],
[data-ng-cloak],
[x-ng-cloak],
.ng-cloak,
.x-ng-cloak {
    display: none !important;
}

/* Hide content with Angular directives until ready */
.angular-content-hidden {
    visibility: hidden !important;
}

/* Show content when Angular is ready */
.angular-ready .angular-content-hidden {
    visibility: visible !important;
}

/* Hide the overlay when Angular is ready */
.angular-ready .angular-loading-overlay {
    display: none !important;
}

/* Ensure navigation is always visible (server-side rendered) */
.navbar {
    visibility: visible !important;
}

/* Smooth transition when content becomes visible */
.angular-content-hidden {
    transition: visibility 0s linear 0.1s;
}

.angular-ready .angular-content-hidden {
    transition: visibility 0s linear 0s;
}