#components-reconnect-modal {
    position: fixed;
    z-index: 2147483000;
    inset: 16px 16px auto;
    display: grid;
    justify-items: center;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 160ms ease, visibility 0s linear 900ms;
    font-family: var(--font-ui, Arial, sans-serif);
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    visibility: visible;
    opacity: 1;
    transition-delay: 900ms, 0s;
}

/* Auth is checked before a rejected circuit is presented. This prevents an
   expired session from briefly flashing a reconnect/legacy-looking screen. */
#components-reconnect-modal[data-auth-checking="true"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.blazor-reconnect__panel {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(560px, calc(100vw - 32px));
    max-width: min(560px, calc(100vw - 32px));
    padding: 11px 14px;
    color: #17222f;
    background: #ffffff;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(22, 34, 47, .16);
    pointer-events: auto;
}

.blazor-reconnect__content {
    min-width: 0;
    flex: 1 1 auto;
}

.blazor-reconnect__spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid #d7e0ea;
    border-top-color: #1473e6;
    border-radius: 50%;
    animation: blazor-reconnect-spin 800ms linear infinite;
}

.blazor-reconnect__title {
    color: #162131;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.blazor-reconnect__copy {
    margin-top: 2px;
    color: #667487;
    font-size: 12px;
    line-height: 1.4;
}

.blazor-reconnect__failed, .blazor-reconnect__rejected { display: none; }

.blazor-reconnect__action {
    min-width: 96px;
    min-height: 36px;
    margin-left: 4px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    font: 700 13px/1 var(--font-ui, Arial, sans-serif);
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
}

.blazor-reconnect__action--secondary {
    color: #23405c;
    background: #f5f8fb;
    border-color: #cbd7e2;
}

.blazor-reconnect__action--primary {
    color: #fff;
    background: #e31b42;
    border-color: #e31b42;
}

.blazor-reconnect__action:hover { filter: brightness(.97); }
.blazor-reconnect__action:disabled { cursor: wait; opacity: .72; }
.blazor-reconnect__action:focus-visible {
    outline: 3px solid rgba(20, 115, 230, .28);
    outline-offset: 2px;
}

#components-reconnect-modal.components-reconnect-failed .blazor-reconnect__retrying,
#components-reconnect-modal.components-reconnect-rejected .blazor-reconnect__retrying { display: none; }
#components-reconnect-modal.components-reconnect-failed .blazor-reconnect__failed,
#components-reconnect-modal.components-reconnect-rejected .blazor-reconnect__rejected { display: flex; }

@keyframes blazor-reconnect-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
    #components-reconnect-modal { inset: 10px 10px auto; }
    .blazor-reconnect__panel { align-items: flex-start; gap: 10px; padding: 10px 11px; }
    .blazor-reconnect__action { min-width: 0; margin-left: 0; }
}

@media (max-width: 390px) {
    .blazor-reconnect__failed,
    .blazor-reconnect__rejected { flex-wrap: wrap; }

    .blazor-reconnect__action {
        width: 100%;
        margin-top: 2px;
    }
}
