/* The contact bubble of every signed-in page (V1.74, owner 2026-11-15; Client\Shared\Os\OsContactBubble.razor): a round button
   at the bottom right and its panel (help from TTech, AI help, the app's training, a feature suggestion). Design system 1.0
   (Refined Lode): tokens only (tokens.css), light and dark from them. The toasts are at the bottom LEFT (Program.cs), so the
   bubble never covers them; the tour's offer and card and the public-visit notice take the same corner, so the bubble steps
   aside while they show, and so do the open menus, selects and pickers (it sits under the drawers and popovers). The page of a
   signed-in person keeps room at its end (main.content.has-bubble: the bubble's size + twice its gap, the safe area of a phone
   included) so the last row, card or button (pagination, Save, Send, a reply) always scrolls clear of it. Owner 2026-11-16 (it
   hid the end of a table row on a desktop, sat over a card on a phone): smaller on a phone (44 px, the tap target's minimum),
   aside while any modal is open (a dialog, sheet, drawer, lightbox: [aria-modal="true"], MudBlazor's overlays, the app sheet),
   and the sticky bottom bars of the phone pages keep their right end free for it (their buttons never under it). Hidden inside
   a frame, on the wall and in print. */
.os-bubble { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: calc(var(--os-z-drawer) - 10);
  display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 10px; pointer-events: none; }
.os-bubble > * { pointer-events: auto; }
.os-bubble__button { display: inline-grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid var(--os-border);
  border-radius: var(--os-radius-pill); background: var(--os-accent-fill); color: var(--os-on-accent-fill); box-shadow: var(--os-shadow-3); cursor: pointer;
  transition: background var(--os-dur-2) var(--os-ease-standard), transform var(--os-dur-2) var(--os-ease-standard); }
.os-bubble__button:hover { background: var(--os-accent-fill-hover); transform: translateY(-1px); }
.os-bubble__button:focus-visible { outline: 2px solid var(--os-focus); outline-offset: 3px; }
.os-bubble__button i[data-i] { width: 24px; height: 24px; }
.os-bubble.is-open .os-bubble__button { background: var(--os-surface-raised); color: var(--os-text); }
.os-bubble__back { position: fixed; inset: 0; z-index: -1; }
.os-bubble__panel { display: flex; flex-direction: column; width: min(340px, calc(100vw - 32px)); max-height: calc(100dvh - var(--os-topbar-h, 56px) - 96px); overflow-y: auto;
  border: 1px solid var(--os-border); border-radius: var(--os-radius-lg); background: var(--os-surface-raised); box-shadow: var(--os-shadow-4); color: var(--os-text);
  animation: os-bubble-in var(--os-dur-2) var(--os-ease-out); }
