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AyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

/* ------------------------------------------------------------------------- */
/* MudBlazor v9 input label behavior                                         */
/* ------------------------------------------------------------------------- */
/* MudGlobal.InputDefaults.ShrinkLabel was removed in v9. To preserve the   */
/* previous global behavior (labels always shrunk to avoid overlap with     */
/* pre-filled values), we force the "shrunk" transform for all MudBlazor    */
/* input labels via CSS instead of per-component ShrinkLabel parameters.    */

/* Base shrink transform for all input labels */
.mud-input ~ label.mud-input-label.mud-input-label-inputcontrol {
    transform: translate(0, 1.5px) scale(0.75);
    transform-origin: top left;
    /* Prefer design-token muted text so labels stay readable in dark theme.
       MudBlazor Secondary/TextSecondary can read near-invisible on slate-950. */
    color: var(--muted-foreground);
}

/* Filled variant */
.mud-input ~ label.mud-input-label.mud-input-label-inputcontrol.mud-input-label-filled {
    transform: translate(12px, 10px) scale(0.75);
    max-width: calc((100% - 12px) / 0.75);
}

/* Outlined variant — Mud's standard shrink-to-notch position.
   Paint a solid surface behind the label so the fieldset border (including
   destructive red on validation failure) does not strike through the text.
   Forms sit on cards / dialogs / page chrome that map to --card. */
.mud-input ~ label.mud-input-label.mud-input-label-inputcontrol.mud-input-label-outlined {
    transform: translate(14px, -6px) scale(0.75);
    max-width: calc((100% - 14px) / 0.75);
    background-color: var(--card);
    padding-inline: 0.25rem;
    z-index: 1;
}

/* Dense / small outlined fields use the same notch cover. */
.mud-input-control-margin-dense .mud-input ~ label.mud-input-label.mud-input-label-outlined,
.mud-input-control-margin-dense .mud-input ~ label.mud-input-label.mud-input-label-inputcontrol.mud-input-label-outlined {
    background-color: var(--card);
    padding-inline: 0.25rem;
}

/* Helper / counter text under Mud inputs — same token for dark-theme contrast */
.mud-input-helper-text,
.mud-input-control .mud-input-helper-text,
.mud-counter-text {
    color: var(--muted-foreground) !important;
}

/* Mud HelperOnFocus uses translateY(-100%) until focus — keep helpers below. */
.mud-input-helper-text.mud-input-helper-onfocus,
.mud-input-control:focus-within .mud-input-helper-text.mud-input-helper-onfocus,
.mud-input-control.mud-input-error .mud-input-helper-text.mud-input-helper-onfocus {
    transform: none !important;
}

.mud-input-control .mud-input-helper-text {
    margin-top: 0.25rem !important;
}

/* Helper / counter text under Mud inputs — same token for dark-theme contrast */
.mud-input-helper-text,
.mud-input-control .mud-input-helper-text,
.mud-counter-text {
    color: var(--muted-foreground) !important;
}

/* Fix for Blazor Server hot reload compile error overlay blocking UI */
/* Hide the overlay when it's empty or doesn't contain actual error content */
/* The JavaScript in hot-reload-overlay-fix.js will handle the dynamic hiding */
#dotnet-compile-error:empty {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Default: disable pointer events to prevent blocking, JavaScript will enable if there's actual content */
#dotnet-compile-error {
    pointer-events: none;
}

/* When overlay has actual content (handled by JavaScript), it will be made visible */
#dotnet-compile-error.has-content {
    pointer-events: auto;
}

/* Development circuit recovery (dev-circuit-recovery.js) — calm restart UX */
html[data-tnpt-dev-circuit="restarting"] #components-reconnect-modal {
    display: none !important;
}

#tnpt-dev-circuit-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: color-mix(in oklab, var(--background) 82%, transparent);
    backdrop-filter: blur(6px);
    color: var(--foreground);
}

#tnpt-dev-circuit-overlay[data-state="visible"] {
    display: flex;
}

.tnpt-dev-circuit-overlay__card {
    width: min(28rem, 100%);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--card);
    color: var(--card-foreground);
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: none;
}

.tnpt-dev-circuit-overlay__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    line-height: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}

.tnpt-dev-circuit-overlay__title {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
}

.tnpt-dev-circuit-overlay__status {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--foreground);
}

.tnpt-dev-circuit-overlay__hint {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--muted-foreground);
}

/* Fallback when Tailwind JIT does not emit arbitrary min-height (page loading / access placeholders) */
.page-content-placeholder {
    min-height: max(45vh, calc(100dvh - 10rem));
}