/* hvn-mems: the tenant's own stylesheet, after the kit files.
   Only (a) components the kit lacks and (b) layout glue. Every value is a kit token.
   Each rule names its gap in KIT_GAPS.md; delete it when the kit ships the part. */

/* G1 · Fridge and planogram drawing (S5, S13, S19, S25 M3, S26 M4, S34 R3).
   A glass-door fridge drawn tier by tier, as in HVN's infographic (P6, P7). Decoration only:
   the page always lists the tiers in words beside it, so the drawing is role="img" with a full label. */
.hvn-fridge { --hvn-can-h: 1.75rem; inline-size: 100%; max-inline-size: 18rem; }
.hvn-fridge-sm { --hvn-can-h: 1.125rem; max-inline-size: 10rem; }
.hvn-fridge-cab { border: var(--sp-1) solid var(--heading); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-sm); background: var(--surface-2); overflow: hidden; }
.hvn-fridge-head { background: var(--primary); color: var(--on-primary); font-size: var(--fs-xs); font-weight: 700; text-align: center; padding: var(--sp-1) var(--sp-2); }
.hvn-fridge-sm .hvn-fridge-head { font-size: var(--fs-xs); padding: calc(var(--sp-1) / 2) var(--sp-1); }
.hvn-fridge-tiers { list-style: none; margin: 0; padding: var(--sp-2) var(--sp-2) var(--sp-1); display: grid; gap: var(--sp-2); }
.hvn-fridge-sm .hvn-fridge-tiers { gap: var(--sp-1); padding: var(--sp-1); }
.hvn-tier { display: grid; grid-template-columns: 1rem minmax(0, 1fr) 1.25rem; align-items: end; gap: var(--sp-1); padding-block-end: calc(var(--sp-1) / 2); border-block-end: var(--sp-1) solid var(--field-border); border-radius: var(--radius-sm); }
.hvn-tier-no { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); line-height: 1; }
.hvn-tier-cans { display: flex; align-items: end; gap: calc(var(--sp-1) / 2); min-block-size: var(--hvn-can-h); }
.hvn-can { flex: 1 1 0; min-inline-size: 0; max-inline-size: 1.25rem; block-size: var(--hvn-can-h); border-radius: var(--radius-sm) var(--radius-sm) calc(var(--radius-sm) / 2) calc(var(--radius-sm) / 2); background: var(--muted); }
/* Cans are named by their colour, the only thing the infographic shows (SAMPLE_DATA P6, P7; brands unreadable, Q-016). */
.hvn-can[data-brand="xanh-la"] { background: var(--primary); }
.hvn-can[data-brand="bac"] { background: var(--field-border); }
.hvn-can[data-brand="xanh-duong"] { background: var(--series-1); }
.hvn-can[data-brand="trang"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--field-border); }
.hvn-can[data-brand="cam"] { background: var(--series-2); }
.hvn-can[data-brand="do"] { background: var(--series-4); }
.hvn-can[data-brand="gap"] { background: transparent; outline: 1px dashed var(--field-border); outline-offset: -1px; }
/* The same can as a legend swatch (S19 "Chú giải màu lon"): outside .hvn-fridge it has no height and flex shrinks it to 0 (QA: 0x0). */
.legend .hvn-can { flex: none; inline-size: var(--sp-3); block-size: var(--sp-4); }
.hvn-tier-mark { display: grid; place-items: center; color: var(--ok); }
.hvn-tier[data-result="warn"] { background: var(--warn-bg); outline: 2px dashed var(--warn); outline-offset: 1px; }
.hvn-tier[data-result="warn"] .hvn-tier-mark { color: var(--warn); }
.hvn-fridge-base { block-size: var(--sp-3); background: var(--heading); }
.hvn-fridge-sm .hvn-fridge-base { block-size: var(--sp-2); }

/* G2 · Photo stand-in (S13). The mockup has no real photos: a dark stage with the drawing of what
   the photo shows, and the evidence line (server time, distance to the outlet) along its foot. */
.hvn-photo { position: relative; display: grid; place-items: center; background: var(--heading); border-radius: var(--radius); padding: var(--sp-6) var(--sp-4) var(--sp-9); min-block-size: 24rem; }
.hvn-photo .hvn-fridge { max-inline-size: 15rem; }
.hvn-photo .hvn-fridge-cab { border-color: var(--muted); }
.hvn-photo .hvn-fridge-base { background: var(--muted); }
.hvn-photo-cap { position: absolute; inset-inline: 0; inset-block-end: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-1) var(--sp-3); padding: var(--sp-2) var(--sp-3); color: var(--surface); font-size: var(--fs-xs); border-block-start: 1px solid var(--muted); }

/* G3 · The bell's panel as a popover anchored to the button (S1 and every office screen). .notif-pop is drawn inline in the
   kit; kit.js [data-menu] places any [popover] under its button, so only the user-agent centring is undone here. */
.hvn-notif-pop[popover] { inset: auto; margin: 0; }

/* G4 · A4 sheet of Asset QR Code labels, 4 × 6 a sheet (S6). */
.hvn-tem-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.hvn-tem { display: grid; justify-items: center; gap: var(--sp-1); padding: var(--sp-2); border: 1px dashed currentColor; text-align: center; font-size: var(--fs-xs); line-height: var(--lh-tight); }
.hvn-tem svg { inline-size: 100%; max-inline-size: 6.5rem; aspect-ratio: 1; }
.hvn-tem strong { font-family: var(--font-mono, monospace); font-size: var(--fs-sm); }

/* G5 · Planogram tier list beside the drawing (S13, S19, S34 R3): tier number, words, facings, and on S13 the grade. */
.hvn-tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.hvn-tiers > li { display: grid; grid-template-columns: var(--sp-7) minmax(0, 1fr); gap: var(--sp-3); padding-block-end: var(--sp-3); border-block-end: 1px solid var(--panel-border); }
.hvn-tiers > li:last-child { border-block-end: 0; padding-block-end: 0; }
.hvn-tier-badge { display: grid; place-items: center; inline-size: var(--sp-7); block-size: var(--sp-7); border-radius: var(--radius-sm); background: var(--sunk); font-weight: 700; color: var(--heading); }

/* G6 · Layout glue: a drawing beside its words (S5, S19, S25 M3); stacks when its panel is narrower than 30rem. */
.hvn-with-fridge { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
@container (max-width: 30rem) { .hvn-with-fridge { grid-template-columns: minmax(0, 1fr); } }
.panel-body:has(.hvn-with-fridge) { container-type: inline-size; }

/* G7 · Layout glue: the guided camera fills the phone (S26 M4, S33 R2). The kit's .cam is height: 100% (kit.css:6909), so it needs
   a parent with a height; with none it ended at ~480 of 844 px and left the rest blank (QA). The page gives html and body the height.
   Delete when the kit documents or ships a full-height camera page. */
html:has(body > .cam), html:has(body > .cam) > body { block-size: 100%; }

/* G8 · A code kept on one line outside a table (S5 "Tổng chi phí vòng đời", S16 Lý do, S20 Lần nạp trước). The kit's .nowrap
   is scoped to tables (kit.css:556 `.tbl .nowrap`), so span.nowrap in a dl computed white-space: normal and "YC-000012" broke
   after the hyphen at 1440 and 1280 (QA). Delete when the kit ships a global nowrap utility. */
.hvn-nowrap { white-space: nowrap; }
