/* The Gildenkriege (ui/guildwar.js): the window #gw, the fight's HUD #gw-hud, #gw-banner, #gw-result; the ruler in the map M (.at-ruler)
   and on the travel cards (.tv-gw). Red = the attacking guild, blue = the ruler. */
/* in the fight only what it needs (like the arena and the Drachenspiele) */
#ui.in-gw #quest-tracker, html.touch #ui.in-gw #quest-tracker, #ui.in-gw #travel-btn, #ui.in-gw #wb-timer, #ui.in-gw #wb-call, #ui.in-gw #ev-box, #ui.in-gw #autopill { display: none; }
.gw-red { color: #ff7a64; }
.gw-blue { color: #7fb6ff; }

/* the window */
#gw .gw-body { display: flex; flex-direction: column; gap: 3px; max-height: 300px; overflow-y: auto; padding-right: 1px; }
#gw .gw-empty { padding: 8px; text-align: center; }
#gw .gw-head { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 5px; align-items: center; padding: 3px 4px;
  background: linear-gradient(180deg, rgba(110, 30, 18, .45), rgba(20, 12, 10, .2) 70%), linear-gradient(180deg, #1c1814, #110e0c); box-shadow: inset 0 0 0 1px #6a3a26; }
#gw .gw-head > img { width: 30px; height: 30px; image-rendering: auto; }
#gw .gw-ht { min-width: 0; font-size: 8px; line-height: 10px; overflow-wrap: anywhere; }
#gw .gw-gname { font-size: 11px; line-height: 12px; color: #ffe2a0; text-shadow: 0 1px 0 #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#gw .gw-note { font-size: 7px; line-height: 8px; padding: 0 2px; overflow-wrap: anywhere; }
#gw .gw-help { margin-top: 2px; }
#gw .gw-list { display: flex; flex-direction: column; gap: 2px; }
#gw .gw-row { background: linear-gradient(180deg, #1c1814, #110e0c); box-shadow: inset 0 0 0 1px #47423a; }
#gw .gw-row.on { box-shadow: inset 0 0 0 1px var(--bronze); }
#gw .gw-row.mine { box-shadow: inset 2px 0 0 0 var(--gold), inset 0 0 0 1px #6a5a3a; }
#gw .gw-rt { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 4px; align-items: center; padding: 3px 4px; font-size: 8px; line-height: 10px; cursor: pointer; }
#gw .gw-rt:hover { background: rgba(255, 220, 150, .06); }
#gw .gw-owner { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* (long map names wrap: "Grotte der Verbannung" in Polish and Hungarian is twice as long) */
#gw .gw-map { min-width: 0; overflow-wrap: anywhere; }
#gw .gw-owner { color: #ffe2a0; }
#gw .gw-st { min-width: 0; text-align: right; font-size: 7px; line-height: 8px; overflow-wrap: anywhere; }
#gw .gw-det { display: flex; flex-direction: column; gap: 2px; padding: 2px 4px 4px; border-top: 1px solid rgba(90, 72, 52, .45); }
#gw .gw-why { font-size: 7px; line-height: 8px; overflow-wrap: anywhere; }
#gw .gw-btns { margin-top: 2px; }
#gw .gw-slot { display: flex; gap: 3px; align-items: center; }
#gw .gw-slot > .gw-sel, #gw .gw-slot > .gw-bid { flex: 1; min-width: 0; }
#gw .gw-bid { height: 14px; font-size: 8px; }
#gw .gw-war { display: flex; flex-direction: column; gap: 2px; padding: 3px 4px 4px; background: linear-gradient(180deg, rgba(120, 24, 16, .4), rgba(20, 12, 10, .2) 70%), #15100d;
  box-shadow: inset 0 0 0 1px #8a3a26, 0 0 6px rgba(255, 90, 50, .25); }
#gw .gw-wt { display: flex; align-items: center; gap: 3px; font-size: 9px; line-height: 11px; color: #ffd28a; }
#gw .gw-wt img { width: 14px; height: 14px; image-rendering: auto; }
#gw .gw-vs { display: flex; justify-content: center; gap: 5px; font-size: 9px; line-height: 11px; overflow-wrap: anywhere; }
#gw .gw-reg { display: flex; flex-wrap: wrap; gap: 2px; }
#gw .gw-chip { display: inline-flex; align-items: center; gap: 2px; padding: 0 3px; font-size: 7px; line-height: 9px; background: #241c15; box-shadow: inset 0 0 0 1px #47423a; }
#gw .gw-x { font-style: normal; color: #ff8a72; cursor: pointer; padding: 0 1px; }
#gw .gw-hist { display: flex; flex-direction: column; gap: 1px; }
#gw .gw-hrow { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 4px; font-size: 7px; line-height: 8px; }
#gw .gw-hn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* in the fight */
/* (right under the minimap like the arena's and the Drachenspiele's: the top middle belongs to the tips and the auto-hunt pill; the quest tracker is hidden in the fight) */
#gw-hud { position: absolute; right: 4px; top: 111px; width: 168px; padding: 3px 5px 4px; display: flex; flex-direction: column; gap: 1px; z-index: 6; }
#gw-hud.hidden { display: none; }
#gw-hud .gw-hrow1 { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 5px; align-items: center; }
#gw-hud .gw-hn { display: flex; align-items: center; gap: 2px; min-width: 0; font-size: 8px; line-height: 10px; }
#gw-hud .gw-hn.gw-blue { flex-direction: row-reverse; }
#gw-hud .gw-hn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#gw-hud .gw-hn.me > span { text-decoration: underline; }
#gw-hud .gw-hn img { flex: none; width: 12px; height: 12px; image-rendering: auto; }
#gw-hud .gw-pts { font-size: 13px; line-height: 14px; text-shadow: 1px 1px 0 #000; white-space: nowrap; }
#gw-hud .gw-hrow2 { display: flex; justify-content: space-between; gap: 4px; font-size: 7px; line-height: 9px; }
#gw-hud .gw-clock { color: var(--gold); }
#gw-hud .gw-hrow3 { font-size: 6px; line-height: 8px; text-align: center; overflow-wrap: anywhere; }
#gw-hud .gw-feed { font-size: 6px; line-height: 7px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#gw-banner { position: absolute; left: 50%; top: 26%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; z-index: 6500; }
#gw-banner.hidden { display: none; }
#gw-banner .gw-bt { font-size: 30px; line-height: 30px; color: var(--gold); text-shadow: 2px 2px 0 #000, 0 0 6px rgba(255, 110, 60, .5); animation: gw-pop .3s ease-out; }
@keyframes gw-pop { from { scale: 1.4; opacity: .4; } }
#gw-result { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); width: min(264px, calc(100% - 8px)); padding: 6px 8px 7px; z-index: 7000; display: flex; flex-direction: column; gap: 3px; }
#gw-result.hidden { display: none; }
#gw-result .gw-rt2 { text-align: center; font-size: 13px; line-height: 14px; text-shadow: var(--ol); }
#gw-result .gw-rsub { text-align: center; font-size: 8px; line-height: 10px; color: #fff3d1; overflow-wrap: anywhere; }
#gw-result .gw-rcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
#gw-result .gw-rcol { display: flex; flex-direction: column; gap: 1px; padding: 2px 3px; max-height: 110px; overflow-y: auto; background: linear-gradient(180deg, #1c1814, #110e0c); box-shadow: inset 0 0 0 1px #47423a; }
#gw-result .gw-rh { font-size: 8px; line-height: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#gw-result .gw-rr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 3px; font-size: 7px; line-height: 8px; }
#gw-result .gw-rn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#gw-result .gw-rnote { text-align: center; font-size: 7px; line-height: 8px; overflow-wrap: anywhere; }

/* the map M and its travel cards */
#ui #atlas .at-ruler { display: inline-flex; align-items: center; gap: 2px; min-width: 0; cursor: pointer; overflow: hidden; }
#ui #atlas .at-ruler.hidden { display: none; }
#ui #atlas .at-ruler > img { flex: none; width: 10px; height: 10px; image-rendering: auto; }
#ui #atlas .at-ruler > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ui #atlas .tv-pic > img.tv-gw { position: absolute; right: 2px; top: 13px; width: 13px; height: 13px; object-fit: contain; filter: drop-shadow(0 1px 0 #000); }
