/* Evoker Web - League screen after the 1.7.4 client: comp_league_top_bar (ligaboard_top_bg, tier-coloured title,
   liga_timer_bg countdown, info button), comp_league_list_entry rows on ligaboard_player_bg (gold variant for the
   own row) laid out from comp_league_list_entry_layout (320-pt layout x 2.25), the info view (ctrl_league_info:
   RULES / PRIZES on ligaboard_top_bg, tables in small_yellow frames) and the enter / finish popups. */

.screen[data-screen="league"] {
  background: #120c08 url('/assets/orig/ui/fullscreen_background.png') center / 125% auto no-repeat; /* ctrlLeague.background, imgxscale 1.25 */
}

/* ---------- list view ---------- */
.league-screen { display: flex; flex-direction: column; overflow: hidden; }

/* comp_league_top_bar_layout: background y -6, title y -16 (26 pt bold, black shadow), timer plate y +7, info x +137 */
.league-top {
  position: relative; flex: none; height: 128px;
  background: url('/assets/orig/ui/ligaboard_top_bg.png') center / 900px 117px no-repeat;
}
.league-title {
  position: absolute; left: 90px; right: 90px; top: 8px;
  text-align: center; font-size: 56px; line-height: 64px; font-weight: var(--fw-bold);
  color: var(--tier-bronze); text-shadow: 3px 3px 0 #000;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.league-timer-plate {
  position: absolute; left: 50%; top: 76px; transform: translateX(-50%);
  width: 172px; height: 36px;
  background: url('/assets/orig/ui/liga_timer_bg.png') center / 100% 100% no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.league-timer { font-size: 22px; font-weight: var(--fw-bold); color: #fff; letter-spacing: .02em; }
.league-info-btn.btn-icon { position: absolute; right: 22px; top: 22px; width: 64px; height: 64px; margin: 0; }
.league-info-btn.btn-icon img { width: 56%; height: 56%; }

.league-list {
  flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 4px; padding: 6px 0 16px;
}
.league-list .event-banner { flex: none; margin: 4px 18px 6px; }
.league-empty { padding: 40px; text-align: center; color: var(--muted); font-size: 26px; }

/* comp_league_list_entry_layout (centre-relative pt): rank x -134, picture x -95 41x41 (frame 43), name x 26 y -16
   w 180 left-aligned, pvp_points x -49 y 7, points x -3 w 60, prize one x 29 / 50, prize two x 68 / 90, single
   prize x 43 / 80, fight button x 128. */
.league-row {
  position: relative; flex: none; width: 716px; height: 124px; margin: 0 auto;
  background: url('/assets/orig/ui/ligaboard_player_bg.png') center / 100% 100% no-repeat;
}
.league-row.me { background-image: url('/assets/orig/ui/ligaboard_player_bg_gold.png'); }
.league-rank {
  position: absolute; left: 18px; top: 0; width: 80px; height: 124px;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; font-weight: var(--fw-bold); color: #fff; text-shadow: 2px 2px 0 #000;
}
.league-rank.top { color: #fed00f; }
.league-pic-frame {
  position: absolute; left: 96px; top: 13px; width: 98px; height: 98px; cursor: pointer;
  border: 6px solid transparent; border-image: url('/assets/orig/ui/frames/small_white.png') 12 / 6px stretch;
  background: #0a0b0c; background-clip: padding-box;
}
.league-row.me .league-pic-frame { cursor: default; }
.league-pic-frame .portrait, .league-pic-frame .portrait.small { width: 100%; height: 100%; border: 0; border-image: none; background: #0a0b0c; }
.league-pic-frame .portrait.default img { object-fit: cover; }
.league-name {
  position: absolute; left: 216px; top: 6px; width: 405px; height: 50px; line-height: 50px;
  font-size: 30px; font-weight: var(--fw-bold); color: var(--gold); text-shadow: 1px 1px 0 #000;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.league-row.me .league-name { color: #fed00f; }
.league-points {
  position: absolute; left: 222px; top: 56px; height: 54px;
  display: flex; align-items: center; gap: 12px;
  font-size: 32px; font-weight: var(--fw-bold); color: #fff; text-shadow: 1px 1px 0 #000;
}
.league-points-icon { width: 50px; height: 50px; }
/* the inset box of ligaboard_player_bg spans x 345..523 / y 40..88 of 638 x 110 */
.league-prize {
  position: absolute; left: 389px; top: 45px; width: 201px; height: 54px;
  display: flex; align-items: center; justify-content: space-around; padding: 0 6px;
}
.league-prize.single { justify-content: center; gap: 12px; }
.league-prize-item { display: inline-flex; align-items: center; gap: 2px; }
.league-prize-icon { width: 46px; height: 46px; object-fit: contain; }
.league-prize-item.card .league-prize-icon { width: 54px; height: 54px; margin: -4px -4px; }
.league-prize-item.gems .league-prize-icon { width: 56px; height: 56px; margin: -5px -4px; }
.league-prize-amount { font-size: 24px; font-weight: var(--fw-bold); color: #fff; text-shadow: 1px 1px 0 #000; }
.league-fight-btn.btn-icon { position: absolute; left: 604px; top: 18px; width: 88px; height: 88px; margin: 0; }
.league-fight-btn.btn-icon img { width: 74%; height: 74%; }
.league-fight-btn.locked { filter: saturate(.25) brightness(.8); }
.league-fight-btn:disabled { opacity: 1; filter: saturate(.25) brightness(.8); cursor: default; }

/* ---------- info view (ctrl_league_info) ---------- */
.league-info-screen { padding: 4px 0 24px; }
.league-info { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.league-info-headline {
  width: 100%; height: 117px; flex: none;
  background: url('/assets/orig/ui/ligaboard_top_bg.png') center / 900px 117px no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.league-info-headline span { font-size: 54px; font-weight: var(--fw-bold); color: #ffcf35; text-shadow: 3px 3px 0 #000; letter-spacing: .02em; }
.league-info-frame {
  width: 680px; padding: 14px 22px;
  border: 14px solid transparent;
  border-image: url('/assets/orig/ui/frames/small_yellow.png') 12 fill / 14px stretch;
  background: rgba(16, 15, 13, .92); background-clip: padding-box;
  font-size: 25px; line-height: 1.38; font-weight: var(--fw-bold); color: #fff; text-align: left;
}
.league-info-league { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.league-info-subhead {
  width: 680px; height: 72px; display: flex; align-items: center; justify-content: center;
  background: url('/assets/orig/ui/header_framer_big.png') center / 100% 100% no-repeat;
}
.league-info-subhead span { font-size: 38px; font-weight: var(--fw-bold); text-shadow: 2px 2px 0 #000; }
.league-info-row { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; font-size: 23px; line-height: 1.6; }
.league-info-rank { color: #fff; }

/* ---------- enter / finish popups (comp_league_enter_popup / comp_league_finish_popup) ---------- */
.dialog-league-enter, .dialog-league-finish { width: 640px; }
.dialog-league-enter .dialog-title, .dialog-league-finish .dialog-title {
  font-size: 46px; letter-spacing: .02em; color: #fff; text-shadow: 3px 3px 0 #000;
  border-image-source: url('/assets/orig/ui/ornament_top.png'); border-image-slice: 40 60 fill; border-width: 22px 30px;
}
.dialog-league-enter.tier-silver .dialog-title, .dialog-league-finish.tier-silver .dialog-title { filter: grayscale(.9) brightness(1.2); }
.dialog-league-enter.tier-gold .dialog-title, .dialog-league-finish.tier-gold .dialog-title { filter: saturate(1.3) hue-rotate(12deg) brightness(1.1); }
.league-popup { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 6px 14px; }
.league-popup p { margin: 0; font-size: 26px; line-height: 1.3; }
.league-popup-headline { font-size: 32px; }
.league-popup-passed { font-size: 32px; margin-top: -6px; }
.league-popup-rank { font-size: 46px; margin: 6px 0 4px; }
.league-popup-rewards { display: flex; gap: 22px; justify-content: center; margin: 4px 0 10px; }
.league-popup-rewards .league-prize-icon { width: 76px; height: 76px; }
.league-popup-rewards .league-prize-item.card .league-prize-icon, .league-popup-rewards .league-prize-item.gems .league-prize-icon { width: 92px; height: 92px; margin: -8px; }
.league-popup-rewards .league-prize-amount { font-size: 32px; color: #ffcf35; }
.league-popup-next-label { margin-top: 26px; font-size: 26px; }
.league-popup-next { font-size: 42px; text-shadow: 2px 2px 0 #000; }
