﻿body {
    --body-font: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-family: var(--body-font);
    --blazor-load-percentage: #B30000 !important;
}

/* Blazor 10 */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    margin: 20px 0;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::before {
        content: "An error has occurred. "
    }

.loading-screen {
    align-items: center;
    display: flex;
    flex-direction: column;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 1;
    background-color: var(--colorNeutralBackground1, #ffffff);
    gap: 1.5rem;
}

.loading-logo {
    height: auto;
    width: 14rem;
    max-width: 60vw;
    animation: loading-pulse 2s ease-in-out infinite;
}

.loading-progress-bar {
    width: 12rem;
    max-width: 50vw;
    height: 4px;
    background: var(--colorNeutralStroke2, #e0e0e0);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-progress-fill {
    height: 100%;
    background: #B30000;
    width: var(--blazor-load-percentage, 0%);
    transition: width 0.15s ease-out;
    border-radius: 2px;
}

.loading-progress-text {
    align-items: center;
    display: flex;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--colorNeutralForeground2, #616161);
    justify-content: center;
    text-align: center;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

@keyframes loading-pulse {
    0%, 100% { opacity: 0.92; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* Indeterminate variant: used post-boot (e.g. RecoveryHost) when there is no real byte-load
   percentage to report, so the fill sweeps continuously instead of tracking --blazor-load-percentage. */
.loading-progress-fill.indeterminate {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    animation: loading-progress-indeterminate 1.4s ease-in-out infinite;
}

@keyframes loading-progress-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

.newsui-recovery-message {
    margin: 0;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--colorNeutralForeground2, #616161);
    text-align: center;
}

.loading-screen .news-source-recovery-status {
    border-bottom: none;
    background: transparent;
    flex-direction: column;
    text-align: center;
}

/* Shell-level status messages raised outside the Blazor workspace (PWA update fallback,
   recovery/retry status, workspace refresh status). The region is pinned over the workspace
   header at exactly the header's height and tints it, so a message reads as part of the shell
   chrome instead of pushing the workspace down. It paints nothing and intercepts no pointer
   input while there is no message to show. */
#system-status-messages {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--sp-header-height, 3rem);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0;
    text-align: center;
    pointer-events: none;
    background: transparent;
    transition: background-color 0.2s ease;
    text-align: center;
}

    #system-status-messages:empty {
        display: none;
    }

    /* The Blazor-hosted message mounts into a static host element, so the region can never be
       :empty once the app has booted. Tint the header only while a message is really present;
       where :has() is unavailable the region simply stays transparent and the messages still
       show against their own backgrounds. A fixed light gray rather than a Fluent token: this
       region lives outside #app, where the workspace's .dark-mode class never reaches it. */
    #system-status-messages:has(> * > *),
    #system-status-messages:has(> .sourcepro-pwa-update-fallback),
    #system-status-messages:has(> .sourcepro-pwa-recovery-status) {
        background: #f0f0f0;
        border-bottom: 1px solid #d8d8d8;
    }

    /* Hosts for root components declared in index.html: they exist only as mount points and
       must not add a box of their own to the region's flex flow. */
    #workspace-activity-hairline,
    #workspace-status-message {
        display: contents;
    }

    #system-status-messages > *,
    #system-status-messages > * > * {
        pointer-events: auto;
        max-width: 100%;
    }

    /* Hosted messages are positioned by the section, not by themselves. */
    #system-status-messages > .sourcepro-pwa-update-fallback,
    #system-status-messages > .sourcepro-pwa-recovery-status {
        position: static;
        top: auto;
        left: auto;
        transform: none;
    }

    /* System messages span the full browser width and fill the header band, so the 50% tint on
       the section is the message surface itself rather than a pill floating on top of it. */
    #system-status-messages .newsui-workspace-status,
    #system-status-messages > .sourcepro-pwa-recovery-status {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
        height: 100%;
        padding: 0.25rem 1rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #242424;
        font-size: 0.875rem;
        box-shadow: none;
    }

        #system-status-messages .newsui-workspace-status button,
        #system-status-messages > .sourcepro-pwa-recovery-status button {
            border: 1px solid currentColor;
            border-radius: 0.25rem;
            background: transparent;
            color: inherit;
            cursor: pointer;
            font: inherit;
            padding: 0.25rem 0.6rem;
        }

code {
    color: #c02d76;
}

/* Blazor 10 */
