/* App base. mds.css is a component system and intentionally does not set a global
   body font/background — the host app provides the baseline that mds- components
   inherit from. */
html, body {
    margin: 0;
    font-family: var(--mds-font, 'Inter', 'Segoe UI', Arial, sans-serif);
    color: var(--mds-title);
    -webkit-font-smoothing: antialiased;
}

/* Reserve the scrollbar lane permanently: content height crossing the viewport must not
   change the layout width (every fr-based grid would reflow — "the plan wobbles"). */
html { scrollbar-gutter: stable; }

/* Blazor's global error banner — hidden unless an unhandled error actually occurs. */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.6rem 1.25rem;
    background: var(--mds-warning-bg);
    color: var(--mds-warning);
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Pre-Blazor boot loader — the SVG in index.html, shown while the WASM runtime
   downloads (before any component renders). Unstyled <circle> elements default to
   a solid black fill; style them on-brand instead: a faint teal track ring plus a
   teal progress ring driven by Blazor's --blazor-load-percentage. */
.loading-progress {
    position: relative;
    display: block;
    width: 5rem; height: 5rem;
    margin: 22vh auto 1rem;
}
.loading-progress circle {
    fill: none;
    stroke: var(--mds-rule);
    stroke-width: 0.5rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: var(--mds-accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.1s ease-in-out;
}
.loading-progress-text {
    position: absolute; inset: calc(22vh + 1.9rem) 0 auto 0;
    text-align: center;
    font-weight: 600; color: var(--mds-title);
}
.loading-progress-text::after { content: var(--blazor-load-percentage-text, "Loading…"); }
