#blazor-error-ui {
    align-items: center;
    background: #2a2a33;
    border-top: 3px solid #b32121;
    bottom: 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.22);
    color: #ffffff;
    display: none;
    gap: 1rem;
    left: 0;
    padding: 1rem 1.25rem;
    position: fixed;
    right: 0;
    z-index: 10000;
}

#blazor-error-ui .reload {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    color: #ffffff;
    margin-left: auto;
    text-decoration: none;
}

#components-reconnect-modal {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    color: #2a2a33;
    max-width: min(420px, calc(100vw - 32px));
    padding: 0;
}

#components-reconnect-modal::backdrop {
    background: rgba(20, 20, 28, 0.42);
}

.components-reconnect-container {
    align-items: center;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.components-reconnect-container p {
    margin: 0;
}

.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible,
#components-reconnect-modal.components-reconnect-rejected .components-reconnect-failed-visible,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible {
    display: block;
}

#components-reconnect-modal button,
.circuit-recovery-panel button,
.circuit-recovery-notice button {
    background: #2a2a33;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0.65rem 1rem;
}

#components-reconnect-modal .circuit-reload-button {
    background: #f1f1f4;
    color: #2a2a33;
}

.components-rejoining-animation {
    height: 42px;
    position: relative;
    width: 42px;
}

.components-rejoining-animation div {
    animation: circuit-recovery-pulse 1.25s ease-in-out infinite;
    border: 3px solid #2a2a33;
    border-radius: 50%;
    inset: 0;
    opacity: 0;
    position: absolute;
}

.components-rejoining-animation div:nth-child(2) {
    animation-delay: 0.35s;
}

.circuit-recovery-notice {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(42, 42, 51, 0.14);
    border-left: 4px solid #2a2a33;
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
    color: #2a2a33;
    display: flex;
    gap: 1rem;
    max-width: min(520px, calc(100vw - 32px));
    padding: 1rem;
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 10001;
}

.circuit-recovery-notice button {
    border-radius: 999px;
    height: 28px;
    line-height: 1;
    padding: 0;
    width: 28px;
}

.circuit-recovery-overlay {
    align-items: center;
    background: rgba(20, 20, 28, 0.42);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 10002;
}

.circuit-recovery-panel {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    color: #2a2a33;
    max-width: 420px;
    padding: 1.5rem;
    text-align: center;
}

.circuit-recovery-panel strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.circuit-recovery-panel p {
    margin: 0 0 1rem;
}

@keyframes circuit-recovery-pulse {
    0% {
        opacity: 0.6;
        transform: scale(0.3);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

@media (max-width: 600px) {
    #blazor-error-ui {
        align-items: flex-start;
        flex-direction: column;
    }

    #blazor-error-ui .dismiss {
        position: absolute;
        right: 1rem;
        top: 1rem;
    }

    .circuit-recovery-notice {
        left: 1rem;
        right: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .components-rejoining-animation div {
        animation: none;
        opacity: 0.5;
    }
}
