/* Loading indicator styles for initial app load */
#ApplicationContainer {
    position: relative;
    min-height: 100vh;
}

/* Loading spinner container */
#ApplicationContainer .spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fafafa;
    z-index: 9999;
}

/* Loading content wrapper */
#ApplicationContainer .loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* MudBlazor-style loading spinner */
#ApplicationContainer .loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e0e0e0;
    border-top-color: #2E7D32; /* MudBlazor primary green */
    border-radius: 50%;
    animation: spinner-rotation 1s linear infinite;
}

/* Loading text */
#ApplicationContainer .loading-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #424242;
    letter-spacing: 0.5px;
}

/* Progress bar container */
#ApplicationContainer .loading-progress {
    width: 200px;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

/* Animated progress bar */
#ApplicationContainer .loading-progress-bar {
    height: 100%;
    background-color: #2E7D32;
    border-radius: 2px;
    animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
    0% {
        width: 0%;
        margin-left: 0;
    }
    50% {
        width: 60%;
        margin-left: 0;
    }
    100% {
        width: 100%;
        margin-left: 0;
    }
}

/* Spinner rotation animation */
@keyframes spinner-rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Remove the old double-bounce elements since we're using a cleaner approach */
#ApplicationContainer .double-bounce1,
#ApplicationContainer .double-bounce2 {
    display: none;
}

/* Fade out animation when app loads */
#ApplicationContainer.loaded .spinner {
    animation: fade-out 0.3s ease-out forwards;
}

@keyframes fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* For better loading experience on slow connections */
@media (prefers-reduced-motion: reduce) {
    #ApplicationContainer .spinner::before {
        animation: none;
        border-top-color: #2E7D32;
        border-right-color: #2E7D32;
    }
}