/* Keep contextual controls out of forms and settings; use original filters/counts. */
@media screen {
 #wfContextNav[hidden]{display:none!important}
 html.wf-context-nav-open body #bottomNav{display:none!important}
 html.wf-context-nav-open body .main{padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))!important}
 #wfContextNav{position:fixed;z-index:680;bottom:max(8px,env(safe-area-inset-bottom,0px));left:8px;right:8px;margin-inline:auto;width:auto;max-width:720px;box-sizing:border-box;display:flex;align-items:stretch;gap:4px;padding:6px;background:var(--card,#fff);border:1px solid var(--border,#dce4e8);border-radius:22px;box-shadow:0 8px 28px #173d4a22;color:var(--text,#213d48)}
 #wfContextNav .wf-context-home{flex:0 0 40px;min-width:0;border:0;border-radius:15px;background:color-mix(in srgb,#3f7c94 10%,transparent);color:#3f7c94;cursor:pointer}
 #wfContextNav .wf-context-home svg{width:22px;height:22px}
 #wfContextNav .co-stats-bar{display:flex!important;flex:1;min-width:0;width:auto!important;gap:3px!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;flex-wrap:nowrap!important}
 #wfContextNav .co-stat-pill{position:relative;flex:1 1 0!important;min-width:0!important;max-width:none!important;min-height:64px;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;padding:5px 2px!important;border:0!important;border-radius:15px!important;background:transparent!important;box-shadow:none!important;color:var(--muted,#526974)!important;transform:none!important;cursor:pointer;white-space:normal!important;text-align:center;line-height:1.25;font-size:11px!important;font-weight:650}
 #wfContextNav .co-stat-pill>span:not(.csp-icon):not(.csp-num){min-width:0;overflow-wrap:anywhere}
 #wfContextNav .co-stat-pill.active{background:color-mix(in srgb,#3f7c94 16%,transparent)!important;color:#3f7c94!important}
 #wfContextNav .csp-icon{display:flex!important;align-items:center;justify-content:center;width:22px!important;height:22px!important;margin:0!important;font-size:19px!important;background:transparent!important;color:inherit!important}
 #wfContextNav .csp-icon svg{width:21px!important;height:21px!important}
 #wfContextNav .csp-num{position:absolute;inset-inline-end:1px;top:0;font-size:9px!important;line-height:14px;min-width:14px;padding:0 2px!important;background:var(--card,#fff)!important;color:inherit;border-radius:8px}
 #wfContextNav [role=button]:focus-visible,#wfContextNav button:focus-visible{outline:2px solid #3f7c94;outline-offset:1px}
 @media(min-width:1025px){#wfContextNav{max-width:640px}#wfContextNav .co-stat-pill{font-size:12px!important}}
 @media(prefers-reduced-motion:reduce){#wfContextNav *{animation:none!important;transition:none!important}}
}
@media print{#wfContextNav{display:none!important}}

/* Translated destinations share the existing WOW drawer row and icon treatment. */
@media screen {
 html body #sidebar:not(.wf-icon-rail) .nav-item > span:nth-child(2),
 html body #sidebar:not(.wf-icon-rail) .wf-group-toggle {
   min-width:0;white-space:normal!important;overflow-wrap:anywhere;
 }
 html body #sidebar .nav-item:disabled {opacity:.45;cursor:default;}
}

/* Section controls reuse the existing buttons, cutout and moving circle. */
#bottomNav .wf-task-action {display:none!important}
@media screen and (max-width:1024px){
 html body #mainContent .page.active.wf-shared-actions-docked button[data-wf-shared-dock-source] {display:none!important}
 /* Keep source ancestors rendered while removing their empty fixed-bar shell. */
 html body #mainContent #page-add-company.active.wf-shared-actions-docked #coFormStickyBar {
   padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;
   backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
 }
 html body #mainContent #page-quick-barcode.active.wf-shared-actions-docked .qbl-modes:has(> #qblScanMode[data-wf-shared-dock-source]):has(> #qblBrowseMode[data-wf-shared-dock-source]) {
   padding:0!important;margin:0!important;border:0!important;background:transparent!important;box-shadow:none!important;
 }
 /* The tier overlay is at 1500; independent dialogs retain their 2000+ layer. */
 html body #bottomNav[data-task-mode="context"][data-section="quick-barcode"][data-context-stage="price-tier"] {z-index:1501!important;}
 html body #mainContent #page-quick-barcode.active[data-context-stage="price-tier"] #qblPhase2 {
   --wf-tier-footer-space:calc(96px + env(safe-area-inset-bottom,0px));
   box-sizing:border-box;padding-block:16px var(--wf-tier-footer-space)!important;
 }
 html body #mainContent #page-quick-barcode.active[data-context-stage="price-tier"] #qblTierCard {
   min-block-size:0;max-block-size:calc(100dvh - 16px - var(--wf-tier-footer-space))!important;
   overflow:auto;overscroll-behavior:contain;
 }
 html body #bottomNav[data-task-mode="settings"] .bnav-btn:not(#bnav-2) {display:none!important}
 html body #bottomNav[data-task-mode="settings"] {--nav-x:50%!important;justify-content:center}
 html body #bottomNav[data-task-mode="settings"] #bnavCircle {left:calc(50% - 24px)!important}
 html body #bottomNav[data-task-mode="settings"] #bnav-2 {flex:0 1 11rem}
 html body #bottomNav[data-task-mode="context"] .bnav-btn[hidden] {display:none!important}
 html body #bottomNav[data-task-mode="context"] .bnav-btn {
   min-height:44px;touch-action:manipulation;
 }
 html body #bottomNav[data-task-mode="context"] .bnav-label {
   max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 }
 html body #bottomNav[data-task-mode="context"] .bnav-icon svg {width:22px;height:22px;}
 html body #bottomNav[data-task-mode="context"] .bnav-btn:disabled {opacity:.45;cursor:default;}
 html body #bottomNav[data-task-mode="context"] .bnav-btn[aria-busy="true"] {cursor:wait;}
 html body #page-quick-barcode.active {padding-bottom:calc(126px + env(safe-area-inset-bottom,0px))!important;}
}
