/* PvP Arena (ui/arena.js): matchmaking window at the Arenameister (#arena), HUD queue pill (#arena-q),
   in-match HUD (#arena-hud), center countdown (#arena-count) and winner summary (#arena-result). */
#arena .win-body { padding: 5px 6px 6px; }
#arena .ar-body { display: flex; flex-direction: column; gap: 4px; }
#arena .ar-intro { font-size: 7px; line-height: 8px; color: var(--text); overflow-wrap: anywhere; }
#arena .ar-meta { display: flex; justify-content: space-between; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 2px 4px; font-size: 7px; line-height: 8px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px #2c231a; }
#arena .ar-party { color: var(--gold); min-width: 0; overflow-wrap: anywhere; }
#arena .ar-fights { color: var(--dim); white-space: nowrap; }
#arena .ar-fights.on { color: #8fc8ff; }

#arena .ar-qbar { display: flex; align-items: center; gap: 4px; padding: 3px 4px; font-size: 7px; line-height: 9px;
  background: rgba(58, 42, 16, .55); box-shadow: inset 0 0 0 1px var(--gold-d); }
#arena .ar-qtxt { flex: 1; min-width: 0; color: #ffe8a0; overflow-wrap: anywhere; }
#arena .ar-qsub { flex: none; font-size: 6px; }

#arena .ar-dot, #arena-q .ar-dot { flex: none; width: 5px; height: 5px; background: var(--gold);
  box-shadow: 0 0 0 1px #000; animation: blink 1s steps(2) infinite; }

#arena .ar-modes { display: flex; flex-direction: column; gap: 3px; }
#arena .ar-card { display: flex; align-items: center; gap: 6px; padding: 4px 5px; background: #120e0b;
  box-shadow: inset 0 0 0 1px #2c231a; }
#arena .ar-card.hot { box-shadow: inset 0 0 0 1px #423322; }
#arena .ar-card.active { background: #1e170e; box-shadow: inset 0 0 0 1px var(--gold); }
#arena .ar-badge { flex: none; width: 34px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 10px; color: var(--gold); background: rgba(242, 196, 90, .08);
  box-shadow: inset 0 0 0 1px var(--bronze-d); text-shadow: var(--ol); }
#arena .ar-card.active .ar-badge { background: rgba(242, 196, 90, .18); box-shadow: inset 0 0 0 1px var(--gold-d); }
#arena .ar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#arena .ar-desc { font-size: 7px; line-height: 8px; color: var(--text); overflow-wrap: anywhere; }
#arena .ar-count { font-size: 7px; line-height: 8px; overflow-wrap: anywhere; }
#arena .ar-count.on { color: var(--green, #72c85a); }
#arena .ar-btn { flex: none; min-width: 62px; height: auto; min-height: 15px; padding: 2px 5px; line-height: 8px;
  white-space: normal; text-align: center; }
#arena .ar-foot { font-size: 6px; line-height: 7px; overflow-wrap: anywhere; }

/* Compact queue indicator above the action bar while #arena is closed */
#arena-q { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); display: flex; align-items: center;
  gap: 4px; padding: 2px 5px; font-size: 7px; line-height: 9px; white-space: nowrap; z-index: 25; }
#arena-q.hidden { display: none; }
#arena-q .ar-qp-txt { color: #ffe8a0; }
#arena-q .ar-qp-btn { height: 11px; line-height: 9px; padding: 0 4px; }

/* Inside pidle_arena: hide quest tracker and village/hunt travel button */
#ui.in-arena #quest-tracker, html.touch #ui.in-arena #quest-tracker,
#ui.in-arena #travel-btn { display: none; }

/* In-match HUD (right side under the minimap) */
#arena-hud { position: absolute; right: 4px; top: 111px; width: 128px; padding: 3px 4px 4px;
  display: flex; flex-direction: column; gap: 3px; }
