/*
 * Critical CSS for the funnel bootstrap loader.
 *
 * Included via <f:asset.css priority="1"> as a <link> in the <head> so the
 * loader overlay is visible immediately without waiting for Vite to resolve
 * the app bundle including assets/funnel.css.
 *
 * Intentionally kept small: only loader + app-container visibility.
 */

#igs-funnel-app[data-mounted="0"] {
    visibility: hidden;
}

#igs-funnel-loader {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--loader-bg, #ffffff);
    color: var(--loader-fg, #0a0a0a);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#igs-funnel-loader.igs-funnel-loader--hidden {
    opacity: 0;
    pointer-events: none;
}

#igs-funnel-loader .igs-funnel-loader__logo {
    max-width: 180px;
    max-height: 80px;
    object-fit: contain;
}

#igs-funnel-loader .igs-funnel-loader__spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid color-mix(in srgb, var(--loader-accent, #e2001a) 25%, transparent);
    border-top-color: var(--loader-accent, #e2001a);
    animation: igs-funnel-loader-spin 0.8s linear infinite;
}

@keyframes igs-funnel-loader-spin {
    to { transform: rotate(360deg); }
}

#igs-funnel-loader .igs-funnel-loader__text {
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0.8;
}
