/* Blazor 启动进度与运行时错误 UI。用色取自 app.css 里的 --loading-* 变量。 */

#blazor-error-ui {
    color-scheme: light;
    background: rgba(30, 30, 45, 0.95);
    color: #f5f5f7;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    box-sizing: border-box;
    display: none;
    left: 50%;
    right: auto;
    bottom: 1rem;
    width: min(52rem, calc(100vw - 2rem));
    transform: translateX(-50%);
    padding: 0.85rem 4rem 0.85rem 1rem;
    position: fixed;
    z-index: 2000;
}

    #blazor-error-ui .reload {
        color: #4fc0f0;
        font-weight: 600;
        margin-left: 0.5rem;
        text-decoration: none;
    }

        #blazor-error-ui .reload:hover {
            text-decoration: underline;
        }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 1rem;
        top: 0.55rem;
        width: 1.75rem;
        height: 1.75rem;
        line-height: 1.65rem;
        text-align: center;
        border-radius: 999px;
        color: #d7d7df;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

        #blazor-error-ui .dismiss:hover {
            background: rgba(255, 255, 255, 0.12);
        }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "组件发生错误。";
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var(--loading-track);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #0098dc;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: var(--loading-text);
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "载入中…");
    }
