/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
.components-reconnect-first-attempt-visible[b-zuujn6xazc],
.components-reconnect-repeated-attempt-visible[b-zuujn6xazc],
.components-reconnect-failed-visible[b-zuujn6xazc],
.components-pause-visible[b-zuujn6xazc],
.components-resume-failed-visible[b-zuujn6xazc],
.components-rejoining-animation[b-zuujn6xazc],
.components-reconnect-title[b-zuujn6xazc] {
    display: none;
}

/* Blazor leaves components-reconnect-show on the dialog while it adds -retrying, so the first
   attempt's text stays up underneath the countdown. The title is listed under both anyway, so
   it does not depend on that. */
#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-zuujn6xazc],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-zuujn6xazc],
#components-reconnect-modal.components-reconnect-show .components-reconnect-title[b-zuujn6xazc],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-zuujn6xazc],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-zuujn6xazc],
#components-reconnect-modal.components-reconnect-retrying[b-zuujn6xazc],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-zuujn6xazc],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-zuujn6xazc],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-title[b-zuujn6xazc],
#components-reconnect-modal.components-reconnect-failed[b-zuujn6xazc],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-zuujn6xazc] {
    display: block;
}

/* The dialog is outside every MudBlazor surface, so it takes its colours from the tokens
   directly — a hard-coded white here stays white in dark mode. */
#components-reconnect-modal[b-zuujn6xazc] {
    background-color: var(--color-surface);
    color: var(--color-foreground);
    width: min(24rem, calc(100vw - 2rem));
    margin: 20vh auto;
    padding: 2rem;
    border: var(--border-width-hairline) solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-panel);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-zuujn6xazc 0.5s both;

    &[open] {
        animation: components-reconnect-modal-slideUp-b-zuujn6xazc 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity-b-zuujn6xazc 0.5s ease-in-out 0.3s;
        animation-fill-mode: both;
    }
}

#components-reconnect-modal[b-zuujn6xazc]::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity-b-zuujn6xazc 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp-b-zuujn6xazc {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-zuujn6xazc {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-zuujn6xazc {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container[b-zuujn6xazc] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal .components-reconnect-title[b-zuujn6xazc] {
    margin: 0;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    text-align: center;
}

#components-reconnect-modal p[b-zuujn6xazc] {
    margin: 0;
    text-align: center;
    line-height: 1.5;
}

#components-reconnect-modal .components-reconnect-data-safe[b-zuujn6xazc] {
    font-weight: var(--font-weight-semibold);
}

/* White on the 0.56 step is ~5.1:1, and the fill against either theme's surface clears 3:1.
   The 0.655 brand step would not carry white text (~3.4:1), so hover lifts with a shadow
   rather than lightening the fill. */
#components-reconnect-modal button[b-zuujn6xazc] {
    min-height: var(--touch-target-min, 44px);
    border: 0;
    background-color: var(--color-primary-interactive);
    color: var(--color-primary-foreground);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-control);
    font: inherit;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
}

    #components-reconnect-modal button:hover[b-zuujn6xazc] {
        box-shadow: var(--shadow-button-hover);
    }

    #components-reconnect-modal button:active[b-zuujn6xazc] {
        box-shadow: var(--shadow-button-active);
    }

.components-rejoining-animation[b-zuujn6xazc] {
    position: relative;
    width: 80px;
    height: 80px;
}

    .components-rejoining-animation div[b-zuujn6xazc] {
        position: absolute;
        border: 3px solid var(--color-primary);
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation-b-zuujn6xazc 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

        .components-rejoining-animation div:nth-child(2)[b-zuujn6xazc] {
            animation-delay: -0.5s;
        }

@keyframes components-rejoining-animation-b-zuujn6xazc {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0px;
        left: 0px;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}