#arena-hud.hidden { display: none; }
#arena-hud .ar-hhead { display: flex; justify-content: space-between; align-items: center; gap: 3px; font-size: 8px; line-height: 9px; }
#arena-hud .ar-htitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#arena-hud .ar-hclock { flex: none; color: var(--text); }
#arena-hud .ar-hclock.warn { color: #ff8a72; }
#arena-hud .ar-hstate { font-size: 7px; line-height: 8px; overflow-wrap: anywhere; }
#arena-hud .ar-hteam { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; border-top: 1px solid rgba(90, 72, 52, .45); }
#arena-hud .ar-htlabel { font-size: 6px; line-height: 7px; text-transform: uppercase; letter-spacing: .3px; }
#arena-hud .ar-hteam.ally .ar-htlabel { color: #9de88c; }
#arena-hud .ar-hteam.foe .ar-htlabel { color: #ee74e4; }
#arena-hud .ar-hf { display: flex; flex-direction: column; gap: 1px; padding: 1px 2px; background: rgba(0, 0, 0, .25); }
#arena-hud .ar-hf.ar-pick { cursor: pointer; }
#arena-hud .ar-hf.ar-pick:hover { box-shadow: inset 0 0 0 1px #a63d9c; }
#arena-hud .ar-hf.dead { opacity: .48; }
#arena-hud .ar-hf.dead .ar-hfname { color: var(--dim); text-decoration: line-through; }
#arena-hud .ar-hftop { display: flex; align-items: baseline; gap: 3px; font-size: 7px; line-height: 8px; }
#arena-hud .ar-hfname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#arena-hud .ar-hfkills { flex: none; color: var(--gold); font-size: 6px; }
#arena-hud .ar-hflv { flex: none; font-size: 6px; }
#arena-hud .ar-hfbar { height: 4px; }

/* Center countdown & spawn sync overlay */
#arena-count { position: absolute; left: 50%; top: 28%; transform: translate(-50%, -50%); text-align: center;
  pointer-events: none; z-index: 6500; }
#arena-count.hidden { display: none; }
#arena-count .ar-bmode { font-size: 11px; line-height: 12px; color: var(--gold); text-shadow: 2px 2px 0 #000; }
#arena-count .ar-bwait { margin-top: 2px; padding: 2px 8px; font-size: 8px; line-height: 10px; color: #f4efe2;
  background: rgba(14, 11, 9, .78); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze); }
#arena-count .ar-bsub { font-size: 9px; line-height: 10px; color: #f3e6c4; text-shadow: 1px 1px 0 #000; }
#arena-count .ar-bnum { font-size: 30px; line-height: 30px; color: var(--gold); text-shadow: 2px 2px 0 #000, 0 0 6px rgba(242, 196, 90, .45);
  animation: ar-pop .32s ease-out; }
#arena-count .ar-bgo { font-size: 24px; line-height: 26px; color: #ffd85c; letter-spacing: 1px;
  text-shadow: 2px 2px 0 #000, 0 0 8px rgba(255, 160, 40, .6); animation: ar-pop .28s ease-out; }
@keyframes ar-pop { from { transform: scale(1.45); opacity: .4; } to { transform: scale(1); opacity: 1; } }

/* Winner summary popup */
#arena-result { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); width: min(260px, calc(100% - 8px));
  padding: 6px 8px 7px; z-index: 7000; display: flex; flex-direction: column; gap: 3px; }
#arena-result.hidden { display: none; }
#arena-result .ar-res-title { text-align: center; font-size: 11px; line-height: 12px; text-shadow: var(--ol); overflow-wrap: anywhere; }
#arena-result .ar-res-win { text-align: center; font-size: 8px; line-height: 9px; color: #fff3d1; overflow-wrap: anywhere; }
#arena-result .ar-res-sub { text-align: center; font-size: 7px; line-height: 8px; overflow-wrap: anywhere; }
#arena-result .ar-res-teams { display: flex; flex-direction: column; gap: 3px; margin: 2px 0; }
#arena-result .ar-res-team { padding: 3px 4px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px #2e251c; }
#arena-result .ar-res-team.won { background: rgba(58, 44, 18, .35); box-shadow: inset 0 0 0 1px var(--gold-d); }
#arena-result .ar-rt-head { display: flex; justify-content: space-between; gap: 4px; font-size: 6px; line-height: 8px; flex-wrap: wrap;
  margin-bottom: 1px; border-bottom: 1px solid rgba(90, 72, 52, .35); padding-bottom: 1px; }
#arena-result .ar-rt-row { display: flex; align-items: center; gap: 4px; padding: 1px 0; font-size: 7px; line-height: 8px; }
#arena-result .ar-rt-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#arena-result .ar-rt-name { overflow-wrap: anywhere; }
#arena-result .ar-rt-lv { font-size: 6px; line-height: 7px; overflow-wrap: anywhere; }
#arena-result .ar-rt-stat { flex: none; text-align: right; color: var(--text); white-space: nowrap; }
#arena-result .ar-res-wait { text-align: center; font-size: 7px; line-height: 8px; overflow-wrap: anywhere; }
#arena-result .ar-res-btns { display: flex; justify-content: center; margin-top: 2px; }
#arena-result .ar-res-btns .btn { min-width: 72px; }
