body .bb-reorder-handle,body #lines .grip{display:grid;place-items:center;flex:none;width:44px;min-width:44px;min-height:44px;padding:4px;margin:0;border:1px solid transparent;background:transparent;color:var(--muted);font:600 22px/1 system-ui;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
body .bb-reorder-handle:hover,body #lines .grip:hover{background:var(--surface-secondary);color:var(--foreground);border-color:var(--border)}
body .bb-sortable:not(.bb-reorder-enabled) :is(.bb-reorder-handle,[data-drag]){display:none!important}
html body .bb-reorder-toggle{display:inline-grid;place-items:center;flex:none;width:30px;min-width:30px;height:30px;min-height:30px;padding:7px;border:0!important;border-radius:5px;background:transparent!important;color:var(--focus,#237bab)!important;cursor:pointer;touch-action:manipulation;opacity:.8}
html body .bb-reorder-toggle svg{width:14px;height:14px;display:block;pointer-events:none}
html body .bb-reorder-toggle:hover{background:var(--surface-secondary,#eaf3f9)!important;opacity:1}
html body .bb-reorder-toggle[aria-pressed=true]{background:var(--surface-secondary,#eaf3f9)!important;color:var(--focus,#237bab)!important;opacity:1}
html body .bb-reorder-toggle:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.bb-reorder-tools{display:flex;justify-content:flex-end;padding:6px 10px}
#app-menu-panel .qs-navigation-heading .bb-reorder-toggle{margin-left:auto;margin-right:8px}
html body #view-builder #lines:not(.bb-reorder-enabled) .line.section .line-top{grid-template-columns:32px minmax(0,1fr) 44px}
html body #view-catalog.ops-surface .bb-sortable:not(.bb-reorder-enabled) .bb-cat-row>:is(.bb-cat-open,.bb-cat-material-top){width:100%}
@media(pointer:coarse),(max-width:680px){html body .bb-reorder-toggle{width:32px;min-width:32px;height:32px;min-height:32px;padding:9px}}
body.bb-drag-active,body.bb-drag-active *{cursor:grabbing!important;user-select:none!important}
.bb-is-dragging{opacity:.45}
.bb-reorder-ghost{position:fixed;inset:0 auto auto 0;z-index:20000;pointer-events:none;width:220px;padding:12px;border:1px solid var(--accent);border-radius:8px;background:var(--surface);color:var(--foreground);box-shadow:0 6px 24px #0004;font:600 14px/1.4 var(--font-sans);overflow-wrap:anywhere}
.bb-reorder-marker{position:fixed;z-index:20001;background:var(--accent);box-shadow:0 0 0 1px var(--accent-foreground);pointer-events:none;border-radius:3px}
.bb-reorder-message{position:fixed;z-index:20002;bottom:90px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 32px);padding:12px 18px;background:var(--surface);color:var(--foreground);border:1px solid var(--border);border-left:4px solid var(--accent);border-radius:8px;box-shadow:0 4px 22px #0003;font:500 14px/1.5 var(--font-sans)}
.bb-reorder-message[data-error="true"]{border-left-color:var(--danger)}
.bb-sort-menu-row{display:flex;align-items:center;gap:2px;min-width:0}
.bb-sort-menu-row>.tab,.bb-sort-menu-row>a{flex:1;min-width:0;width:auto}
html body .bb-sort-menu-row:has(>[hidden]){display:none!important}
.bb-menu-parent-row:has(>details){align-items:flex-start}
.bb-menu-parent-row>details{flex:1;min-width:0;width:auto}
.bb-menu-parent-row>details>summary{min-height:44px}
.bb-menu-child-row>*:not(.bb-reorder-handle){flex:1;min-width:0;width:auto}
.bb-reorder-hint{font-size:12px;line-height:1.5;color:var(--muted);margin:4px 0 12px}
html body #view-builder .line.section .line-top{grid-template-columns:44px 32px minmax(0,1fr) 44px}
body #view-builder .line.section .grip{color:var(--bb-brand-muted)}
body #view-builder .line.section .grip:hover{background:#ffffff15;color:var(--bb-brand-foreground)}
.bb-cat-row{position:relative}
.bb-cat-row>.bb-reorder-handle{position:absolute;right:8px;top:10px;z-index:1}
#view-catalog.ops-surface .bb-cat-row>.bb-reorder-handle+.bb-cat-open,#view-catalog.ops-surface .bb-cat-row>.bb-reorder-handle+.bb-cat-material-top{width:calc(100% - 44px)}
@media print{.bb-reorder-toggle,.bb-reorder-tools,.bb-reorder-handle,.bb-reorder-hint,.bb-reorder-message,.bb-reorder-ghost,.bb-reorder-marker{display:none!important}}
