/* SLMG cart sheet: THE MAIN STAGE LOOK, kept in the Main Stage pack. A second direction gives the sheet its own look with
   directions/<direction>/cartsheet.css in its own pack (this file is the fallback when a pack has none; the same rule as
   search.css beside it); the structure, the behaviour and the store's routes stay in kit/modules/cartsheet/
   (cartsheet.css, cartsheet.js, module.php: slmg_cartsheet_look()).
   Colours and type are the kit's tokens (kit/tokens.css), with the same values written as fallbacks so the sheet is
   drawn right on a page that shows the header but declares no direction. Contrast (pitch.md section 5): ink 17:1, dim
   8.3:1 and mute 5.1:1 on the surface; text on the one orange is near-black, 9:1. */

.slmg-cs, .slmg-cs-scrim {
  --cs-black: var(--slmg-black, #000);
  --cs-ground: var(--slmg-ground, #0a0a0a);
  --cs-surface: var(--slmg-surface, #131313);
  --cs-raised: var(--slmg-raised, #1c1c1c);
  --cs-line: var(--slmg-line, #2a2a2a);
  --cs-line-strong: var(--slmg-line-strong, #4a4a4a);
  --cs-ink: var(--slmg-ink, #f2efe9);
  --cs-dim: var(--slmg-dim, #b4afa6);
  --cs-mute: var(--slmg-mute, #918c84);
  --cs-orange: var(--slmg-orange, #ff9500);
  --cs-orange-hover: var(--slmg-orange-hover, #ffad33);
  --cs-on-orange: var(--slmg-on-orange, #0a0a0a);
  --cs-display: var(--slmg-display, "Archivo", "Arial Narrow", Arial, sans-serif);
  --cs-mono: var(--slmg-mono, "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace);
  --cs-pad: 24px;
}
.slmg-cs-scrim { background: rgba(0, 0, 0, .62); }
.slmg-cs { background: var(--cs-surface); color: var(--cs-ink); border-left: 1px solid var(--cs-line-strong); box-shadow: -40px 0 80px -20px rgba(0, 0, 0, .85);
  font: 400 16px/1.45 var(--cs-display); font-stretch: 100%; -webkit-font-smoothing: antialiased; letter-spacing: 0; }
.slmg-cs :focus-visible { outline: 2px solid var(--cs-ink); outline-offset: 2px; }

/* top: "Your cart · 3 items" and the close button */
.slmg-cs__top { min-height: 60px; padding: 0 12px 0 var(--cs-pad); border-bottom: 1px solid var(--cs-line); }
.slmg-cs__h { font: 500 12px/1.4 var(--cs-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cs-dim); font-variant-numeric: tabular-nums slashed-zero; }
.slmg-cs__word { color: var(--cs-ink); }
.slmg-cs__x { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--cs-line-strong); border-radius: 50%; background: transparent; color: var(--cs-ink); }
.slmg-cs__x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.slmg-cs__x:hover { border-color: var(--cs-orange); color: var(--cs-orange); }
.slmg-cs__body { padding: 4px var(--cs-pad) var(--cs-pad); }

/* a line: cover, what it is, its money and Remove */
.slmg-cs-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--cs-line); }
.slmg-cs-line.is-busy { opacity: .6; }
.slmg-cs-line__cover { display: block; width: 64px; height: 64px; background: var(--cs-black); box-shadow: 0 0 0 1px var(--cs-line); }
.slmg-cs-line__cover img { width: 64px; height: 64px; object-fit: contain; }
.slmg-cs-line__cat { font: 500 12px/1.3 var(--cs-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cs-orange); font-variant-numeric: tabular-nums slashed-zero; }
.slmg-cs-line__name { margin-top: 2px !important; font: 600 16px/1.25 var(--cs-display); }
.slmg-cs a.slmg-cs-line__link { color: var(--cs-ink); text-decoration: none; }   /* .slmg-cs a: the pack's own link colour does not reach in */
.slmg-cs a.slmg-cs-line__link:hover { color: var(--cs-orange); text-decoration: underline; text-underline-offset: 3px; }
.slmg-cs-line__who { display: block; text-transform: uppercase; font-weight: 800; font-stretch: 75%; letter-spacing: .01em; }
.slmg-cs-line__ttl { display: block; font-weight: 500; }
.slmg-cs-line__fmt { margin-top: 4px !important; font: 500 12px/1.4 var(--cs-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--cs-dim); }
.slmg-cs-line__price { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: 2px !important; font: 500 13px/1.5 var(--cs-mono); color: var(--cs-ink); font-variant-numeric: tabular-nums; }
.slmg-cs-line__named { color: var(--cs-mute); letter-spacing: .06em; text-transform: uppercase; font-size: 11px; line-height: 19px; }
.slmg-cs-line__end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.slmg-cs-line__amt { font: 500 15px/1.3 var(--cs-mono); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slmg-cs-line__rm, .slmg-cs-line__undo { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: flex-end; padding: 0 2px; border: 0; background: none; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.slmg-cs-line__rm { color: var(--cs-dim); }
.slmg-cs-line__rm:hover { color: var(--cs-orange); }
.slmg-cs-line__note { grid-column: 2 / -1; margin-top: 6px !important; font-size: 14px; line-height: 1.4; color: var(--cs-dim); }
.slmg-cs-line__note.is-err { color: var(--cs-orange); }

/* quantity: physical lines only (a download is one copy) */
.slmg-cs-qty { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px !important; }
.slmg-cs-qty__b { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--cs-line-strong); border-radius: var(--slmg-r, 2px); background: transparent; color: var(--cs-ink); font: 500 18px/1 var(--cs-mono); }
.slmg-cs-qty__b:hover:not(:disabled) { border-color: var(--cs-ink); }
.slmg-cs-qty__b:disabled { color: var(--cs-line-strong); border-style: dashed; cursor: not-allowed; }
.slmg-cs-qty__n { width: 56px; height: 44px; padding: 0 4px; border: 1px solid var(--cs-line-strong); border-radius: var(--slmg-r, 2px); background: var(--cs-raised); color: var(--cs-ink); font: 500 16px/1 var(--cs-mono); text-align: center; }
.slmg-cs-qty__n:focus { border-color: var(--cs-orange); outline: none; box-shadow: 0 0 0 1px var(--cs-orange); }
.slmg-cs-qty__stock { margin-left: 4px; font: 500 12px/1.3 var(--cs-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cs-orange); }
.slmg-cs-qty__stock.is-all { flex-basis: 100%; margin: 2px 0 0; }   /* "All 6 in stock are in your cart." under the stepper */
.slmg-cs-qty--fixed { font: 500 12px/1.3 var(--cs-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cs-mute); }

/* a line removed a moment ago, with the store's Undo */
.slmg-cs-line--gone { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 6px 0; color: var(--cs-dim); }
.slmg-cs-line__gone { font-size: 14px; line-height: 1.4; }
.slmg-cs-line__undo { color: var(--cs-orange); font-weight: 600; }
.slmg-cs-line__undo:hover { color: var(--cs-orange-hover); }

/* the copy on screen is being checked with the store, or the store did not answer */
.slmg-cs__status { padding: 8px var(--cs-pad); border-bottom: 1px solid var(--cs-line); background: var(--cs-raised); }
.slmg-cs-status__p { font: 500 12px/1.4 var(--cs-mono); letter-spacing: .06em; color: var(--cs-dim); }
.slmg-cs-status__p.is-err { color: var(--cs-ink); letter-spacing: 0; font: 400 14px/1.4 var(--cs-display); }
.slmg-cs-status__p.is-err .slmg-cs-link { min-height: 32px; }
.slmg-cs__body[aria-busy="true"] .slmg-cs-list { opacity: .72; transition: opacity .2s linear; }

/* the store's warnings, waiting, failure */
.slmg-cs-errs { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--cs-orange); border-radius: var(--slmg-r, 2px); font-size: 14px; line-height: 1.4; }
.slmg-cs-errs p + p { margin-top: 6px !important; }
.slmg-cs-wait, .slmg-cs-fail { padding-top: 20px !important; color: var(--cs-dim); }
.slmg-cs-fail p { margin-bottom: 8px !important; }

/* empty */
.slmg-cs-empty { padding-top: 20px; }
.slmg-cs-empty__h { font: 800 30px/1 var(--cs-display); font-stretch: 62%; text-transform: uppercase; color: var(--cs-ink); }
.slmg-cs-empty__p { margin-top: 10px !important; color: var(--cs-dim); max-width: 36ch; }
.slmg-cs a.slmg-cs-newest { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 24px; padding: 12px; border: 1px solid var(--cs-line-strong); border-radius: var(--slmg-r, 2px); color: var(--cs-ink); text-decoration: none; }
.slmg-cs a.slmg-cs-newest:hover { border-color: var(--cs-orange); }
.slmg-cs-newest .slmg-cs-line__cover, .slmg-cs-newest .slmg-cs-line__cover img { width: 96px; height: 96px; }
.slmg-cs-newest__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.slmg-cs-newest__k { font: 500 11px/1.4 var(--cs-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cs-dim); }
.slmg-cs-newest .slmg-cs-line__who { font-size: 18px; line-height: 1.1; }

/* the foot: subtotal, shipping, Checkout, the cart page, Keep listening */
.slmg-cs__foot { padding: 16px var(--cs-pad) 20px; border-top: 1px solid var(--cs-line); background: var(--cs-surface); }
.slmg-cs-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 800 26px/1 var(--cs-display); font-stretch: 62%; text-transform: uppercase; }
.slmg-cs-sum__v { font: 500 20px/1 var(--cs-mono); font-stretch: 100%; font-variant-numeric: tabular-nums; }
.slmg-cs-sum--minor { margin-top: 8px; font: 500 13px/1.3 var(--cs-mono); letter-spacing: .06em; color: var(--cs-dim); }
.slmg-cs-ship { margin-top: 8px !important; font-size: 14px; line-height: 1.4; color: var(--cs-dim); }
.slmg-cs-go { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; margin-top: 14px; padding: 8px 16px; border-radius: var(--slmg-r, 2px);
  background: var(--cs-orange); color: var(--cs-on-orange) !important; text-decoration: none; text-align: center; }
@media (hover: hover) { .slmg-cs-go:hover { background: var(--cs-orange-hover); } }
.slmg-cs-go__w { font: 800 17px/1 var(--cs-display); letter-spacing: .06em; text-transform: uppercase; }
.slmg-cs-go__n { font: 500 11px/1.2 var(--cs-mono); letter-spacing: .08em; text-transform: uppercase; }
.slmg-cs-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: 8px; }
.slmg-cs-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--cs-ink) !important; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.slmg-cs-link:hover { color: var(--cs-orange) !important; }
.slmg-cs-link__n { color: var(--cs-mute); text-decoration: none; white-space: pre; }
.slmg-cs-keep { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--cs-line-strong); border-radius: var(--slmg-r, 2px); background: transparent; color: var(--cs-ink);
  font: 600 13px/1 var(--cs-display) !important; letter-spacing: .06em; text-transform: uppercase; }
.slmg-cs-keep:hover { border-color: var(--cs-ink); }
.slmg-cs-fail .slmg-cs-link { margin-top: 4px; }

/* phone: from the bottom, every target 44 px; the foot kept short so the list of lines gets the height */
@media (max-width: 900px) {
  .slmg-cs { --cs-pad: 16px; border-left: 0; border-top: 1px solid var(--cs-line-strong); box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, .85); }
  .slmg-cs__top { min-height: 52px; }
  .slmg-cs-line { padding: 12px 0; }
  .slmg-cs__foot { padding: 10px var(--cs-pad) 8px; }
  .slmg-cs-sum { font-size: 22px; }
  .slmg-cs-sum__v { font-size: 18px; }
  .slmg-cs-ship { margin-top: 4px !important; font-size: 13px; line-height: 1.35; }
  .slmg-cs-go { flex-direction: row; flex-wrap: wrap; gap: 0 10px; min-height: 48px; margin-top: 8px; padding: 6px 12px; }
  .slmg-cs-links { flex-wrap: nowrap; gap: 8px; margin-top: 2px; }
  .slmg-cs-link { font-size: 13px; min-width: 0; }
  .slmg-cs-keep { flex: none; padding: 0 12px; font-size: 12px !important; }
  .slmg-cs-line { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 12px; }
  .slmg-cs-line__cover, .slmg-cs-line__cover img { width: 56px; height: 56px; }
  .slmg-cs-qty { grid-column: 1 / -1; }
  .slmg-cs-line--gone { grid-template-columns: minmax(0, 1fr) auto; }
}
