/* The ink is confined to the hem of a control. Text and its hit area stay still. */
:is(#filters, #receiver) label, .quantity { position:relative; }
:is(#filters, #receiver) label::after, .quantity::after {
  content:"";
  position:absolute;
  pointer-events:none;
  height:2px;
  inset:auto 2px 1px;
  background:radial-gradient(ellipse 42px 10px at var(--trace-x,50%) 50%, var(--accent-ink) 45%, transparent);
  opacity:0;
  transition:opacity .18s ease-out;
}
:is(#filters, #receiver) label:focus-within::after, .quantity:focus-within::after,
:is(#filters, #receiver) label.order-tracing::after, .quantity.order-tracing::after { opacity:1; }
:is(#filters, #receiver) label.order-tracing :is(input, select, textarea) { border-color:var(--accent-ink); }
:is(#sizes, #rack-sizes) label span::after {
  content:"";
  position:absolute;
  inset:auto 3px 3px;
  height:6px;
  pointer-events:none;
  background:linear-gradient(90deg,var(--accent-ink),var(--accent-ink)) var(--trace-x,50%) bottom / 3px 100% no-repeat;
  opacity:0;
  transition:opacity .18s ease-out;
}
:is(#sizes, #rack-sizes) label.order-tracing span::after,
:is(#sizes, #rack-sizes) label input:focus-visible + span::after { opacity:1; }
:is(#sizes, #rack-sizes) label input:checked + span::after { filter:brightness(1.8); }
:is(#sizes, #rack-sizes) label.order-tracing input:not(:checked) + span { background-color:var(--accent-wash); }
:is(#sizes, #rack-sizes) label:active input:not(:checked) + span { background-color:var(--accent-hover); }

/* Perforations follow the row being read on a dark invoice or a paper receipt. */
:is(.summary, .receipt-panel, .empty) { position:relative; }
:is(.summary, .receipt-panel, .empty)::before {
  content:"";
  position:absolute;
  pointer-events:none;
  inset:13px auto 13px 7px;
  width:2px;
  background:repeating-linear-gradient(to bottom,currentColor 0 2px,transparent 2px 7px);
  color:var(--seam);
  opacity:0;
  mask-image:radial-gradient(ellipse 8px 68px at 50% var(--trace-y,50%), black 18%, transparent);
  transition:opacity .25s ease;
}
:is(.summary, .receipt-panel, .empty).order-tracing::before { opacity:1; }
:is(.summary, .receipt-panel, .empty)::after {
  content:"";
  position:absolute;
  pointer-events:none;
  bottom:0; left:0;
  width:13px; height:13px;
  background:linear-gradient(45deg,var(--paper,#ffffff) 0 47%,var(--accent-ink) 48% 51%,#46580955 52%,transparent 85%);
}
.summary.order-tracing, .receipt-panel.order-tracing {
  border-top-color:var(--seam);
  background-image:radial-gradient(ellipse 65% 80px at var(--trace-x,50%) 0%,#b9e5271a,transparent);
}
.receipt-copy {
  display:inline-flex; align-items:center; gap:8px;
  min-height:44px; padding:3px 8px; margin-inline:3px; vertical-align:middle;
  border:1px dashed var(--control-line); border-radius:3px; color:inherit;
}
.receipt-copy i {
  display:block; position:relative;
  width:11px; height:13px;
  border:1.5px solid var(--muted-ink); border-radius:1px;
}
.receipt-copy i::before {
  content:""; position:absolute; width:7px; height:9px;
  left:-4px; bottom:-4px; border:solid var(--muted-ink); border-width:0 0 1.5px 1.5px;
}
.receipt-copy.copied { border-color:var(--accent-ink); background-color:var(--accent-wash); }
.receipt-copy.copied i {
  width:12px; height:7px; border-width:0 0 2px 2px; transform:rotate(-45deg);
}
.receipt-copy.copied i::before { content:none; }
.receipt-copy-status { font-size:12px; color:var(--muted-ink); }
@media(prefers-reduced-motion:reduce) {
  :is(#filters,#receiver) label::after, .quantity::after,
  :is(#sizes,#rack-sizes) label span::after,
  :is(.summary,.receipt-panel,.empty)::before { transition:none; }
}
