/* FB-593 — the update banner of a tab that owns live crew work, and the chip that keeps a
   deferred update one click away (boot/live-work-update-banner.js). Non-blocking: it sits
   above the page and never takes focus on its own. */
.lani-live-work-update-banner {
    position: fixed;
    anchor-name: --lani-update-banner;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-surface);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: var(--lh-snug);
}

/* FB-711 G4 — a Forge dialog open while the banner is up starts under it. The overlay (forge.css) covers
   the page from its top, and the banner sits over that: at 375px the banner wraps to three rows (93px on
   fast) and covered the dialog's title and first help line. The banner's height follows its sentence and
   the width, so the overlay's top is the banner's bottom edge, not a number; the dialog is then bounded by
   what is left, which keeps its buttons on screen. The banner is the first child of <body>, so it is laid
   out before any overlay. Where anchors are not supported the two rules read as before. */
body:has(> .lani-live-work-update-banner) .forge-dialog-overlay {
    top: anchor(--lani-update-banner bottom, 0px);
}

body:has(> .lani-live-work-update-banner) .forge-dialog-overlay > .forge-dialog {
    max-height: 100%;
}

/* The crew workspace's two side drawers start under it as well. The Manager rail's drawer
   (forge-manager-rail-cards.css) and the object inspector (forge-prime-workspace.css) are fixed from the
   top edge of the screen with their Close in the top right corner, which is where the banner is. Read in
   a browser at 412px, 884px, 900px and 1280px: the banner covered 15 of 15 points of the rail drawer's
   Close and 10 to 15 of 15 of the inspector's, so neither drawer could be closed while the banner was up.
   Each drawer's top is the banner's bottom edge, as the dialog overlay's is: the banner stays whole and
   the drawer keeps the rest of the screen's height. Where the import panel has made the banner a row
   (forge-parts/diff-viewer.css) it is still the anchor. Where anchors are not supported both drawers
   read as before. */
body:has(> .lani-live-work-update-banner) .forge-rail-drawer,
body:has(> .lani-live-work-update-banner) .forge-object-inspector {
    top: anchor(--lani-update-banner bottom, 0px);
}

.lani-live-work-update-banner[data-step="dispatch-timeout"],
.lani-live-work-update-banner[data-step="failed"] {
    border-left-color: var(--status-warning);
}

.lani-live-work-update-banner button,
.lani-update-ready-chip {
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    font-weight: 600;
    cursor: pointer;
}

.lani-live-work-update-banner button[data-action="update-now"],
.lani-live-work-update-banner button[data-action="update-anyway"] {
    background: var(--accent);
    border-color: transparent;
    color: #fff; /* as .btn-primary (lani-ui.css) */
}

/* The chip is a third child of the status bar, whose groups give up no width and which
   scrolls sideways when its items outrun the screen (FB-693, shell.css). A chip that could
   shrink took what was left there, wrapped to two lines and was cut off by the 24px bar. It
   keeps its one line and its own width, and the bar scrolls to it. */
.lani-update-ready-chip {
    flex: none;
    margin-left: auto;
    padding: 0 8px;
    font-size: var(--fs-meta);
    white-space: nowrap;
}
