/* Barcode labels and scan screen (Allwyn 16 Nov, issue #418). A static file so the CSP stays style-src self. */
.label-sheet { display: flex; flex-wrap: wrap; gap: 4mm; }
.label-sheet .label { width: 60mm; padding: 2mm; border: 1px dashed #999; break-inside: avoid; text-align: center; font-size: 10pt; }
.label-sheet .label p { margin: 0; line-height: 1.2; }
.label-name { font-weight: 600; }
.label-sheet .label svg { max-width: 100%; height: auto; }
.label-code { font-family: ui-monospace, monospace; font-size: 9pt; }
.scan-row.open td { background: color-mix(in srgb, #f5a623 18%, transparent); }
.scan-row.done td { background: color-mix(in srgb, #2e9d57 14%, transparent); }
.scan-video { width: 100%; max-width: 24rem; }
@media print {
  .label-sheet .label { border: 0; border-bottom: 1px dotted #999; }
  .label-sheet { gap: 2mm; }
}

/* A count that was reversed stays in the list, struck through (issue #418). */
tr.reversed td:not(:last-child) { text-decoration: line-through; opacity: .6; }
.ps-rwhy { min-width: 12rem; }
.cam-panel { margin-top: 12px; padding: 12px; border: 1px solid var(--rule); border-radius: 8px; }
.cam-panel[hidden] { display: none; }
.cam-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cam-head h2 { margin: 0; font-size: 1rem; }
.cam-head .btn { min-height: 44px; }
#cs-cam { min-height: 44px; margin-top: 8px; }
.cam-mark { margin: 8px 0 0; padding: 8px 12px; border-radius: 6px; font-weight: 600; background: var(--ok-tint, #e6f4ea); color: var(--ok, #14532d); }
.cam-mark[hidden] { display: none; }
.cam-panel.cam-counted { border-color: var(--ok, #14532d); border-width: 3px; }
/* #808: the count line sits above the video so that it is in view on a 360 px phone. The video is capped so that both fit. */
.cam-count { margin: 8px 0; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.cam-count:empty { display: none; }
#ps-cam-panel .scan-video { max-height: 36vh; object-fit: cover; }
/* #807: a refused scan flashes the panel red for a moment. With reduced motion the red stays still for the same time. */
@keyframes cam-refuse { from { background: var(--bad-tint, #f8d7d4); } to { background: transparent; } }
.cam-panel.cam-refused { border-color: var(--bad, #b3261e); border-width: 3px; background: var(--bad-tint, #f8d7d4); animation: cam-refuse .8s ease-out; }
@media (prefers-reduced-motion: reduce) { .cam-panel.cam-refused { animation: none; } }
