/* ---------- the info board of the target bar (ui/targetinfo.js, like uitarget.py InfoBoard of newer clients) ---------- */
/* the question mark top left, the X top right (fal medallion, tools/art/gen_target_info_icon.py, soft edge: drawn smooth);
   lit while hovered or open */
#target .tinfo-q { position: absolute; left: 3px; top: 2px; width: 12px; height: 12px; image-rendering: auto;
  background: url(../assets/ui/target_info.png) center / 12px 12px no-repeat; }
#target .tinfo-q:hover, #target .tinfo-q.on { background-image: url(../assets/ui/target_info_on.png); }
#target .tinfo-q.on { filter: drop-shadow(0 0 1px var(--gold)); }

/* hangs under the target bar, centred like the original (left under the bar on small screens); while open over the tabs
   of the left edge (#edge, z-index 6) and the chat, under the windows (from 11) */
#target:has(> .tinfo:not(.hidden)) { z-index: 7; }
#target .tinfo { position: absolute; left: 50%; top: calc(100% + 3px); transform: translateX(-50%); width: 186px; padding: 5px 6px 6px;
  text-align: left; font-size: 7px; line-height: 9px; }
#ui.compact #target .tinfo { left: 0; transform: none; }
.tinfo .ti-kv { display: flex; flex-direction: column; padding: 2px 4px; background: #120e0b; box-shadow: inset 0 0 0 1px #2e251c; }
.tinfo .ti-kvr { display: flex; justify-content: space-between; gap: 6px; }
.tinfo .ti-kvr span:first-child { flex: none; }
.tinfo .ti-kvr span:last-child { min-width: 0; text-align: right; }
.tinfo .ti-sec { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; margin: 5px 0 1px; padding: 0 1px 1px;
  color: var(--gold); font-size: 8px; border-bottom: 1px solid #3a2e22; }
.tinfo .ti-sec .dim { font-size: 6px; }
/* the loot list scrolls with its bar always visible (game.css scroll-on) */
.tinfo .ti-list { max-height: 132px; overflow-x: hidden; overflow-y: auto; padding-right: 3px; }
.tinfo .ti-grp { display: flex; justify-content: space-between; gap: 4px; margin: 3px 1px 1px; font-size: 6px; line-height: 7px; color: var(--gold-d); }
.tinfo .ti-sub { margin: 5px 1px 0; color: var(--gold); }
.tinfo .ti-row { display: flex; align-items: center; gap: 3px; min-height: 19px; padding: 0 1px; border-bottom: 1px solid #221a14; }
.tinfo .ti-row.go:hover { background: #241c15; }
.tinfo .ti-rt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tinfo .ti-rs { font-size: 6px; line-height: 7px; }
.tinfo .ti-rr { flex: none; color: #e8dcc0; }
.tinfo .ti-grid { display: flex; flex-wrap: wrap; gap: 1px; padding: 1px 0; }
/* equipment of other classes: trade goods, dimmed */
.tinfo .ti-grid .slot.other { opacity: .4; }
.tinfo .ti-grid .slot:hover { opacity: 1; box-shadow: inset 0 0 0 1px var(--gold); }
.tinfo .ti-note { margin: 1px 1px 2px; font-size: 6px; line-height: 7px; }
.tinfo .ti-foot-note { margin-top: 3px; font-size: 6px; line-height: 7px; }
.tinfo .ti-foot-note.warn { color: #ffb070; }
.tinfo .ti-foot-note.good { color: #8fe39a; }
.tinfo .ti-foot { margin-top: 4px; }
/* small screens: shorter, the chat stays free */
#ui.compact #target .tinfo .ti-list { max-height: 88px; }

/* phones: as big as the windows (--wz), the list shorter; the "?" gets a bigger invisible hit area like the X */
html.touch #ui #target .tinfo { transform: translateX(-50%) scale(var(--wz)); transform-origin: 50% 0; }
html.touch #ui.compact #target .tinfo { transform: scale(var(--wz)); transform-origin: 0 0; }
html.touch #ui #target .tinfo .ti-list { max-height: 70px; }
/* wider, the values in two columns: more height left for the loot */
html.touch #ui #target .tinfo { width: 252px; }
html.touch #ui #target .tinfo .ti-kv { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
html.touch #ui #target .tinfo-q::after { content: ''; position: absolute; inset: -5px -7px -5px -3px; }
