/* =========================================================================
   KIT: CREATE BUTTON (.tasks-fab), the one floating + a page has for making something (New task, New deal, Add to the
   Drive, New request ...). The lead, 9 Nov: create buttons leave the page head; every module uses this one button,
   bottom right on a phone and on a desktop. Moved here from tasks-page.css and desktop.css (same rules, one place).

   Markup: the kit's large square primary icon button, as the last child of its .screen, with the page's words on it for
   screen readers (tr() into aria-label):
     <button type="button" class="tasks-fab verser-icon-btn" data-variant="square primary" data-size="lg"
             id="<page>Fab" aria-label="New deal"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg></button>
   Hide it with .hidden when the page offers no create (no rights, a search open, a selection made).

   Where it sits:
   - Phone: --verser-fab-inset from the inline end, on the agent button's line (--verser-fab-bottom; ui/tokens.css).
   - Desktop (body.desk): the bottom corner of the page area, left of the docked agent (--edge-right, desktop.css);
     above the collapsed agent box (desk-dock-min) and left of the agent's chat window (desk-dock-chat).
   - Arabic: inset-inline-end puts it bottom left on a phone, and on a desktop right of the dock, which mirrors there.
   - A sheet open, or the agent's bubble open (fab.css), and it steps aside.
   The page keeps room for it: the screen it is in ends --verser-fab-reserve above the bottom while it shows.
   ========================================================================= */
.tasks-fab{--verser-icon-button-square-radius:var(--r-compact);--verser-icon-button-size-lg:56px;position:fixed;inset-inline-end:var(--verser-fab-inset);bottom:var(--verser-fab-bottom);z-index:40;box-shadow:var(--shadow-float);
  transition:transform 160ms var(--ease-out),opacity 120ms ease}
.tasks-fab.verser-icon-btn .icon{width:26px;height:26px;stroke-width:2.25}
.tasks-fab:active{transform:scale(.97)}
body.sheet-open .tasks-fab{display:none}
@media (prefers-reduced-motion:reduce){.tasks-fab:active{transform:none;opacity:.72}}

/* ---- The page's last row scrolls clear of it (phone: the scroller; a desktop: the middle column's foot). On a desktop
   with the agent box folded the page already ends the box's room above the window's foot (desktop.css), and the +
   stands --vx-fab-lift higher than usual, over the box: a screen that keeps no room of its own ends that much higher
   while the + shows, so the last row's own buttons (a department's or a person's pencil) still scroll clear of it.
   The rule weighs nothing (:where), so a screen that sets its own foot (Drive, Documents, Inbox, Meetings, Projects,
   Tasks) keeps it as it was, and the room is never counted twice. */
body:not(.desk):not(.agent-fab-on) .screen.active:has(> .tasks-fab:not(.hidden)){padding-bottom:var(--verser-fab-reserve)}
body.desk:has(.screen.active > .tasks-fab:not(.hidden)) .phone{padding-bottom:var(--verser-fab-reserve)!important}
:where(body.desk.desk-dock.desk-dock-min .screen.active:has(> .tasks-fab:not(.hidden))){padding-block-end:var(--vx-fab-lift,0px)}

/* ---- Desktop placement. */
body.desk .tasks-fab{inset-inline-end:var(--edge-right)}
body.desk.desk-dock.desk-dock-min .tasks-fab{translate:0 calc(-1 * var(--desk-fab-lift))}
body.desk.desk-dock.desk-dock-chat .tasks-fab{inset-inline-end:max(var(--edge-right),400px)}
/* Under 1200px the open agent panel floats over the middle at the inline end (desktop.css): the + stands left of it, the
   page's gutter from its edge, instead of under its composer. */
@media (max-width:1199.98px){
  body.desk.desk-dock.desk-dock-open:not(.desk-dock-min,.desk-dock-chat) .tasks-fab{inset-inline-end:calc(min(var(--desk-dock),100vw - var(--rail-w)) + var(--col-right))}
}
