/*
 * cards.css — the app's default look for a working screen, loaded by the layout: a card with a header band
 * (wb-card, wb-card-header), a tinted band of fields (wb-group-row), the grey band where the next row is typed
 * (sm-editor wb-add-row), the compact table (sm-table) with its row highlight and edit and remove buttons, the
 * outlined card that has the caret (is-target).
 *
 * Built for WorkBench, taken up by /Catalog/Entry, and the default for the inventory screens since 2026-09-15.
 * The wb- and sm- prefixes stay, because renaming them would touch every line of WorkBench for no visible gain.
 */

/* The theme sets --ct-card-bg only inside .card; a wb-card outside one sets it itself, for what it holds too. */
.wb-card { --ct-card-bg:var(--ct-secondary-bg); border:1px solid var(--ct-border-color); border-radius:6px; margin-bottom:12px; background:var(--ct-card-bg); overflow:hidden; }
.wb-card-header { padding:6px 12px; background:var(--ct-tertiary-bg); border-bottom:1px solid var(--ct-border-color); font-size:12px; font-weight:600; color:var(--ct-emphasis-color); display:flex; justify-content:space-between; align-items:center; }
.wb-group-row { padding:8px 12px; background:var(--ct-primary-bg-subtle); border-bottom:1px solid var(--ct-border-color); }
.wb-group-row input, .wb-group-row select { font-size:11px; padding:2px 4px; }
.wb-group-row label { font-size:10px; color:var(--ct-secondary-color); font-weight:600; }
.wb-add-row td { background:var(--ct-tertiary-bg); }
.wb-add-row input, .wb-add-row select { font-size:11px; padding:2px 4px; }
.wb-group-btns { display:flex; gap:4px; flex-wrap:wrap; margin:12px 0; }
.wb-edit-row td { background:var(--ct-warning-bg-subtle); }
.wb-edit-row input, .wb-edit-row select { font-size:11px; padding:2px 4px; }
.wb-right input[type=number]::-webkit-inner-spin-button,
.wb-right input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.wb-right input[type=number] { -moz-appearance:textfield; }
.wb-nr-group { display:flex; gap:1px; }
.wb-nr-group input { text-align:center; }
/* form-control-sm padding eats ~18px, so 50px left only ~32px of text: a 4-digit
   Michel number clipped mid-digit and a 1-char suffix showed nothing. Sized for
   5 digits and a 2-3 char suffix ("ori", "A") with room to spare. */
.wb-nr-prefix { width:36px !important; }
.wb-nr-main { width:72px !important; }
.wb-nr-suffix { width:44px !important; }
/* Stamp rows get the same highlight as the issue list, so scanning behaves the same way
   everywhere. table-hover is left in place but does not show through this theme. */
.stamp-display-row:hover > td { background:var(--ct-primary-bg-subtle); }
.stamp-display-row:hover > td:first-child { box-shadow:inset 4px 0 0 var(--ct-primary); }
/* A block carries two numbers — its own, and the range it holds. Weighting them
   differently is what stops "Bl. 1031" and "Mi. 8472–8475" reading as one thing. */
.wb-own-nr { color:var(--ct-primary); }
.wb-contains { font-weight:400; color:var(--ct-secondary-color); }
.wb-cond-input { width:60px !important; }

/* ── From the entry screen, shared ───────────────────────────────────────────────────────────── */
.sm-mono { font-variant-numeric: tabular-nums; }
/* The compact table: rows read better tight. sm-entry-table is the entry screen's name for it. */
.sm-table td, .sm-table th, .sm-entry-table td, .sm-entry-table th { padding: .3rem .5rem; font-size: .82rem; }
/* A row being edited takes WorkBench's edit colour, so it reads the same on every screen. */
.sm-table tr.is-editing > td, .sm-entry-table tr.is-editing > td { background: var(--ct-warning-bg-subtle); }
/* The card that has the caret is the one thing on the page that has to be findable at a glance. */
.wb-card.is-target { border-color: var(--ct-primary); }
/* The band where the next row is typed: WorkBench's add row colour and its small captions. Not on labels that
   are buttons — an uploader's "Add image" is one. */
.sm-editor { background: var(--ct-tertiary-bg); }
.sm-editor label:not(.btn) { font-size: 10px; color: var(--ct-secondary-color); font-weight: 600; margin-bottom: 0; }
/* A header band is set in 12px type, so its buttons are sized to sit inside it. */
.sm-card-actions .btn { padding: 1px 8px; font-size: 11px; line-height: 1.4; }
/* On its way to the server: faded, and nothing to land a second click on. */
.is-removing { opacity: .45; pointer-events: none; }

/* ── For every working screen ─────────────────────────────────────────────────────────────────── */
/* A page's own card names what it holds in its band, a little larger than the band's type. */
.wb-card-header .sm-card-title { font-size: 13px; }
/* A compact table's rows take the same highlight as the stamp rows. */
.sm-table > tbody > tr:not(.empty-row):hover > td { background: var(--ct-primary-bg-subtle); }
.sm-table > tbody > tr:not(.empty-row):hover > td:first-child { box-shadow: inset 4px 0 0 var(--ct-primary); }
/* The bands set small type on boxes and lists alike; one height keeps a row of them on one line. */
.wb-group-row input.form-control, .wb-group-row .form-select,
.wb-add-row input.form-control-sm, .wb-add-row .form-select-sm { height: 26px; min-height: 26px; font-size: 12px; padding-top: 2px; padding-bottom: 2px; }
.wb-group-row .form-select, .wb-add-row .form-select-sm { padding-right: 1.6rem; background-position: right .4rem center; }
/* A form in a band keeps the band's small type tight: the gaps set for full-size fields would leave it sparse. */
.wb-group-row .mb-3 { margin-bottom: .6rem !important; }
.wb-group-row .row.g-3 { --bs-gutter-y: .6rem; --bs-gutter-x: .75rem; }
.wb-group-row .form-text { font-size: 11px; margin-top: 2px; }


/* ── Translations (docs/LANGUAGES_PLAN.md, TR3) ───────────────────────────────────────────────── */
/* Where a title stands in each language, under it on Entry: a person's, a machine's, missing, or made from another English. */
.tg-mark { font-size: 12px; margin-right: .6rem; white-space: nowrap; }
/* The title itself, in the marks under an issue's own: cut where it runs long, whole under the mouse. */
.tg-mark-text { display: inline-block; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; color: var(--bs-body-color); }
/* The same marks as one small button on a card of Browse, under its pencil: coloured by the worst a language stands. */
.sm-series-lang-btn { top: 44px !important; border: 0; padding: 0; }
.sm-series-lang-btn.tg-lang-good { color: #7ee2a8 !important; }
.sm-series-lang-btn.tg-lang-machine { color: #ffc107 !important; }
.sm-series-lang-btn.tg-lang-missing { color: #ced4da !important; }
.tg-mark-good { color: var(--bs-success); }
.tg-mark-machine { color: var(--bs-warning); }
.tg-mark-missing { color: var(--bs-secondary-color); }
.tg-mark-stale { color: var(--bs-danger); }
/* A title's shorter forms sit under it, a step quieter. */
.tg-texts tr.tg-shorter > td { background: var(--ct-light-bg-subtle, var(--bs-tertiary-bg)); vertical-align: top; }
.tg-texts .tg-new { opacity: .75; }

/* A page with nobody signed in — login, /Setup, an invitation being accepted — has no sidebar, so the
   content must not keep the gutter the sidebar left. */
.wrapper-plain .page-content { margin-left: 0; padding-top: 24px; }
.wrapper-plain .page-container { max-width: 100%; }
