/* Blazor's reconnect element (#components-reconnect-modal): Blazor toggles the
   components-reconnect-{show,hide,failed,rejected} classes, and in .NET 10 also paused and
   resume-failed, which look and act like failed; js/reconnect.js drives retries. */
.vm-reconnect {
    position: fixed;
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 10px 16px 10px 14px;
    border: 1px solid #ffffff1f;
    border-radius: 999px;
    background: #20252ff2;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 32px #0007;
    color: #dfe6ee;
    font: 500 13px/1.3 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transform: translateX(-50%);
}
.vm-reconnect.components-reconnect-show,
.vm-reconnect.components-reconnect-failed,
.vm-reconnect.components-reconnect-paused,
.vm-reconnect.components-reconnect-resume-failed,
.vm-reconnect.components-reconnect-rejected {
    display: flex;
    /* Short blips never show: the pill fades in only after a second offline. */
    animation: vm-reconnect-in .3s ease 1s both;
}
.vm-reconnect:is(.components-reconnect-failed, .components-reconnect-paused, .components-reconnect-resume-failed) { animation-delay: 0s; }
.vm-reconnect__text { display: none; }
.components-reconnect-show .vm-reconnect__text--show,
.components-reconnect-failed .vm-reconnect__text--failed,
.components-reconnect-paused .vm-reconnect__text--failed,
.components-reconnect-resume-failed .vm-reconnect__text--failed,
.components-reconnect-rejected .vm-reconnect__text--rejected { display: inline; }
.vm-reconnect__dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f5b342;
    box-shadow: 0 0 0 0 #f5b34266;
    animation: vm-reconnect-pulse 1.6s ease-out infinite;
}
:is(.components-reconnect-failed, .components-reconnect-paused, .components-reconnect-resume-failed) .vm-reconnect__dot { background: #ef6b6b; animation: none; }
.components-reconnect-rejected .vm-reconnect__dot { background: #00c9a7; }
.vm-reconnect button {
    margin-left: 6px;
    padding: 4px 10px;
    border: 1px solid #00c9a780;
    border-radius: 999px;
    background: transparent;
    color: #00c9a7;
    font: inherit;
    cursor: pointer;
}
.vm-reconnect button:focus-visible { outline: 2px solid #9bded4; outline-offset: 2px; }
@keyframes vm-reconnect-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes vm-reconnect-pulse { 70% { box-shadow: 0 0 0 8px #f5b34200; } 100% { box-shadow: 0 0 0 0 #f5b34200; } }
@media (prefers-reduced-motion: reduce) {
    .vm-reconnect, .vm-reconnect__dot { animation: none !important; }
}
