/* Friend list (ui/friends.js, Alt+M) and guild window (ui/guild.js, Alt+G). Art pixels like game.css (zoomed by --px). */

/* ---------- shared list rows ---------- */
.fr-head { display: flex; justify-content: space-between; align-items: center; height: 10px; padding: 0 2px; margin-bottom: 2px; font-size: 7px; }
.fr-list { max-height: 150px; min-height: 40px; overflow-y: auto; margin-bottom: 4px; }
.fr-row { display: flex; align-items: center; gap: 3px; height: 11px; padding: 0 2px; font-size: 7px; cursor: pointer; color: var(--dim); }
.fr-row:nth-child(odd) { background: rgba(0, 0, 0, .18); }
.fr-row:hover { background: rgba(242, 196, 90, .08); }
.fr-row.on { color: var(--text); }
.fr-row.me .fr-name { color: var(--gold); }
/* Jersey 10 sits low in its line box (caps 2.2-7.1 of an 11 px row): half a pixel up = centred on the name (translate,
   top would snap to whole pixels) */
.fr-dot { flex: none; width: 4px; height: 4px; background: #4a4038; box-shadow: 0 0 0 1px var(--edge); translate: 0 -.5px; }
.fr-row.on .fr-dot { background: var(--green); }
.fr-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-row.on .fr-name { color: #fff; }
.fr-lv { flex: none; color: var(--gold); }
.fr-row:not(.on) .fr-lv { color: var(--gold-d); }
.fr-where { flex: none; max-width: 62px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 6px; color: var(--dim); text-align: right; }
.fr-row.blk { cursor: default; }
.fr-row.blk .btn { flex: none; }
.fr-empty { font-size: 7px; line-height: 9px; padding: 3px 2px; }
.fr-add { margin-bottom: 3px; }
.fr-add input { flex: 1; min-width: 0; }
.fr-foot .keyhelp { line-height: 7px; }
.fr-row .pt-crown { margin: 0; }

/* guild name in tooltips and the equipment view of others */
.gild { color: #9cd2ff; }
#inspect .ins-guild { color: #9cd2ff; }
#inspect .ins-idle { color: var(--dim); }

/* ---------- guild window ---------- */
#guild-win .gd-body { min-height: 60px; }
#guild-win .gd-none { font-size: 8px; color: var(--gold); margin-bottom: 3px; }
#guild-win .gd-text { font-size: 7px; line-height: 9px; color: var(--text); margin-bottom: 3px; }
#guild-win .gd-help { line-height: 7px; margin-top: 3px; }
#guild-win .gd-add { margin-top: 3px; }
#guild-win .gd-add input { flex: 1; min-width: 0; }
#guild-win .gd-title { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; margin-bottom: 3px; font-size: 8px; }
#guild-win .gd-name { font-size: 10px; color: #9cd2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#guild-win .gd-exp { height: 7px; margin: 0 1px 4px; }
#guild-win .gd-notice { font-size: 7px; line-height: 9px; padding: 3px 4px; margin-bottom: 3px; min-height: 15px; overflow-wrap: anywhere;
  background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px #2e251c; }
/* under the notice: its writer, how many confirmed it (Dev-Ticket #169); in the box of the notice: the writer */
#guild-win .gd-nline { display: flex; justify-content: space-between; gap: 4px; margin: -1px 1px 3px; font-size: 7px; line-height: 9px; }
.gd-nby { margin: 0 0 5px; font-size: 7px; line-height: 9px; text-align: center; }
#guild-win .gd-notice-in { display: block; width: 100%; height: 36px; resize: none; margin-bottom: 3px; padding: 2px 3px; font: inherit; font-size: 7px; line-height: 9px;
  color: var(--text); background: #0f0c0a; border: 0; outline: none; box-shadow: inset 0 0 0 1px var(--gold-d), inset 1px 1px 0 1px var(--edge); }
#guild-win .gd-btns { margin-top: 3px; }
#guild-win .btn.armed { color: #ff8a7a; }
#guild-win .gd-members { max-height: 140px; min-height: 30px; overflow-y: auto; }
#guild-win .gd-rank { flex: none; width: 38px; font-size: 6px; text-align: center; color: #9cd2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#guild-win .gd-rank.lead { color: var(--gold); }
#guild-win .gd-rank.new { color: var(--dim); }
#guild-win .fr-where { max-width: 50px; }

/* storage: grid left, cash box right */
#guild-win .gd-pages .tab.locked { color: #5a4c3e; }
#guild-win .gd-debt { margin-bottom: 3px; padding: 2px 4px; font-size: 7px; line-height: 8px; text-align: center;
  color: #ff8e86; background: rgba(130, 22, 18, .35); box-shadow: inset 0 0 0 1px #8c322c; }
#guild-win .gd-grid.gd-debt-lock { opacity: .55; }
#guild-win .gd-store { display: flex; gap: 6px; align-items: flex-start; }
#guild-win .gd-grid { margin: 0; }
#guild-win .gd-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#guild-win .gd-side .section { margin: 0; }
#guild-win .gd-side .section + * { margin-top: -1px; }
#guild-win .gd-gold-v { font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ui #guild-win .gd-gold-in { width: 100%; }
#guild-win .gd-gbtns { width: 100%; margin: 0; }
#guild-win .gd-rule { line-height: 7px; }
#guild-win .gd-amount { display: flex; gap: 3px; align-items: center; margin-top: 4px; font-size: 7px; }
#guild-win .gd-amount > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#guild-win .gd-amount .eq-btns { margin: 0; }

/* log */
#guild-win .gd-log { max-height: 170px; overflow-y: auto; }
#guild-win .gd-log-row { display: flex; gap: 4px; padding: 1px 2px; font-size: 7px; line-height: 8px; }
#guild-win .gd-log-row:nth-child(odd) { background: rgba(0, 0, 0, .18); }
#guild-win .gd-log-t { flex: none; width: 46px; font-size: 6px; }
#guild-win .gd-log-x { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#guild-win .gd-log-row.in .gd-log-x { color: #a8e890; }
#guild-win .gd-log-row.out .gd-log-x { color: #ffc27a; }

/* ranks: the list in their order, the editor of the chosen one */
#guild-win .gd-ranks { max-height: 86px; overflow-y: auto; margin-bottom: 3px; }
#guild-win .gd-rk { display: flex; align-items: center; gap: 3px; height: 13px; padding: 0 2px; font-size: 7px; cursor: pointer; }
#guild-win .gd-rk:nth-child(odd) { background: rgba(0, 0, 0, .18); }
#guild-win .gd-rk:hover { background: rgba(242, 196, 90, .08); }
#guild-win .gd-rk.on { background: rgba(242, 196, 90, .14); box-shadow: inset 0 0 0 1px var(--bronze); }
#guild-win .gd-rk .pt-crown { margin: 0; }
#guild-win .gd-rk-dot { flex: none; width: 4px; height: 4px; margin: 0 2px; background: #9cd2ff; box-shadow: 0 0 0 1px var(--edge); }
#guild-win .gd-rk-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#guild-win .gd-rk.mine .gd-rk-name { color: var(--gold); }
#guild-win .gd-rk-def { flex: none; padding: 0 2px; font-size: 6px; line-height: 7px; color: #a8f0b8; box-shadow: inset 0 0 0 1px #3f8f3f; }
#guild-win .gd-rk-n { flex: none; min-width: 10px; text-align: right; font-size: 6px; color: var(--dim); }
#guild-win .gd-mv { flex: none; min-width: 0; width: 11px; height: 10px; padding: 0; font-size: 6px; font-family: 'Segoe UI', sans-serif; }
#guild-win .gd-rk-ed { padding: 3px 4px; margin-bottom: 3px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px #2e251c; }
#guild-win .gd-rights { display: grid; grid-template-columns: 1fr 30px; gap: 2px 3px; align-items: center; font-size: 7px; margin-bottom: 3px; }
#guild-win .gd-rights .btn.small { min-width: 0; width: 100%; }
#guild-win .gd-rlabel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#guild-win .gd-rv { text-align: center; }
#guild-win .gd-limit { margin-top: 1px; }
/* the pages of the storage of a rank (ui/guild.js pageTable): a row per page, a tick each for see / put in / take out */
#guild-win .gd-pgr { display: grid; grid-template-columns: max-content repeat(3, minmax(0, 1fr)); gap: 2px 3px; align-items: center; font-size: 7px; margin-bottom: 4px; }
#guild-win .gd-pgr-h { min-width: 0; text-align: center; line-height: 8px; color: var(--gold); overflow-wrap: anywhere; }
#guild-win .gd-pgr-l { padding-right: 2px; text-align: left; white-space: nowrap; }
#guild-win .gd-pgr-l.locked { color: #5a4c3e; }
#guild-win .gd-chk { display: flex; align-items: center; justify-content: center; min-width: 0; width: 100%; height: 11px; padding: 0; }
#guild-win .gd-chk.ro { background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px #2e251c; }
#guild-win .gd-box { position: relative; flex: none; width: 7px; height: 7px; background: #0f0c0a; box-shadow: inset 0 0 0 1px #4a3b2b; }
#guild-win .gd-chk.on .gd-box { box-shadow: inset 0 0 0 1px #79d653; }
#guild-win .gd-chk.on .gd-box::after { content: ''; position: absolute; left: 2px; top: 2px; width: 3px; height: 3px; background: #8dff5e; }
#ui #guild-win .btn.gd-chk.on { background: linear-gradient(#2e4a22, #1c2f15); box-shadow: 0 0 0 1px #060504, inset 0 0 0 1px #79d653; }
html.touch #ui #guild-win .gd-chk { min-height: var(--finger); }

/* ---------- chat ---------- */
#chat .ch-guild-tag { color: #9cd2ff; }
#chat .log div.friend { color: #a8f0b8; }
#chat .log div.guild { color: #9cd2ff; }

/* target bar of a player: up to 4 buttons in a row, more go into a second one (all equally wide) */
#target .tbtns { grid-auto-flow: row; }
/* the title of the player (game/titles.js) over its name */
#inspect .ins-title { display: flex; justify-content: center; margin-bottom: 2px; }
#inspect .ins-title img { display: block; image-rendering: pixelated; }

/* the team online above the friends / conversations (ui/friends.js renderTeam) */
#friends-win .fr-team { margin-bottom: 4px; padding-bottom: 3px; border-bottom: 1px solid var(--edge); }
#friends-win .fr-team-t { display: flex; align-items: center; gap: 3px; color: var(--gold); }
#friends-win .fr-team-t img { height: 6px; image-rendering: pixelated; }
/* a team member: what it is in the colour of its title (Game Admin, Game Master ...), then the name; no level (Nutzer 10.11.2026) */
#friends-win .fr-team .fr-row .fr-name { color: #fff; }
#friends-win .fr-team .fr-tt { flex: none; white-space: nowrap; }
/* the languages of a team member / mentor (ui/friends.js flagsOf): the flags of the admin page (SVG, 4:3), sharp at every UI size */
#friends-win .fr-flags { flex: none; display: flex; align-items: center; gap: 1.5px; }
#friends-win .fr-flags img { width: 8px; height: 6px; object-fit: cover; image-rendering: auto; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .7); }
#friends-win .fr-flags .fr-more { margin-left: 1px; color: var(--dim); }
/* everything in the middle of the 11 px row (Nutzer 13.11.2026: the flags were lower than the name, the text higher than the
   row): Jersey 10 sits high in its line box - the capitals of 7 px text at 2-7, of 6 px text at 3-7 - so one / half a pixel
   down; the flags (6 px) snap from 2.5 to 3-9 (the window is laid out at 1x and scaled, game.css #ui), half a pixel up.
   The dot is in the middle already (4 px: 3.5 snaps to 4, .fr-dot -.5). translate, not top: top would snap to whole pixels */
#friends-win .fr-row :is(.fr-name, .fr-tt, .fr-lv, .fr-more) { translate: 0 1px; }
#friends-win .fr-row .fr-where { translate: 0 .5px; }
#friends-win .fr-flags img { translate: 0 -.5px; }
/* a friend of another empire (ui/friends.js foreign, Nutzer 14.11.2026): the flag of its empire like in the world chat */
#friends-win .fr-emp { flex: none; width: 10px; height: 6px; translate: 0 -.5px; }
#friends-win .fr-team .fr-row.inv { opacity: .55; }
/* helpers (title Mentor, server/friends.js teamOnline h) in their own box "Mentor online" below: green like their emblem */
#friends-win .fr-team .fr-row.helper .fr-name { color: #9be06a; }
/* a mentor's own duty and the button to change it (ui/friends.js renderDuty, server/mentors.js) */
#friends-win .fr-duty { display: flex; align-items: center; gap: 3px; min-height: 13px; margin-bottom: 2px; font-size: 7px; color: var(--dim); }
#friends-win .fr-duty.on { color: #9be06a; }
#friends-win .fr-duty.on .fr-dot { background: var(--green); }
#friends-win .fr-duty-t { flex: 1; min-width: 0; }
