/* Base resets and Blazor framework chrome.
   BlazorBlueprint's pre-built stylesheet ships only utilities its components
   need, so the consuming app is still responsible for the global body reset
   and for hiding/showing Blazor's loading and error UI. */

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    background: var(--background, #ffffff);
    color: var(--foreground, #0a0a0a);
}

#app {
    display: contents;
}

/* Loading indicator shown until Blazor WebAssembly has booted. */
.loading-progress {
    position: fixed;
    inset: 0;
    margin: auto;
    width: 4rem;
    height: 4rem;
    display: block;
}

.loading-progress circle {
    fill: none;
    stroke: var(--muted, #e5e7eb);
    stroke-width: 0.5rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--primary, #2563eb);
    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: fixed;
    inset: calc(50% + 3rem) 0 0 0;
    text-align: center;
    font-weight: 500;
    color: var(--muted-foreground, #6b7280);
}

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

/* Error UI is appended by Blazor on uncaught exceptions. Hide by default;
   Blazor sets display: block when there's an error. */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fef3c7;
    color: #78350f;
    padding: 0.75rem 1rem;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

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