/* Overlay for the Blazor Server reconnect states. Visibility is driven by the
   framework's own classes on #components-reconnect-modal:
     components-reconnect-show     - a reconnect attempt is in progress
     components-reconnect-failed   - reconnect attempts exhausted
     components-reconnect-rejected - server released the circuit; reload required */

/* MudBlazor.min.css themes #components-reconnect-modal (z-index, background) and
   its button with !important; these rules override it - html prefix raises
   specificity and !important is required to beat MudBlazor's own !important. */
html #components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 11000 !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45) !important;
}

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

.reconnect-overlay-card {
    background: #fff;
    border-radius: 8px;
    padding: 28px 36px;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    font-family: inherit;
}

.reconnect-state-failed {
    display: none;
}

html #components-reconnect-modal.components-reconnect-failed .reconnect-state-active,
html #components-reconnect-modal.components-reconnect-rejected .reconnect-state-active {
    display: none;
}

html #components-reconnect-modal.components-reconnect-failed .reconnect-state-failed,
html #components-reconnect-modal.components-reconnect-rejected .reconnect-state-failed {
    display: block;
}

.reconnect-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 14px;
    border: 4px solid #d0d0d0;
    border-top-color: #1565C0;
    border-radius: 50%;
    animation: reconnect-spin 1s linear infinite;
}

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

.reconnect-text {
    margin: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

html #components-reconnect-modal .reconnect-reload-btn {
    margin: 16px 0 0 !important;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    background: #1565C0;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

html #components-reconnect-modal .reconnect-reload-btn:hover {
    background: #0d47a1;
}