.os-bubble__panel:focus { outline: none; }
.os-bubble__panel:focus-visible { outline: 2px solid var(--os-focus); outline-offset: 2px; }
.os-bubble__head { padding: 14px 16px 10px; border-bottom: 1px solid var(--os-border-subtle); }
.os-bubble__title { font: var(--os-type-h4); }
.os-bubble__list { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.os-bubble__item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px; border: 0; border-radius: var(--os-radius-md);
  background: transparent; color: var(--os-text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.os-bubble__item:hover { background: var(--os-surface-hover); }
.os-bubble__item:focus-visible { outline: 2px solid var(--os-focus); outline-offset: -2px; }
.os-bubble__item[aria-disabled="true"] { cursor: default; opacity: 0.6; }
.os-bubble__item[aria-disabled="true"]:hover { background: transparent; }
.os-bubble__icon { display: inline-grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: var(--os-radius-pill);
  background: var(--os-accent-soft); color: var(--os-accent-text); }
.os-bubble__icon i[data-i] { width: 20px; height: 20px; }
.os-bubble__text { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.os-bubble__text b { font: var(--os-type-button); }
.os-bubble__note { margin: 4px 8px 6px; }
@keyframes os-bubble-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .os-bubble__panel { animation: none; } .os-bubble__button { transition: none; } }
/* Tucked (bubble.js: the page's content runs under the bubble): a slim tab against the right edge, beside the page's scroll bar, in the
   page's own margin (the panels and cards start 28 px or more from the edge), so it covers no row, card or button; the pointer or the
   keyboard's focus on it, the round button again. A tap or a click on the tab opens the panel as before. */
.os-bubble[data-tucked]:not(.is-open) { right: max(var(--bubble-sb, 0px), env(safe-area-inset-right)); }
.os-bubble[data-tucked]:not(.is-open) .os-bubble__button:not(:hover, :focus-visible) { width: 24px; justify-items: start; padding-left: 4px; border-right: 0;
  border-radius: var(--os-radius-pill) 0 0 var(--os-radius-pill); box-shadow: var(--os-shadow-2); }
.os-bubble[data-tucked]:not(.is-open) .os-bubble__button:not(:hover, :focus-visible) i[data-i] { width: 18px; height: 18px; }
.os-bubble__button { transition: background var(--os-dur-2) var(--os-ease-standard), transform var(--os-dur-2) var(--os-ease-standard), width var(--os-dur-2) var(--os-ease-standard); }
.os-bubble { transition: right var(--os-dur-2) var(--os-ease-standard); }
@media (prefers-reduced-motion: reduce) { .os-bubble, .os-bubble__button { transition: none; } }
/* Room at the page's end: 52 + 16 above + 16 below (phone: 44 + 12 + 12), more where a phone's safe area lifts the bubble */
main.content.has-bubble { padding-bottom: calc(68px + max(16px, env(safe-area-inset-bottom))); }
/* The sticky bottom bars (phone pages, Save bars) and the Work orders tab bar: their right end stays free, the bubble sits there */
html:not(.framed, .wall-mode) main.content.has-bubble :is(.pa-pbtns, .fo-actions, .fo-nav, .moc-phfoot, .ptw-mine__bar, .hs-phfoot, .sd-my__bar,
  .dt-sticky-save, .bk-save, .wo-tabbar, .ota-lookup__actions) { padding-right: 64px; }
@media (max-width: 600px) {
  .os-bubble { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .os-bubble__button { width: 44px; height: 44px; box-shadow: var(--os-shadow-2); }
  .os-bubble__button i[data-i] { width: 22px; height: 22px; }
  .os-bubble__panel { width: calc(100vw - 24px); }
  main.content.has-bubble { padding-bottom: calc(56px + max(12px, env(safe-area-inset-bottom))); }
  html:not(.framed, .wall-mode) main.content.has-bubble :is(.pa-pbtns, .fo-actions, .fo-nav, .moc-phfoot, .ptw-mine__bar, .hs-phfoot, .sd-my__bar,
    .dt-sticky-save, .bk-save, .wo-tabbar, .ota-lookup__actions) { padding-right: 56px; }
}
body:has(.tour-offer, .tour-card, .pv-notice, .ask-page, .m2-help-pop, .mud-popover-open) .os-bubble { display: none; }
/* A modal open (a dialog, a sheet, a drawer, a lightbox, the app sheet, the command bar): the bubble steps aside, never over its buttons */
body:has([aria-modal="true"], .mud-overlay, .mud-dialog-container, .os-appsheet.is-open, .ota-lookup-host.is-open:not(.is-phone), .cn-drawer-back,
  .dhr-focus-backdrop, .flt-overlay, .ota-overlay, .ptw-overlay, .wo-scrim, .mk-present, .dc-cab-page) .os-bubble { display: none; }
/* No bubble there: the page's own padding back (app.css, monitoring.css) */
html.framed main.content.has-bubble { padding-bottom: 8px; }
html.wall-mode main.content.has-bubble { padding-bottom: 14px; }
[data-density="wall"] main.content.has-bubble { padding-bottom: 12px; }
html.framed .os-bubble, html.wall-mode .os-bubble, [data-density="wall"] .os-bubble { display: none; }
@media print { .os-bubble { display: none; } }
/* Support requests' form opened by "Suggest a feature" (?category=suggestion): the category's line above the subject */
.sup-category { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.sup-category .os-tag i[data-i] { width: 14px; height: 14px; margin-right: 4px; }
