/* Ranglisten (ui/ranking.js, Taste P): the lists on the left, the classes on top, the table with the own place under it.
   Art pixels like game.css (zoomed by --px). Handy: css/touch.css. */
#ranking .win-body { display: flex; flex-direction: column; gap: 4px; padding: 4px 5px 5px; }
.rk-tic { width: 10px; height: 10px; margin-right: 3px; image-rendering: auto; }

/* ---------- top: the week | the classes ---------- */
.rk-top { flex: none; display: flex; gap: 4px; align-items: stretch; min-height: 28px; }
.rk-reset { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 1px 4px; text-align: center;
  font-size: 7px; line-height: 8px; color: var(--gold); background: #120e0b; box-shadow: inset 0 0 0 1px #3a2e22; overflow-wrap: anywhere; }
/* the rewards of the list under the countdown (hover: all of them) */
.rk-gift { display: flex; align-items: center; gap: 2px; max-width: 100%; color: var(--text); cursor: default; }
.rk-gift img { flex: none; width: 9px; height: 9px; object-fit: contain; }
.rk-gift span { min-width: 0; overflow-wrap: anywhere; }
.rk-gift:hover { color: var(--gold); }
.rk-gift-s { width: 8px; height: 8px; margin-right: 2px; vertical-align: -1px; object-fit: contain; }
#tooltip .rk-tt-title { display: block; margin: 2px 0 1px; image-rendering: pixelated; }
.rk-jobs { flex: 1; min-width: 0; display: flex; gap: 2px; }
/* portrait over the name: "Schamane", "Nindzsa" keep their whole width */
.rk-job { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 24px; padding: 1px 2px; cursor: pointer;
  background: linear-gradient(#2a2119, #1a1410); box-shadow: inset 0 0 0 1px #3a2e22; color: var(--dim); font-size: 7px; line-height: 8px; }
.rk-job img { flex: none; width: 12px; height: 12px; object-fit: contain; box-shadow: 0 0 0 1px var(--edge); background: #0d0a08; }
.rk-job img[src$='cup.png'] { image-rendering: auto; box-shadow: none; background: none; }
.rk-job span { max-width: 100%; overflow-wrap: anywhere; text-align: center; white-space: nowrap; }
.rk-job:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--bronze); }
.rk-job.picked { color: var(--gold); background: linear-gradient(#3b2f23, #241c15); box-shadow: inset 0 0 0 1px var(--gold-d), inset 0 -1px 0 1px var(--gold-d); }

/* ---------- the lists ---------- */
.rk-main { flex: none; display: flex; gap: 4px; height: 214px; }
.rk-cats { flex: none; width: 92px; overflow-y: auto; overflow-x: hidden; padding: 1px; background: #120e0b; box-shadow: inset 0 0 0 1px #3a2e22; }
.rk-group { margin: 3px 2px 1px; font-size: 6px; line-height: 7px; color: var(--dim); text-transform: uppercase; letter-spacing: .3px; }
.rk-group:first-child { margin-top: 1px; }
.rk-cat { position: relative; display: flex; align-items: center; gap: 3px; min-height: 13px; padding: 1px 2px; cursor: pointer; font-size: 7px; line-height: 8px; color: var(--text); }
.rk-cat img { flex: none; width: 11px; height: 11px; object-fit: contain; image-rendering: auto; }
.rk-cname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rk-cat:hover { background: rgba(242, 196, 90, .07); }
.rk-cat.picked { color: var(--gold); background: linear-gradient(90deg, rgba(242, 196, 90, .16), rgba(242, 196, 90, .03)); box-shadow: inset 1px 0 0 var(--gold); }
.rk-sub { padding-left: 16px; min-height: 11px; color: var(--dim); }
.rk-sub::before { content: ''; position: absolute; left: 8px; top: 5px; width: 3px; height: 1px; background: var(--bronze); }
/* the arrow that opens the dungeons */
.rk-arrow { flex: none; width: 7px; height: 7px; position: relative; }
.rk-arrow::before { content: ''; position: absolute; left: 1px; top: 2px; border: 3px solid transparent; border-top: 3px solid var(--dim); border-bottom: 0; }
.rk-arrow.on::before { transform: rotate(180deg); }
.rk-arrow:hover::before { border-top-color: var(--gold); }

/* ---------- the table ---------- */
.rk-table { flex: 1; min-width: 0; width: 236px; display: flex; flex-direction: column; background: #120e0b; box-shadow: inset 0 0 0 1px #3a2e22; padding: 1px; }
.rk-pers { flex: none; margin: 0 0 1px; }
.rk-pers .tab.off { opacity: .35; pointer-events: none; }
.rk-row { display: flex; align-items: center; gap: 2px; height: 12px; padding: 0 3px; font-size: 7px; line-height: 8px; white-space: nowrap; }
.rk-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rk-head { flex: none; height: 11px; color: var(--gold); background: linear-gradient(#3b2f23, #2a2119); box-shadow: inset 0 -1px 0 var(--edge); text-shadow: 1px 1px 0 var(--ink); }
.rk-rows { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
/* 100 rows of pictures and text: those out of view cost nothing (tools/dev/winperf.mjs: paint of the UI from 3 ms to 0.4 ms) */
.rk-rows .rk-row { content-visibility: auto; contain-intrinsic-size: auto 12px; }
.rk-rows .rk-row:nth-child(even) { background: rgba(255, 255, 255, .025); }
.rk-rows .rk-row:hover { background: rgba(242, 196, 90, .08); }
/* a group of a season list: one block, the members inside in the columns of a row (name 70 + level 20 + flag 18 + guild 54 + 3 gaps) */
.rk-grp { display: flex; align-items: center; gap: 2px; padding: 0 3px; font-size: 7px; line-height: 8px; white-space: nowrap; }
.rk-grp > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rk-mem { flex: none; width: 168px; display: flex; flex-direction: column; }
.rk-mem > .rk-row { padding: 0; }
.rk-rows .rk-grp { content-visibility: auto; contain-intrinsic-size: auto 36px; }
.rk-rows .rk-grp .rk-row { content-visibility: visible; }
.rk-rows .rk-grp:nth-child(even) { background: rgba(255, 255, 255, .025); }
.rk-rows .rk-grp .rk-row:nth-child(even) { background: none; }
.rk-rows .rk-grp .rk-row:hover { background: rgba(242, 196, 90, .08); }
.rk-row.top1 .rk-nm, .rk-grp.top1 .rk-nm { color: #ffd76a; }
.rk-row.top2 .rk-nm, .rk-grp.top2 .rk-nm { color: #dfe4ea; }
.rk-row.top3 .rk-nm, .rk-grp.top3 .rk-nm { color: #e3a27a; }
.rk-row.me, .rk-grp.me { box-shadow: inset 0 0 0 1px var(--gold-d); background: rgba(242, 196, 90, .1); }
.rk-c-place { flex: none; width: 18px; text-align: center; color: var(--dim); }
.rk-c-place .rk-medal { display: block; width: 11px; height: 11px; margin: 0 auto; image-rendering: auto; }
.rk-c-name { flex: none; width: 70px; display: flex; align-items: center; gap: 2px; }
.rk-face { flex: none; width: 9px; height: 9px; box-shadow: 0 0 0 1px var(--edge); }
.rk-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rk-c-lv { flex: none; width: 27px; white-space: nowrap; text-align: center; }
.rk-c-emp { flex: none; width: 18px; display: flex; justify-content: center; }
.rk-flag { width: 12px; height: 8px; box-shadow: 0 0 0 1px var(--edge); }
.rk-flag-h { width: 10px; height: 9px; }
.rk-c-guild { flex: none; width: 54px; }
.rk-c-val { flex: 1; text-align: right; color: var(--gold); }
.rk-head .rk-c-place, .rk-head .rk-c-lv, .rk-head .rk-c-guild, .rk-head .rk-c-name { color: var(--gold); }
.rk-empty { padding: 8px 6px; font-size: 7px; line-height: 8px; text-align: center; }
/* the own place under the list */
.rk-mine { flex: none; margin-top: 1px; padding-top: 1px; box-shadow: inset 0 1px 0 #3a2e22; }
.rk-mine .rk-row.me, .rk-mine .rk-grp.me { box-shadow: inset 0 0 0 1px var(--gold); }
.rk-note { height: 12px; padding: 0 4px; font-size: 7px; line-height: 12px; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* the cup at the left edge (#edge, ui/discord.js) */
#rk-tab .et-ic img { image-rendering: auto; }
