/* InteractiveServer Loading Indicator Styles */

.interactive-server-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.interactive-server-loading.visible {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

/* Spinner */
.loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #e91e63;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
    border-top-color: #e91e63;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: #f06292;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: #f8bbd0;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Text */
.loader-text {
    margin-bottom: 24px;
}

.loading-message {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.loading-submessage {
    display: block;
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* Progress Bar */
.loader-progress {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #e91e63 0%, #f06292 50%, #e91e63 100%);
    background-size: 200% 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

/* Pulse animation for spinner container */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.loader-spinner {
    animation: pulse 2s ease-in-out infinite;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .interactive-server-loading {
        background: rgba(30, 30, 30, 0.98);
    }

    .loading-message {
        color: #fff;
    }

    .loading-submessage {
        color: #aaa;
    }

    .loader-progress {
        background: #333;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .interactive-server-loading {
        transition: none;
    }

    .spinner-ring {
        animation: spin 3s linear infinite;
    }

    .loader-spinner {
        animation: none;
    }

    .progress-bar {
        animation: none;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .loader-content {
        padding: 24px;
    }

    .loader-spinner {
        width: 64px;
        height: 64px;
        margin-bottom: 24px;
    }

    .loading-message {
        font-size: 18px;
    }

    .loading-submessage {
        font-size: 13px;
    }
}
