/* ──────────────────────────────────────────────────────────────────────────
   Custom Reconnection Overlay
   ────────────────────────────────────────────────────────────────────────── */

.blazor-reconnection-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeInOverlay 0.3s ease-out;
}

.blazor-reconnection-overlay.visible {
    display: flex;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.reconnection-container {
    text-align: center;
    color: white;
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reconnection-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
}

/* Modern gradient spinner */
.reconnection-spinner::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #4CAF50;
    border-right-color: #2196F3;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.reconnection-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.reconnection-subtext {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.reconnection-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 0 auto 20px;
    overflow: hidden;
}

.reconnection-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0% {
        width: 0%;
    }
    50% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

.reconnection-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 15px;
    font-style: italic;
}

/* Auto-refresh message */
.reconnection-message.refresh-warning {
    color: #FFC107;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Success state */
.reconnection-overlay.success {
    animation: fadeOutOverlay 0.5s ease-out 0.5s forwards;
}

@keyframes fadeOutOverlay {
    to {
        opacity: 0;
    }
}

.reconnection-container.success .reconnection-spinner::before {
    animation: none;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #4CAF50;
    border-right-color: #4CAF50;
}

.reconnection-container.success .reconnection-text::after {
    content: ' ✓';
    color: #4CAF50;
    animation: checkMark 0.5s ease-out;
}

@keyframes checkMark {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
