*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: var(--flare-typescale-body-large-font, 'Roboto', sans-serif);
    background: var(--flare-color-background, #fffbfe);
    color: var(--flare-color-on-background, #1c1b1f);
    height: 100%;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; font-size: 1.25rem; line-height: 1; float: right; }

.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred." }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}
.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: #6750a4;
    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;
}
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }

/* ── Icon Browser ── */
.icon-browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
    gap: 0.5rem;
}
.icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--flare-color-outline-variant);
    border-radius: var(--flare-shape-small);
    background: var(--flare-color-surface);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    min-height: 5.5rem;
}
.icon-card:hover {
    background: var(--flare-color-surface-variant);
    border-color: var(--flare-color-outline);
}
.icon-card__label {
    font-size: 0.65rem;
    color: var(--flare-color-on-surface-variant);
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
}

/* App shell, sticky app bar, drawer behavior AND content padding are all provided by the
   FlareLayout component system -- the Gallery adds no layout CSS of its own. The two-column doc
   layout (content + "On this page" rail) and the Custom Theme page are likewise built entirely from
   Flare primitives (FlareGrid / FlareStack / FlareCol + design tokens), so they add no CSS here. */
