/* /src/Pages/Shared/ReconnectModal.razor.rz.scp.css */
/* Which text is visible per connection state. Classes are set by Blazor on #components-reconnect-modal. */
.components-reconnect-first-attempt-visible[b-n2n17btnhb],
.components-reconnect-repeated-attempt-visible[b-n2n17btnhb],
.components-reconnect-failed-visible[b-n2n17btnhb],
.components-pause-visible[b-n2n17btnhb],
.components-resume-failed-visible[b-n2n17btnhb],
.components-rejoining-animation[b-n2n17btnhb] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-n2n17btnhb],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-n2n17btnhb],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-n2n17btnhb],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-n2n17btnhb],
#components-reconnect-modal.components-reconnect-retrying[b-n2n17btnhb],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-n2n17btnhb],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-n2n17btnhb],
#components-reconnect-modal.components-reconnect-failed[b-n2n17btnhb],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-n2n17btnhb] {
    display: block;
}

#components-reconnect-modal.components-reconnect-retrying .components-reconnect-first-attempt-visible[b-n2n17btnhb] {
    display: none;
}

/* Dialog in the app style: raised slate surface, rounded, soft shadow. */
#components-reconnect-modal[b-n2n17btnhb] {
    width: min(22rem, calc(100vw - 32px));
    margin: 20vh auto;
    padding: 28px 24px 24px;
    border: 0;
    border-radius: 16px;
    /* MudBlazor paints this dialog with --mud-palette-background (!important), so set the variable instead. */
    --mud-palette-background: var(--sh-raised);
    color: var(--mud-palette-text-primary);
    font-family: "Noto Sans", system-ui, sans-serif;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: display 0.3s allow-discrete, overlay 0.3s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-n2n17btnhb 0.3s both;
}

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

#components-reconnect-modal[b-n2n17btnhb]::backdrop {
    background-color: rgba(2, 6, 23, 0.72);
    animation: components-reconnect-modal-fadeInOpacity-b-n2n17btnhb 0.3s ease-in-out;
    opacity: 1;
}

.components-reconnect-container[b-n2n17btnhb] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

#components-reconnect-modal p[b-n2n17btnhb] {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    color: var(--mud-palette-text-primary);
}

#components-reconnect-modal button[b-n2n17btnhb] {
    /* MudBlazor sets margin: 40px auto !important on this button. */
    margin: 4px auto 0 !important;
    min-height: 40px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-background);
    font: 600 15px "Noto Sans", system-ui, sans-serif;
    cursor: pointer;
}

#components-reconnect-modal button:hover[b-n2n17btnhb] {
    background: var(--mud-palette-primary-lighten);
}

#components-reconnect-modal button:focus-visible[b-n2n17btnhb] {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

/* Two expanding rings in the accent colour while reconnecting. */
.components-rejoining-animation[b-n2n17btnhb] {
    position: relative;
    width: 64px;
    height: 64px;
}

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

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

@keyframes components-rejoining-animation-b-n2n17btnhb {
    0%, 4.9% { top: 32px; left: 32px; width: 0; height: 0; opacity: 0; }
    5% { top: 32px; left: 32px; width: 0; height: 0; opacity: 1; }
    100% { top: 0; left: 0; width: 64px; height: 64px; opacity: 0; }
}

@keyframes components-reconnect-modal-slideUp-b-n2n17btnhb {
    0% { transform: translateY(24px) scale(0.96); }
    100% { transform: translateY(0); }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-n2n17btnhb {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

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