/* ===========================================================================
   Re-export board: suggestion list, Edit bulk bar, fill preview, Loaded-tab
   selection, comment source tags, status colours (owner rules 4 Dec 2026).
   Colours follow the production top bar (#0a5989). css/themes.css paints
   every div / button of the light theme, so the rules here start at :root and
   the bar uses !important to keep its own colours.
   =========================================================================== */
:root { --rxb-nav: #0a5989; --rxb-nav-2: #084970; --rxb-surface: #fff; --rxb-surface-2: #f3f8fb; --rxb-line: #d6e2ea; --rxb-text: #102033; --rxb-muted: #5b6e82; --rxb-accent: #0a5989; }
:root[data-theme="dark"] { --rxb-surface: #16213e; --rxb-surface-2: #1a1a2e; --rxb-line: #31436b; --rxb-text: #e6edf5; --rxb-muted: #93a6bd; --rxb-accent: #7cc4ee; }

/* -- the compact type-ahead list ------------------------------------------ */
:root .rxb-combo { position: fixed; z-index: 10050; width: 204px; background: var(--rxb-surface); border: 1px solid var(--rxb-line); border-radius: 8px; box-shadow: 0 10px 28px rgba(15,23,42,.28), 0 2px 6px rgba(15,23,42,.14); font-family: 'Inter', system-ui, sans-serif; color: var(--rxb-text); overflow: hidden; text-align: left; }
:root .rxb-combo-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 9px; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; background: var(--rxb-nav); color: #fff; }
:root .rxb-combo-head span { color: #fff !important; }
:root .rxb-combo-count { background: rgba(255,255,255,.2); border-radius: 9px; padding: 1px 7px; letter-spacing: 0; text-transform: none; }
:root .rxb-combo .rxb-combo-input { display: block; width: calc(100% - 12px); margin: 5px 6px; padding: 5px 8px; font: 600 12px 'JetBrains Mono', ui-monospace, monospace; text-transform: uppercase; border: 1px solid var(--rxb-line); border-radius: 5px; background: var(--rxb-surface-2); color: var(--rxb-text); outline: 0; box-sizing: border-box; }
:root .rxb-combo .rxb-combo-input:focus { background: var(--rxb-surface); border-color: var(--rxb-accent); box-shadow: 0 0 0 2px rgba(10,89,137,.22); }
:root .rxb-combo .rxb-combo-input::placeholder { text-transform: none; font-weight: 400; color: #94a3b8; }
:root .rxb-combo-list { max-height: 196px; overflow-y: auto; padding: 0 4px 4px; }
:root .rxb-opt { display: flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 7px; border-radius: 4px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
:root .rxb-opt-main { flex: 1; overflow: hidden; text-overflow: ellipsis; }
:root .rxb-opt-main b { color: var(--rxb-accent); font-weight: 800; }
:root .rxb-opt.hi, :root .rxb-opt.add.hi, :root .rxb-opt.clear.hi { background: var(--rxb-nav); color: #fff; }
:root .rxb-opt.hi .rxb-opt-main { color: #fff !important; }
/* typed letters stay readable on the highlighted row (light theme recolours <b>) */
:root .rxb-opt.hi .rxb-opt-main b { color: #fff !important; text-decoration: underline; }
:root .rxb-opt-hint { font-size: 10.5px; font-weight: 500; color: var(--rxb-muted); }
:root .rxb-opt.hi .rxb-opt-hint { color: #cffafe; }
:root .rxb-opt.add, :root .rxb-opt.use { color: var(--rxb-accent); border-top: 1px solid var(--rxb-line); border-radius: 0 0 4px 4px; }
:root .rxb-opt.use.hi { color: #fff; }
:root .rxb-opt.clear, :root .rxb-opt.custom { color: var(--rxb-muted); font-weight: 500; border-top: 1px solid var(--rxb-line); border-radius: 0 0 4px 4px; }
:root .rxb-opt.custom.hi { color: #fff; }
:root .rxb-combo .rxb-opt-x { all: unset; cursor: pointer; width: 16px; text-align: center; color: #94a3b8; font-size: 14px; }
:root .rxb-combo-none { padding: 7px; font-size: 12px; color: var(--rxb-muted); }
:root .rxb-combo-foot { padding: 4px 9px; border-top: 1px solid var(--rxb-line); background: var(--rxb-surface-2); font-size: 9.5px; color: var(--rxb-muted); white-space: nowrap; }
:root .rxb-dot { width: 9px; height: 9px; border-radius: 3px; border: 1px solid rgba(16,32,51,.25); flex: none; }
:root .rxb-dot.done { background: #c0f1c8; }
:root .rxb-dot.wait { background: #ffe3a1; }

/* crossdock suggestion */
:root div.rxb-docs { width: 236px; }
:root div.rxb-docs .rxb-opt { margin: 4px; }
:root div.rxb-docs .rxb-docs-note { padding: 0 11px 7px; font-size: 11px; font-weight: 500; color: var(--rxb-muted); }

/* -- Edit bulk bar -------------------------------------------------------- */
:root .rxb-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 10020; display: flex; align-items: center; gap: 6px; padding: 7px 8px 7px 14px; background: var(--rxb-nav); border: 1px solid rgba(255,255,255,.22); border-radius: 11px; box-shadow: 0 12px 30px rgba(6,45,70,.38); font-family: 'Inter', system-ui, sans-serif; white-space: nowrap; max-width: calc(100vw - 20px); overflow-x: auto; animation: rxb-up .16s ease-out; }
@keyframes rxb-up { from { opacity: 0; transform: translate(-50%, 10px); } }
:root .rxb-bar .rxb-bar-count, :root .rxb-bar .rxb-bar-count b, :root .rxb-bar .rxb-bar-title { color: #fff !important; font-size: 12px; }
:root .rxb-bar .rxb-bar-count b { font-size: 14px; }
:root .rxb-bar .rxb-bar-title { margin: 0 4px 0 8px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.28); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
:root .rxb-bar .rxb-bar-btn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 7px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.12) !important; border: 1px solid rgba(255,255,255,.3) !important; color: #fff !important; }
:root .rxb-bar .rxb-bar-btn:hover, :root .rxb-bar .rxb-bar-btn:focus-visible { background: rgba(255,255,255,.24) !important; border-color: #fff !important; }
:root .rxb-bar .rxb-bar-btn .rxb-bar-name { color: #fff !important; }
:root .rxb-bar .rxb-bar-btn .rxb-bar-val { font-size: 10.5px; font-weight: 500; max-width: 80px; overflow: hidden; text-overflow: ellipsis; color: #cfe6f5 !important; }
:root .rxb-bar .rxb-bar-btn .rxb-bar-val.set { color: #fff !important; font-weight: 700; background: var(--rxb-nav-2); border-radius: 4px; padding: 1px 6px; }
:root .rxb-bar .rxb-bar-btn .rxb-caret { font-size: 9px; color: #e3f1fa !important; }
:root .rxb-bar .rxb-bar-close { all: unset; cursor: pointer; margin-left: 6px; height: 32px; line-height: 32px; padding: 0 14px; border-radius: 7px; background: #fff !important; color: #0a5989 !important; font-size: 12px; font-weight: 700; }
:root .rxb-bar .rxb-bar-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body.rxb-has-bar .reexport-scroll { padding-bottom: 64px; }
:root .rx-menu-bulk { font-weight: 700; }

/* -- Undo chip and fill hint ---------------------------------------------- */
:root .rxb-undo, :root .rxb-fill { position: fixed; background: var(--rxb-nav); border: 1px solid rgba(255,255,255,.22); border-radius: 8px; font: 500 12px 'Inter', system-ui, sans-serif; box-shadow: 0 8px 20px rgba(0,0,0,.35); white-space: nowrap; }
:root .rxb-undo, :root .rxb-undo span, :root .rxb-fill, :root .rxb-fill b { color: #fff !important; }
:root .rxb-undo { left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 10030; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 14px; }
:root .rxb-undo.above-bar { bottom: 72px; }
:root .rxb-undo button { all: unset; cursor: pointer; padding: 4px 11px; border-radius: 5px; background: #fff !important; color: #0a5989 !important; font-weight: 700; }
:root .rxb-undo button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
:root .rxb-fill { z-index: 10040; padding: 6px 10px; font-size: 11.5px; pointer-events: none; }

/* fill-by-repeat preview */
#reexportTableBody td.rxb-ghost input[type="text"] { color: #0e7490 !important; font-style: italic; opacity: .8; }
#reexportTableBody td.rxb-ghost { box-shadow: inset 0 0 0 1px #0e7490; }

/* -- Loaded view: cell selection ------------------------------------------ */
#rxLoadedTableBody td { cursor: cell; user-select: none; }
#rxLoadedTable.reexport-table #rxLoadedTableBody tr td.rxb-lsel { background: #d6ecf8 !important; color: #102033 !important; --t: 0 0; --b: 0 0; --l: 0 0; --r: 0 0; box-shadow: inset var(--t) #0e7490, inset var(--b) #0e7490, inset var(--l) #0e7490, inset var(--r) #0e7490 !important; }
#rxLoadedTable.reexport-table td.rxb-lsel .rx-ro { color: #102033 !important; }
#rxLoadedTable td.rxb-et { --t: 0 2px; }
#rxLoadedTable.reexport-table #rxLoadedTableBody tr td.rxb-eb { --b: 0 -2px; }
#rxLoadedTable.reexport-table #rxLoadedTableBody tr td.rxb-el { --l: 2px 0; }
#rxLoadedTable.reexport-table #rxLoadedTableBody tr td.rxb-er { --r: -2px 0; }
#rxLoadedTable.reexport-table #rxLoadedTableBody tr td.rxb-et { --t: 0 2px; }
#rxLoadedTable td.has-cell-comment { position: relative; }
.reexport-pane.rx-view-loaded .reexport-toolbar > .rx-selgroup,
.reexport-pane.rx-view-loaded .reexport-toolbar > .rx-copygroup { display: flex !important; }
:root .rx-copygroup .ribbon-btn:disabled { opacity: .45; cursor: default; }

/* -- Loaded view search box ----------------------------------------------- */
.reexport-pane:not(.rx-view-loaded) .reexport-toolbar .rx-filter-search { display: none; }
:root .reexport-toolbar .rx-filter-search { width: 230px; height: var(--rx-tool-h); padding: 0 8px; border-radius: 4px; box-sizing: border-box; font-size: .72rem; background: var(--rx-bar-ctl) !important; border: 1px solid var(--rx-bar-ctl-line) !important; color: var(--rx-bar-ink) !important; }
:root .reexport-toolbar .rx-filter-search::placeholder { color: var(--rx-bar-label); }
:root .reexport-toolbar .rx-filter-search:focus-visible { outline: 2px solid var(--rx-bar-accent); outline-offset: 1px; }
:root[data-theme="light"] .reexport-toolbar .rx-filter-search { background: #fff !important; color: #263238 !important; border-color: #c3ced5 !important; }
:root[data-theme="light"] .reexport-toolbar .rx-filter-search::placeholder { color: #6b7c8c; }
@media (max-width: 1180px) { :root .reexport-toolbar .rx-filter-search { width: 170px; } }

/* -- Notes and Invoice columns -------------------------------------------- */
#reexportTable .reexport-col-notes, #rxLoadedTable .reexport-col-notes { width: 210px !important; }
#reexportTable td.reexport-col-notes, #rxLoadedTable td.reexport-col-notes { white-space: normal !important; line-height: 1.25; overflow: hidden; }
#rxLoadedTable .reexport-col-invoice { width: 118px !important; }

/* -- Label is a list now: a long customised label is cut, full text on hover */
#reexportTable td.reexport-col-label .rx-val { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -- PHYTO / CVO / Transport doc colours ---------------------------------- */
#reexportTable tbody td.rx-tone.cell-selected { filter: brightness(.92); }
#reexportTable tbody td.rx-tone .rx-val { color: #102033 !important; }
/* picker values were near-invisible in the dark theme (light text on the board's white cells) */
#reexportTable tbody td.rx-pop-cell { color: #1f2937; }

/* -- comment threads: where each one was written -------------------------- */
:root .rx-ctag { display: inline-block; margin: 0 0 3px; padding: 1px 7px; border-radius: 8px; font: 700 9.5px 'Inter', system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; background: #e0f2fe; color: #075985; }
:root .rx-ctag.dash { background: #ede9fe; color: #5b21b6; }
