/*
 * .NET 10 Reconnection Modal Styles
 *
 * Blazor sets these CSS classes on #components-reconnect-modal:
 * - components-reconnect-hide: Hidden (connected)
 * - components-reconnect-show: Visible (connection lost)
 * - components-reconnect-retrying: Visible (actively retrying)
 * - components-reconnect-failed: Visible (reconnection failed)
 * - components-reconnect-rejected: Visible (server rejected)
 */

/* Base modal styles - hidden by default */
.reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/* Overlay backdrop */
.reconnect-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Dialog container */
.reconnect-dialog {
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 2rem;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 1;
}

/* Hide all content sections by default */
.reconnect-content {
    display: none;
}

/* Show modal and appropriate content based on state */
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}

/* Show specific content for each state */
#components-reconnect-modal.components-reconnect-show .reconnect-show-content {
    display: block;
}

#components-reconnect-modal.components-reconnect-retrying .reconnect-retrying-content {
    display: block;
}

#components-reconnect-modal.components-reconnect-failed .reconnect-failed-content {
    display: block;
}

#components-reconnect-modal.components-reconnect-rejected .reconnect-rejected-content {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .reconnect-dialog {
        min-width: 280px;
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Animation for smooth appearance */
@keyframes reconnect-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    animation: reconnect-fade-in 0.2s ease-out;
}

/* Pulse animation for progress indicator container */
@keyframes reconnect-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.reconnect-show-content,
.reconnect-retrying-content {
    animation: reconnect-pulse 2s ease-in-out infinite;
}
