/* Reconnection overlay.
   Blazor puts exactly one components-reconnect-* class on #components-reconnect-modal.
   Supplying this element also opts the page out of Blazor's unstyled default overlay,
   which carries no classes and so cannot be reacted to. */

#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}

#components-reconnect-modal.components-reconnect-hide {
    display: none;
}

.reconnect-dialog {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    max-width: 22rem;
    text-align: center;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .25);
    font-size: .95rem;
}

.reconnect-line {
    display: none;
    margin: 0;
}

.reconnect-note {
    display: block;
    margin-top: .5rem;
    color: #64748b;
    font-size: .8rem;
}

.components-reconnect-show .reconnect-retrying,
.components-reconnect-failed .reconnect-lost,
.components-reconnect-rejected .reconnect-lost {
    display: block;
}

.reconnect-spinner {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0 auto .75rem;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: reconnect-spin 900ms linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .reconnect-spinner { animation: none; }
}
