/* The Rankings window, the Arena window, the Mail window and the HUD's Arena button (Work-ID 20261015-rankings-arena-menu-fe58; zenux on Trello "Cidades", 2026-10-15).
 *
 * Layout of containers and paint only. Every control here is authored with a fixed box (the tabs have an explicit height, the chips and the small buttons keep their own
 * padding) and no hover / focus / pressed / selected rule touches a size, a margin, a border width, a transform or a transition (Docs/UI_HOVER_GEOMETRY_POLICY.md,
 * checked by Tests/check_hover_geometry.mjs and Tests/check_rankings.mjs). The windows reuse the red-black UV frames of the ranking window (.ai-kpis, .ai-tabs, .ai-row).
 * Red and gold accents are paint (colour, background colour, inset shadow). */

/* ---- HUD: ten equal columns (the Arena button is the ninth, the Correio the tenth: Work-ID 20261020-correio-4154) ------------------------------------------------------------------------------- */
#game .premium-topbar>.hud-global-nav{grid-template-columns:repeat(10,minmax(0,1fr))!important}
body:not(.mobile-web) #game .premium-topbar>.hud-global-nav{grid-template-columns:repeat(10,minmax(0,1fr))!important}
/* The Arena button: crossed swords, a crimson plate and a gold label at rest, brighter under the pointer (paint only). */
#game .premium-topbar #hud-arena-button .hud-nav-icon{--shutdown-icon-url:url("../arena/crossed-swords.svg?v=1")}
/* The CORREIO button: the envelope of the icon set (Work-ID 20261020-correio-4154). */
#game .premium-topbar #hud-mail-button .hud-nav-icon{--shutdown-icon-url:url("../GameIcon/icons/envelope.png?v=10")}
#game .premium-topbar #hud-arena-button::after{background-color:#21293d!important;border-image-source:url("../login/button-active.png?v=cabare-uv-1")!important}
#game .premium-topbar #hud-arena-button>span:last-child{color:#ffd98a!important}
#game .premium-topbar #hud-arena-button:is(:hover:not(:disabled),:focus-visible,.pad-focus)::after{background-color:#2c3752!important}
/* Mail waiting: a small red badge over the MENU button's corner. Absolutely positioned and inserted before the label: the button keeps its authored box. */
#game .premium-topbar :is(#hud-menu-button,#hud-mail-button) .hud-mail-badge{position:absolute;top:2px;right:3px;z-index:2;box-sizing:border-box;min-width:14px;height:14px;padding:0 3px;border-radius:7px;background:#c56257;color:#fff;font:700 9px/14px Arial,sans-serif;text-align:center;pointer-events:none;box-shadow:0 0 0 1px #1a2337}

/* ---- Main Menu: ARENA PVP is highlighted ------------------------------------------------------------------------------------------------------------------ */
#modal[data-view="menu"] .main-menu-entry.accent{background-color:#21293d!important}
#modal[data-view="menu"] .main-menu-entry.accent .main-menu-label{color:#ffd98a!important}
#modal[data-view="menu"] .main-menu-entry.accent .main-menu-art-icon{filter:none!important}
#modal[data-view="menu"] .main-menu-entry.accent:is(.selected,:hover:not(:disabled),:focus-visible){background-color:#2c3752!important}

/* ---- Rankings: header, five categories, the small AI activity button ----------------------------------------------------------------------------------- */
#modal[data-view="ai"] .rk-window,#modal[data-view="ai"] .arena-panel{display:grid;gap:.7rem;min-width:0}
.rk-top{display:grid;gap:.3rem}
.rk-head{grid-template-columns:minmax(0,.8fr) minmax(0,1.1fr) minmax(0,1.5fr);margin:0}
.rk-stat span{display:block;color:var(--muted,#9fb0bf);font-size:.58rem;letter-spacing:.08em}
.rk-stat strong{display:block;margin-top:.3rem;font-size:1.05rem;font-variant-numeric:tabular-nums}
.rk-stat .season-strip{margin:.3rem 0 0;padding:0;font-size:.8rem}
.rk-note{margin:0;padding:0 .2rem;color:var(--muted,#9fb0bf);font-size:.68rem}
.rk-navrow{display:flex;align-items:stretch;gap:.5rem;min-width:0}
#modal .rk-nav,#modal .arena-nav{flex:1 1 auto;flex-wrap:nowrap;min-width:0;margin:0}
#modal[data-view="ai"] .rk-nav>button,#modal[data-view="ai"] .arena-nav>button{flex:1 1 0;min-width:0;height:2.7rem;padding-block:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rk-aux{flex:0 0 auto;box-sizing:border-box;width:10.6rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rk-aux.selected{box-shadow:inset 0 0 0 2px var(--gold,#f0c64a)}
.rk-sub{margin:0}
.rk-body{min-width:0}
.rk-body .ladder-row small{display:block;margin-top:.15rem}
.rk-body .ai-list{max-height:min(48vh,28rem)}
.rk-quiet{margin:.4rem 0;padding:0 .2rem;color:var(--muted,#9fb0bf);font-size:.74rem;text-align:center}
#modal[data-view="ai"] .empty-state.compact{min-height:0!important;padding:.6rem .8rem!important;font-size:.76rem}
/* The type chips and the Overall chip share one row. */
.rk-sub .season-type{flex:0 0 auto}

/* ---- Arena window: a framed header, five steps, one step at a time ------------------------------------------------------------------------------------- */
.arena-head.ai-kpis{grid-template-columns:repeat(5,minmax(0,1fr));margin:0}
.arena-head.ai-kpis>div{padding:.6rem .7rem;box-shadow:none}
.arena-flow{margin:0;padding:0 .2rem;color:var(--muted,#9fb0bf);font-size:.72rem}
.arena-step{display:grid;gap:.8rem;min-width:0}
.arena-step .arena-section{margin:0}

/* ---- Small windows ---------------------------------------------------------------------------------------------------------------------------------------- */
@media(max-width:650px){
 .rk-head{grid-template-columns:minmax(0,.8fr) minmax(0,1.1fr) minmax(0,1.5fr)}
 #modal[data-view="ai"] .rk-head>div{padding:.3rem .45rem}
 .rk-stat strong{font-size:.9rem}
 .rk-stat .season-strip{font-size:.7rem}
 .rk-navrow{flex-wrap:wrap}
 #modal .rk-nav{flex:1 1 100%}
 .rk-aux{width:100%}
 #modal[data-view="ai"] .rk-nav>button,#modal[data-view="ai"] .arena-nav>button{height:2.4rem;padding-inline:.15rem;font-size:.6rem}
 .arena-head.ai-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
 #modal[data-view="ai"] .arena-head.ai-kpis>div{padding:.3rem .45rem}
 .arena-kpi strong{font-size:.85rem}
 .arena-kpi span{font-size:.5rem}
}
