/* =============================================================================
   The shipment window and the VIN window (units.js, `mdl--ship`).

   Office, 10 Nov 2026: "the window is very small … a VIN number is long … add a
   toggle to enlarge it like full screen". At the document dialogs' 1080px the
   machine table squeezed every VIN box to about eleven characters of a
   seventeen-character number, so a clerk typing one off the shipping papers
   could not see what they had typed.

   Its own sheet, not acc-app.css: that one is exported to web/.
   ============================================================================= */

/* Wider than the other document dialogs: the machine table is the form. */
body.acc-fullscreen .mdl.mdl--ship{
  width:calc(100vw - 32px);
  max-width:min(1440px, calc(100vw - 32px));
}

/* Full screen: the window takes the whole page; the body still scrolls and
   the header and Save stay pinned, as at the normal size. */
body.acc-fullscreen .mdl.mdl--ship.is-full{
  width:100vw; max-width:none;
  height:100vh; height:100dvh; max-height:none;
  border-radius:0; border:0;
}
body.acc-fullscreen .ovl:has(> .mdl--ship.is-full){padding:0}

/* The toggle sits at the header's end, clear of the title in either direction. */
.mdl--ship .mdl__h{position:relative; padding-inline-end:60px}
.mdl-full{
  position:absolute; top:14px; inset-inline-end:16px;
  width:34px; height:34px; display:grid; place-items:center; padding:0;
  border:1px solid var(--acc-line, #d0d5dd); border-radius:8px;
  background:var(--acc-surface, #fff); color:var(--acc-ink-soft, #475467);
  cursor:pointer;
}
.mdl-full:hover{color:var(--acc-ink, #101828); border-color:var(--acc-ink-soft, #475467)}
.mdl-full:focus-visible{outline:2px solid var(--acc-accent, #c0141b); outline-offset:1px}
.mdl-full[aria-pressed="true"]{color:var(--acc-accent, #c0141b)}

/* A VIN is 17 characters and is typed off paper: every character shows, in a
   fixed-width face so a 0 and an O, a 1 and an I, line up and can be checked. */
.mdl--ship .sh-vin,
.mdl--ship .vin-in{
  min-width:calc(17ch + 28px);
  font-family:ui-monospace, 'Cascadia Mono', Consolas, 'SFMono-Regular', monospace;
  letter-spacing:.04em;
}
.mdl--ship .sh-model,
.mdl--ship .vin-model{min-width:10ch}
.mdl--ship .sh-plate{min-width:12ch}
.mdl--ship .sh-landed{min-width:9ch}

/* Room for the VIN comes from the item name, which may wrap onto two lines,
   and from a slimmer page margin round the window. */
body.acc-fullscreen .ovl:has(> .mdl--ship){padding:8px}
body.acc-fullscreen .mdl.mdl--ship{width:calc(100vw - 16px); max-width:min(1440px, calc(100vw - 16px))}
.mdl--ship #sh-units .acctable td:nth-child(2),
.mdl--ship .mdl__b > .acctable td:nth-child(2){white-space:normal; min-width:14ch}

/* On a narrow screen the table scrolls sideways rather than squeezing a VIN. */
.mdl--ship #sh-units{overflow-x:auto}
body.acc-fullscreen .mdl--ship .mdl__b{overflow-x:auto}

/* =============================================================================
   Add / edit a landed cost: shared equally or split by machine (units.js
   openShipCost, `mdl--scs`). Office, 19 Nov 2026: one container
   carries 3, 5, 7 and 10 ton forklifts, and a charge is not the same for each.

   A floating window as wide as the screen allows, and its content uses all of
   that width: a full-screen page with a narrow centred column (tried 19 Nov
   2026) filled the screen and left the content the same size. The header's
   toggle (shared with the shipment window) still fills the screen. The machine
   table sits OUTSIDE the form grid on purpose:
   `.accform input{width:100%}` and extra.css's `.mdl input` padding stretched
   every box in it across its cell, so the model's "each" box ran over the
   next column. Every rule here is scoped `body.acc-fullscreen .mdl--scs` so it
   outranks both.
   ============================================================================= */

/* The window: wider than the shipment window, the full width of the screen
   less a margin, up to 1680px. */
body.acc-fullscreen .mdl.mdl--scs:not(.is-full){
  width:calc(100vw - 32px); max-width:min(1680px, calc(100vw - 32px));
}
body.acc-fullscreen .mdl--scs .scs-page{display:flex; flex-direction:column; gap:18px; width:100%}
/* Two sections, each a flex column, not a grid: .accsec spans 12 grid columns
   (acc-app.css), and in a grid it made twelve columns and laid the table out
   in one of them. */
body.acc-fullscreen .mdl--scs .scs-card{display:flex; flex-direction:column; gap:12px; min-width:0}
body.acc-fullscreen .mdl--scs .scs-card > .accsec{margin-top:0}

/* The header: a way back to the shipment, then the title. */
body.acc-fullscreen .mdl--scs .scs-back{
  display:inline-flex; align-items:center; gap:4px; margin:0 0 6px; padding:3px 10px 3px 8px;
  border:1px solid var(--acc-line, #d9e0ea); border-radius:999px; background:var(--acc-surface, #fff);
  color:var(--acc-ink-soft, #4c5a70); font:inherit; font-size:12.5px; font-weight:600; cursor:pointer;
}
/* The arrow points back in either direction. */
body.acc-fullscreen .mdl--scs .scs-back::before{content:"\2039"; font-size:15px; line-height:1}
body.acc-fullscreen.acc-rtl .mdl--scs .scs-back::before{content:"\203A"}
body.acc-fullscreen .mdl--scs .scs-back:hover{color:var(--acc-ink, #101828); border-color:var(--acc-ink-soft, #4c5a70)}
body.acc-fullscreen .mdl--scs .scs-back:focus-visible{outline:2px solid var(--acc-accent, #ed1b24); outline-offset:1px}

/* Two choices, side by side, the picked one outlined in the accent. */
body.acc-fullscreen .mdl--scs .scs-mode{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px}
body.acc-fullscreen .mdl--scs .scs-opt{
  display:flex; flex-direction:column; align-items:flex-start; gap:3px; text-align:start; width:100%;
  padding:11px 14px; border:1px solid var(--acc-line, #d9e0ea); border-radius:10px;
  background:var(--acc-surface, #fff); color:var(--acc-ink, #101828); cursor:pointer; font:inherit;
}
body.acc-fullscreen .mdl--scs .scs-opt b{font-size:14px}
body.acc-fullscreen .mdl--scs .scs-opt small{color:var(--acc-ink-mute, #5d6879); font-size:12.5px; line-height:1.35}
body.acc-fullscreen .mdl--scs .scs-opt:hover:not(:disabled){background:var(--acc-band, #eff4fa)}
body.acc-fullscreen .mdl--scs .scs-opt[aria-checked="true"]{border-color:var(--acc-accent, #ed1b24); box-shadow:inset 0 0 0 1px var(--acc-accent, #ed1b24)}
body.acc-fullscreen .mdl--scs .scs-opt:disabled{opacity:.55; cursor:not-allowed}
body.acc-fullscreen .mdl--scs .scs-opt:focus-visible{outline:2px solid var(--acc-accent, #ed1b24); outline-offset:2px}

body.acc-fullscreen .mdl--scs .scs-box{display:flex; flex-direction:column; gap:10px; min-width:0}
body.acc-fullscreen .mdl--scs .scs-box[hidden]{display:none}

/* The fill buttons and the running total stay in sight while the table scrolls. */
body.acc-fullscreen .mdl--scs .scs-bar{
  position:sticky; top:-14px; z-index:3; display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  height:60px; box-sizing:border-box; padding:10px 0; background:var(--acc-surface, #fff);
}
body.acc-fullscreen .mdl--scs .scs-sum{margin-inline-start:auto; font-weight:600; font-variant-numeric:tabular-nums}
body.acc-fullscreen .mdl--scs .scs-sum.is-ok{color:var(--acc-green, #067647)}
body.acc-fullscreen .mdl--scs .scs-sum.is-left{color:var(--acc-amber, #b54708)}
body.acc-fullscreen .mdl--scs .scs-sum.is-over{color:var(--acc-red, #b42318)}

/* The machine table. Fixed layout: each column keeps its width, so a figure
   can never run into its neighbour; the machine column takes what is left. */
body.acc-fullscreen .mdl--scs .scs-wrap{min-width:0}
body.acc-fullscreen .mdl--scs .scs-table{table-layout:fixed; width:100%; border-collapse:collapse}
body.acc-fullscreen .mdl--scs .scs-table .scs-c-rn{width:48px}
body.acc-fullscreen .mdl--scs .scs-table .scs-c-model{width:150px}
body.acc-fullscreen .mdl--scs .scs-table .scs-c-st{width:120px}
body.acc-fullscreen .mdl--scs .scs-table .scs-c-num{width:132px}
body.acc-fullscreen .mdl--scs .scs-table .scs-c-in{width:168px}
body.acc-fullscreen .mdl--scs .scs-table th,
body.acc-fullscreen .mdl--scs .scs-table td{
  vertical-align:middle; padding:8px 12px; overflow:hidden; text-overflow:ellipsis;
}
body.acc-fullscreen .mdl--scs .scs-table td.t-num,
body.acc-fullscreen .mdl--scs .scs-table th.t-num{text-align:end; font-variant-numeric:tabular-nums}
body.acc-fullscreen .mdl--scs .scs-table td.t-num{white-space:nowrap}
/* The column headings stick under the bar (60px tall, pinned over the body's
   14px top padding), so a long shipment never loses what each column is. */
body.acc-fullscreen .mdl--scs .scs-table thead th{
  white-space:normal; line-height:1.25; position:sticky; top:46px; z-index:2;
  background:var(--acc-band, #eff4fa); box-shadow:inset 0 -1px 0 var(--acc-line, #d9e0ea);
}
/* No banding: the model rows already break the rows into blocks. */
body.acc-fullscreen .mdl--scs .scs-table tbody tr.scs-row td{background:var(--acc-surface, #fff); border-top:1px solid var(--acc-line, #d9e0ea)}
body.acc-fullscreen .mdl--scs .scs-table tbody tr.scs-row:hover td{background:var(--acc-band, #eff4fa)}
body.acc-fullscreen .mdl--scs .scs-table tbody tr.scs-grp td{
  background:var(--acc-band-hi, #e2ebf7); border-top:1px solid var(--acc-line, #d9e0ea); white-space:normal;
}
body.acc-fullscreen .mdl--scs .scs-table tbody tr.scs-grp td.t-num{white-space:nowrap; font-weight:600}
body.acc-fullscreen .mdl--scs .scs-table tbody tr.scs-grp td b{font-weight:700}
body.acc-fullscreen .mdl--scs .scs-table .scs-vin{
  font-family:ui-monospace, 'Cascadia Mono', Consolas, 'SFMono-Regular', monospace; letter-spacing:.03em; white-space:nowrap;
}
body.acc-fullscreen.acc-rtl .mdl--scs .scs-table .scs-vin{text-align:right}
body.acc-fullscreen .mdl--scs .scs-table .scs-model{white-space:nowrap}

/* The boxes: as wide as their column, figures to the end, no spinner arrows. */
body.acc-fullscreen .mdl--scs .scs-table input.scs-in,
body.acc-fullscreen .mdl--scs .scs-table input.scs-each-in{
  display:block; width:100%; max-width:none; height:34px; margin:0; padding:5px 10px; box-sizing:border-box;
  border:1px solid var(--acc-line, #d9e0ea); border-radius:8px; background:var(--acc-surface, #fff);
  font:inherit; font-size:14px; text-align:end; font-variant-numeric:tabular-nums;
  -moz-appearance:textfield; appearance:textfield;
}
body.acc-fullscreen .mdl--scs .scs-table input.scs-in::-webkit-inner-spin-button,
body.acc-fullscreen .mdl--scs .scs-table input.scs-in::-webkit-outer-spin-button,
body.acc-fullscreen .mdl--scs .scs-table input.scs-each-in::-webkit-inner-spin-button,
body.acc-fullscreen .mdl--scs .scs-table input.scs-each-in::-webkit-outer-spin-button{-webkit-appearance:none; margin:0}
body.acc-fullscreen .mdl--scs .scs-table input.scs-in:focus,
body.acc-fullscreen .mdl--scs .scs-table input.scs-each-in:focus{
  outline:none; border-color:var(--acc-blue, #2563eb); box-shadow:0 0 0 3px rgba(37, 99, 235, .15);
}
body.acc-fullscreen .mdl--scs .scs-table input.scs-each-in{border-style:dashed}
body.acc-fullscreen .mdl--scs .scs-table input.is-invalid{border-color:var(--acc-red, #b42318); box-shadow:0 0 0 3px rgba(180, 35, 24, .15)}
body.acc-fullscreen .mdl--scs .scs-table input.scs-each-in::placeholder{color:var(--acc-ink-mute, #5d6879)}
/* The model's part of this cost, under its "each" box. */
body.acc-fullscreen .mdl--scs .scs-table .scs-gsum{display:block; margin-top:4px; font-size:12px; font-weight:600; color:var(--acc-ink-soft, #4c5a70)}
body.acc-fullscreen .mdl--scs .scs-table .scs-gafter{font-weight:700}
body.acc-fullscreen .mdl--scs .scs-table tfoot td{white-space:nowrap}

/* In the shipment window's cost list: this charge is split by machine. */
.scs-tag{
  display:inline-block; margin-inline-start:6px; padding:1px 7px; border-radius:999px;
  font-size:11.5px; font-weight:600; color:var(--acc-blue, #2563eb);
  background:rgba(37, 99, 235, .1); white-space:nowrap;
}

/* A laptop: the figure columns give up some width so the VIN keeps all 17 characters. */
@media (max-width:1180px){
  body.acc-fullscreen .mdl--scs .scs-table .scs-c-model{width:110px}
  body.acc-fullscreen .mdl--scs .scs-table .scs-c-st{width:104px}
  body.acc-fullscreen .mdl--scs .scs-table .scs-c-num{width:112px}
  body.acc-fullscreen .mdl--scs .scs-table .scs-c-in{width:140px}
  body.acc-fullscreen .mdl--scs .scs-table th,
  body.acc-fullscreen .mdl--scs .scs-table td{padding:8px 9px}
}
/* A narrow screen: the table scrolls sideways rather than squeezing the figures. */
@media (max-width:900px){
  body.acc-fullscreen .mdl--scs .scs-wrap{overflow-x:auto}
  body.acc-fullscreen .mdl--scs .scs-table{min-width:760px}
  body.acc-fullscreen .mdl--scs .scs-bar{position:static; height:auto}
  body.acc-fullscreen .mdl--scs .scs-table thead th{position:static}
}
@media (max-width:760px){
  body.acc-fullscreen .mdl--scs .scs-mode{grid-template-columns:1fr}
  body.acc-fullscreen .mdl--scs .scs-sum{margin-inline-start:0; flex-basis:100%}
}
