/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* The bar Blazor shows when something on the page fails. */
#blazor-error-ui[b-hu2am9satg] {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-error);
    padding: var(--space-3) var(--space-12) var(--space-3) var(--space-5);
    background: var(--down-bg);
    color: var(--text);
    border-top: 1px solid var(--down);
    box-shadow: var(--shadow-2);
}

    #blazor-error-ui .dismiss[b-hu2am9satg] {
        position: absolute;
        right: var(--space-2);
        top: 50%;
        transform: translateY(-50%);
        display: grid;
        place-items: center;
        width: var(--control-size);
        height: var(--control-size);
        padding: 0;
        border: 1px solid var(--control-line);
        border-radius: var(--radius-md);
        background: transparent;
        color: var(--text);
        cursor: pointer;
    }
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
/* The "connection lost" dialog, in the reader's theme. Colours and sizes come from the tokens in tokens.css. */

.components-reconnect-first-attempt-visible[b-ts6rhde6xm],
.components-reconnect-repeated-attempt-visible[b-ts6rhde6xm],
.components-reconnect-failed-visible[b-ts6rhde6xm],
.components-pause-visible[b-ts6rhde6xm],
.components-resume-failed-visible[b-ts6rhde6xm],
.components-rejoining-animation[b-ts6rhde6xm] {
    display: none;
}

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

#components-reconnect-modal[b-ts6rhde6xm] {
    background-color: var(--panel);
    color: var(--text);
    width: min(22rem, calc(100vw - 2 * var(--space-4)));
    margin: 20vh auto;
    padding: var(--space-6);
    border: 1px solid var(--control-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
    opacity: 0;
    transition: display var(--motion-fade) allow-discrete, overlay var(--motion-fade) allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-ts6rhde6xm var(--motion-fade) both;
}

#components-reconnect-modal[open][b-ts6rhde6xm] {
    animation: components-reconnect-modal-slideUp-b-ts6rhde6xm var(--motion-rise) cubic-bezier(.05, .89, .25, 1.02) var(--motion-base), components-reconnect-modal-fadeInOpacity-b-ts6rhde6xm var(--motion-fade) ease-in-out var(--motion-base);
    animation-fill-mode: both;
}

#components-reconnect-modal[b-ts6rhde6xm]::backdrop {
    background-color: var(--scrim);
    animation: components-reconnect-modal-fadeInOpacity-b-ts6rhde6xm var(--motion-fade) ease-in-out;
    opacity: 1;
}

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

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

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

    100% {
        opacity: 1;
    }
}

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

    100% {
        opacity: 0;
    }
}

.components-reconnect-container[b-ts6rhde6xm] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

#components-reconnect-modal h2[b-ts6rhde6xm] {
    margin: 0;
    font-size: var(--type-lg);
    font-weight: var(--weight-heavy);
    color: var(--text);
}

#components-reconnect-modal p[b-ts6rhde6xm] {
    margin: 0;
    text-align: center;
    color: var(--text);
}

#components-reconnect-modal button[b-ts6rhde6xm] {
    border: 1px solid var(--action);
    background-color: var(--action);
    color: var(--action-ink);
    font-weight: var(--weight-bold);
    min-height: var(--control-size);
    padding: var(--space-1-5) var(--space-6);
    border-radius: var(--radius-md);
}

    #components-reconnect-modal button:hover[b-ts6rhde6xm] {
        background-color: var(--action-hover);
    }

    #components-reconnect-modal button:active[b-ts6rhde6xm] {
        background-color: var(--action-active);
    }

    #components-reconnect-modal button:focus-visible[b-ts6rhde6xm] {
        outline: var(--focus-width) solid var(--focus);
        outline-offset: var(--focus-offset);
    }

/* The second choice ("Reload the page"): an outlined button, so "Try again" stays the main one. */
#components-reconnect-modal button.components-reload[b-ts6rhde6xm] {
    background-color: transparent;
    color: var(--text);
    border-color: var(--control-line);
}

    #components-reconnect-modal button.components-reload:hover[b-ts6rhde6xm],
    #components-reconnect-modal button.components-reload:active[b-ts6rhde6xm] {
        background-color: var(--panel-2);
    }

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

    .components-rejoining-animation div[b-ts6rhde6xm] {
        position: absolute;
        border: 3px solid var(--link);
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation-b-ts6rhde6xm var(--motion-rise) cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

        .components-rejoining-animation div:nth-child(2)[b-ts6rhde6xm] {
            animation-delay: calc(-1 * var(--motion-fade));
        }

@keyframes components-rejoining-animation-b-ts6rhde6xm {
    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;
    }
}

/* Less motion: no sliding dialog and no pulsing rings. The words say what is happening. */
@media (prefers-reduced-motion: reduce) {
    #components-reconnect-modal[b-ts6rhde6xm],
    #components-reconnect-modal[open][b-ts6rhde6xm],
    #components-reconnect-modal[b-ts6rhde6xm]::backdrop {
        animation: none;
        opacity: 1;
        transition: none;
    }

    .components-rejoining-animation div[b-ts6rhde6xm] {
        animation: none;
        top: 10px;
        left: 10px;
        width: 60px;
        height: 60px;
        opacity: .6;
    }

        .components-rejoining-animation div:nth-child(2)[b-ts6rhde6xm] {
            display: none;
        }
}
