/* Tailwind v4 / Flowbite preflight overrides */
/* Flowbite's plugin adds border-width to headings; reset to prevent visible borders */
/* Also reset outline: Blazor focus management can set focus on headings after navigation */
h1, h2, h3, h4, h5, h6 {
    border-width: 0;
    outline: none;
}

/* Blazor framework override styles */

/* Blazor validation message styling */
.validation-message {
    color: var(--destructive);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Blazor unhandled error banner (hidden until Blazor JS shows it) */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background-color: var(--card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
}

/* Blazor error boundary fallback */
.blazor-error-boundary {
    background-color: color-mix(in srgb, var(--destructive) 8%, transparent);
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--destructive) 20%, transparent);
    border-radius: 0.5rem;
    color: var(--destructive);
}

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

/* Blazor reconnection modal visibility — controlled by Blazor's CSS class toggles */
#components-reconnect-modal {
    display: none;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected,
#components-reconnect-modal.cw-connection-lost {
    display: block;
}
