/* 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;
}

/* The brand mark and wordmark SVGs (CwBrandMark, CwBrandWordmark): sized by their containers. */
.cw-mark,
.cw-wordmark {
    display: block;
    width: 100%;
    height: auto;
}

/* The brand opening over the hero (CwHomeOpening.razor, js/home-opening.js). The overlay covers */
/* the hero exactly (its viewBox is the hero's size, set by the script) and may draw beyond it (the */
/* head halos); it takes no pointer events, so nothing is blocked. While it plays the hero's content */
/* waits unseen; at the hand-over it fades into place under the flying mark, in the flight's time. */
#cw-hero {
    position: relative;
}

#cw-opening {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    visibility: hidden;
    pointer-events: none;
    color: var(--foreground);
}

#cw-opening .cw-wordmark-letters {
    fill: currentColor;
}

#cw-hero.is-opening > #cw-opening {
    visibility: visible;
}

#cw-hero.is-opening > :not(#cw-opening) {
    opacity: 0;
    pointer-events: none;
}

#cw-hero.is-arriving > :not(#cw-opening) {
    opacity: 1;
    transition: opacity 900ms cubic-bezier(0.33, 0, 0.15, 1);
}

/* The static mark waits until the flying one has landed on it, so there is never two. */
#cw-hero.is-arriving > #cw-hero-mark {
    opacity: 0;
    transition: none;
}
