/* homeview-barcode-scan-p1 parity: styles for app/notes.js (owned by that module).
 * The level hues are the app's ProductNoteLevelColors (lib/config/theme/colors.dart):
 * level 4 #E35A00, 3 #C66F36, 2 #A37E63, 1 and neutral #858585, digit ink #1C1917.
 * NEVER RED (I-9). A chip's TEXT is the ink colour, never the hue, and the level
 * is always in words ("Level 2 of 4: ..."), never colour alone. */

/* Nothing to say, or still waiting on the catalogue: no empty section. */
.blk-notes:has(> .pn-none), .blk-notes:has(> .pn-pending) { display: none; }
.pn-none, .pn-pending { display: none; }

.pn-l4 { --pn-hue: 227, 90, 0; }
.pn-l3 { --pn-hue: 198, 111, 54; }
.pn-l2 { --pn-hue: 163, 126, 99; }
.pn-l1, .pn-neutral { --pn-hue: 133, 133, 133; }

.pn-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5em; }
.pn-head h2 { margin: 0; }
.pn-info {
  background: transparent; border: 0; color: var(--muted); padding: 0;
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.pn-info:focus-visible, .pn-chip:focus-visible, .pn-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pn-icon { width: 1.2em; height: 1.2em; fill: currentColor; flex: none; }

.pn-caption { color: var(--muted); font-size: 0.85em; margin: 0.3em 0 0; }
.pn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.35em; }
.pn-chips + .pn-caption { margin-top: 8px; }

/* ProductNoteChipFrame: 8 px radius, a 1.5 px border at half the hue, a 12 %
 * tint, the 44 px touch floor, a chevron. */
.pn-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  min-height: 44px; padding: 5px 4px 5px 6px; border-radius: 8px;
  background: rgba(var(--pn-hue), 0.12); border: 1.5px solid rgba(var(--pn-hue), 0.5);
  color: var(--ink); font: inherit; text-align: start; cursor: pointer;
}
.pn-chip-text { display: flex; flex-direction: column; min-width: 0; }
.pn-chip-label { font-size: 0.9em; line-height: 1.25; overflow-wrap: anywhere; }
.pn-chip-sub { font-size: 0.78em; color: var(--muted); line-height: 1.25; overflow-wrap: anywhere; }
.pn-chevron { width: 1.1em; height: 1.1em; color: var(--muted); margin-inline-start: 2px; }
.pn-lead { color: var(--muted); }
[dir="rtl"] .pn-chevron { transform: scaleX(-1); }

/* ProductNoteLevelStrip: 1 2 3 4, this level filled and larger. */
.pn-strip { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.pn-strip.pn-compact { gap: 2px; }
.pn-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.4em; height: 1.4em; border-radius: 6px; font-size: 0.8em; line-height: 1;
  color: var(--muted); background: rgba(var(--pn-hue), 0.12); border: 1px solid rgba(var(--pn-hue), 0.5);
}
.pn-step.pn-sel { width: 1.9em; height: 1.9em; background: rgb(var(--pn-hue)); border-color: rgb(var(--pn-hue)); color: #1c1917; font-weight: 700; }
.pn-compact .pn-step { width: 8px; height: 0.68em; border-radius: 3px; font-size: 0.8em; }
.pn-compact .pn-step.pn-sel { width: 1.15em; height: 1.15em; font-size: 0.75em; }

/* ProductNoteLevelCircle. */
.pn-circle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 1.25em; height: 1.25em; border-radius: 50%; font-size: 0.85em; font-weight: 700; line-height: 1;
  background: rgb(var(--pn-hue)); color: #1c1917;
}
.pn-circle-big { width: 1.4em; height: 1.4em; margin-top: 2px; }
.pn-circle-gap { display: inline-block; width: 1.25em; font-size: 0.85em; flex: none; }

/* The sheets. */
.pn-sheet p, .pn-sheet h3 { margin: 0; }
.pn-sheet > * + * { margin-top: 0.75em; }
.pn-strong { font-weight: 700; font-size: 1em; }
.pn-muted { color: var(--muted); font-size: 0.9em; }
.pn-text { font-size: 0.9em; }
.pn-status { font-size: 1em; margin-top: 2px !important; }
.pn-overline { color: var(--muted); font-size: 0.72em; letter-spacing: 0.04em; margin-top: 4px !important; }
.pn-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pn-market { display: flex; align-items: flex-start; gap: 8px; }
.pn-market-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.pn-level-row { display: flex; align-items: flex-start; gap: 12px; }
.pn-level-row > div { display: flex; flex-direction: column; gap: 2px; }
.pn-intl { margin-top: 1em !important; }
.pn-link {
  display: inline-flex; align-items: center; gap: 0.4em; min-height: 44px;
  background: transparent; border: 0; padding: 0 0.2em; color: var(--accent-ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.pn-link + .pn-link { margin-top: 0 !important; display: flex; }

/* NovaProcessingScale: a word scale with a stepped-bar ladder, neutral only. */
.pn-nova-scale { display: flex; flex-direction: column; gap: 6px; }
.pn-nova-step { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }
.pn-nova-step.pn-sel { border: 1.5px solid var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.pn-nova-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.pn-this { font-weight: 700; font-size: 0.8em; }
.pn-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; margin-top: 3px; flex: none; }
.pn-bar { display: block; width: 3px; border-radius: 1px; background: var(--line); }
.pn-bar1 { height: 5px; } .pn-bar2 { height: 8px; } .pn-bar3 { height: 11px; } .pn-bar4 { height: 14px; }
.pn-bar.pn-on { background: var(--muted); }
.pn-sel .pn-bar.pn-on { background: var(--ink); }

@media (max-height: 480px) {
  .pn-chip { padding-top: 3px; padding-bottom: 3px; }
}
