/*
 * Server-wide announcement banner (ui.banner.* properties). Markup is built by UiBanner and
 * used by both includes/banner.jsp and FrontendIndexHtmlTransformer, so the appearance lives
 * here rather than being inlined twice. Class names are prefixed to keep fna-ui global styles
 * from reaching in.
 */

.fna-banner {
    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    width: 100%;
    min-height: 36px;
    padding: 6px 16px;

    color: #fff;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
}

.fna-banner a {
    color: #fff;
    text-decoration: underline;
}

.fna-banner--info {
    background-color: #006acc;
}

.fna-banner--warning {
    background-color: #c47416;
}

.fna-banner--error {
    background-color: #be331a;
}

/*
 * Server-rendered pages: the banner is in the normal flow. The stacking context is needed on
 * the landing page, where #particle-canvas is fixed over the whole viewport at z-index 0.
 */
.fna-banner--inline {
    position: relative;
    z-index: 1;
}

/*
 * Angular shell: the banner is injected outside app-root, so it cannot take part in the
 * application layout and has to be positioned over it. z-index sits above the dashboard
 * sidenav (1005/1006) but below the navbar (1050), fna-ui popups (1051-1060) and Bootstrap
 * modals (backdrop 1050, dialog 1055), so it never covers a dialog or escapes its backdrop.
 */
.fna-banner--fixed {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1049;
}

/*
 * The workspace statusbar (arc/vertex counts) is itself fixed at bottom:0 and 36px tall, so
 * the banner would cover it. Sit above it on the screens that have one.
 */
body:has(statusbar) .fna-banner--fixed {
    bottom: 36px;
}

/* Keep content that ends at the bottom of a scrolling page clear of the bar. */
body:has(.fna-banner--fixed) {
    padding-bottom: 36px;
}
