/* Unit map on New master (30 Nov 2026, MAP-22 D+E): Listings chips (listings.js) and the WORK panel (work-panel.js), in New master's
   own frame and colours (base.css tokens, .sh-box). The listing kinds keep WORK's colours (Form A, Off-Market, From Agent, Rental). */

/* ---- Listings: chips by kind, bottom left above "Colour the map" ---- */
#nmLst { position: absolute; left: 76px; bottom: 84px; z-index: 5; max-width: min(560px, calc(100% - 520px)); padding: 8px 10px; display: grid; gap: 6px; font-size: 12.5px; zoom: var(--nm-ui, 1); }
#nmLst[hidden] { display: none; }
.nl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nl-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: rgba(246, 234, 210, 0.06); color: var(--ink); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.nl-chip i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.nl-chip b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--soft); }
.nl-chip:hover { border-color: var(--accent); }
.nl-chip.on { background: var(--accent); color: #1b1712; border-color: var(--accent); }
.nl-chip.on b { color: #1b1712; }
.nl-chip:disabled { opacity: 0.4; cursor: default; }
.nl-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nl-line { color: var(--soft); font-size: 11.5px; }
.nl-card { font-size: 12.5px; line-height: 1.45; display: grid; gap: 2px; }
.nl-card img { width: 100%; max-height: 140px; object-fit: cover; border-radius: 6px; margin-bottom: 4px; display: block; }
.nl-p { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.nl-s { color: var(--soft); font-size: 11.5px; }
.nl-k { display: flex; align-items: center; gap: 6px; }
.nl-k i { width: 9px; height: 9px; border-radius: 50%; }
.nl-open { color: var(--accent); text-decoration: none; }
.nl-open:hover { text-decoration: underline; }
body.pg-clean #nmLst, body.nm-editing #nmLst { display: none !important; }

/* ---- WORK: over the Explore panel, same place and a little wider ---- */
#nmWork { position: absolute; top: 70px; right: 88px; width: 400px; max-height: calc((100% - 140px) / var(--nm-ui, 1)); display: flex; flex-direction: column; z-index: 8; overflow: hidden; font-size: 13px; line-height: 1.45; zoom: var(--nm-ui, 1); }
#nmWork[hidden] { display: none; }
body.pg-clean #nmWork { display: none !important; }
.uw-head { padding: 12px 40px 10px 16px; position: relative; border-bottom: 1px solid var(--line); }
.uw-tag { font-size: 10.5px; letter-spacing: 0.1em; font-weight: 700; color: var(--accent); }
.uw-head h3 { margin: 2px 0 0; font-size: 17px; font-weight: 800; line-height: 1.25; }
.uw-crumb, .uw-sub { color: var(--soft); font-size: 12px; }
.uw-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; font-size: 20px; line-height: 1; color: var(--soft); cursor: pointer; }
.uw-x:hover, .uw-x:focus-visible { background: rgba(246, 234, 210, 0.1); color: var(--ink); }
.uw-back { display: block; border: 0; background: transparent; color: var(--soft); padding: 0 0 4px; font: inherit; font-size: 12px; cursor: pointer; }
.uw-back:hover { color: var(--ink); }
.uw-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.uw-link { color: var(--accent); font-weight: 600; font-size: 12px; text-decoration: none; }
.uw-link:hover { text-decoration: underline; }
.uw-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; scrollbar-width: none; }
.uw-tabs button { border: 0; background: transparent; padding: 9px 7px 8px; font: inherit; font-size: 12px; font-weight: 600; color: var(--soft); border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.uw-tabs button.on { color: var(--ink); border-bottom-color: #5b6b2e; }
.uw-tabs button:disabled { opacity: 0.4; cursor: default; }
.uw-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.uw-body { padding: 10px 16px 16px; overflow: auto; display: grid; gap: 6px; align-content: start; }
.uw-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.uw-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.uw-lab { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); margin-top: 8px; }
.uw-big { font-size: 15px; font-weight: 700; }
.uw-dim { color: var(--soft); }
.uw-dimmed { opacity: 0.55; }
.uw-bad { color: #f87171; margin: 4px 0; }
.uw-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.uw-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; }
.uw-btns { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; }
.uw-mini { border: 1px solid var(--line); background: rgba(246, 234, 210, 0.07); color: var(--ink); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.uw-mini:hover { border-color: var(--accent); }
.uw-mini:disabled { opacity: 0.6; }
.uw-grid { display: grid; grid-template-columns: auto 1fr auto auto; gap: 4px 10px; align-items: center; font-size: 12.5px; }
.uw-grid2 { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 10px; font-size: 12.5px; }
.uw-bar { height: 6px; border-radius: 3px; background: rgba(246, 234, 210, 0.08); overflow: hidden; }
.uw-bar i { display: block; height: 100%; background: var(--accent); opacity: 0.8; }
.uw-num { text-align: right; font-variant-numeric: tabular-nums; }
.uw-floor { display: grid; gap: 4px; }
.uw-units { display: flex; flex-wrap: wrap; gap: 4px; }
.uw-unit { border: 1px solid var(--line); background: rgba(246, 234, 210, 0.06); color: var(--ink); border-radius: 5px; padding: 3px 6px; font: inherit; font-size: 11.5px; display: inline-flex; gap: 4px; align-items: baseline; cursor: pointer; }
.uw-unit small { color: var(--soft); font-size: 10px; }
.uw-unit:hover, .uw-unit:focus-visible { border-color: var(--accent); }

/* ---- the place card: Units (WORK panel) and WORK (its own page) ---- */
.nm-wk { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.nm-wk-b { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: rgba(246, 234, 210, 0.07); color: var(--ink); border-radius: 7px; padding: 6px 10px; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-decoration: none; cursor: pointer; }
.nm-wk-b span { color: var(--accent); }
.nm-wk-b:hover { border-color: var(--accent); }

/* round 2 layout (body.sh-swap, the computer default): the data panel is on the left, so WORK opens over it and Listings sits
   at the bottom between it and the tool column */
body.sh-swap #nmWork { left: 12px; right: auto; }
body.sh-swap #nmLst { left: 388px; bottom: 82px; max-width: calc(100% - 388px - 170px); }

@media (max-width: 700px) {
  #nmLst { left: 66px; right: 8px; bottom: 80px; max-width: none; } /* right of the tool column */
  .nl-chip { white-space: nowrap; flex: none; }
  .nl-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #nmWork { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 62vh; }
}
