/* Handball Tracker Cloud v1.28 revision 10
   Production fixes for phone lineups, collapsed Old Games, page scroll reset,
   and stable desktop action menus. */

/* The card is structurally present in the live tracker. CSS, not a fragile
   runtime insertion, controls whether it is shown on compact/touch devices. */
body.v128r10-ui .r10-active-players{display:none}
@media (max-width:1100px){
  body.v128r10-ui #trackPage.active #gamePanel:not(.hidden) .r10-active-players{display:block!important}
}
body.v128r10-ui.v128r10-touch #trackPage.active #gamePanel:not(.hidden) .r10-active-players{display:block!important}

body.v128r10-ui .r10-active-players{
  width:100%;margin:0 0 8px;padding:9px;border:1px solid #2b5871;border-radius:10px;
  background:linear-gradient(145deg,#0a2235,#061522);box-shadow:0 10px 24px rgba(0,0,0,.24)
}
body.v128r10-ui .r10-active-players-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
body.v128r10-ui .r10-active-players-head>div{display:flex;min-width:0;flex-direction:column}
body.v128r10-ui .r10-active-players-head strong{color:#f4f9fb;font-size:12px;line-height:1.1;letter-spacing:.045em;text-transform:uppercase}
body.v128r10-ui .r10-active-players-head span{margin-top:2px;color:#8eabba;font-size:9px}
body.v128r10-ui #r10FullLineupsBtn{flex:0 0 auto;min-height:30px!important;padding:4px 9px!important;border:1px solid #315c73!important;border-radius:7px!important;background:#0b2a3e!important;color:#d3e2e9!important;font-size:9px!important}
body.v128r10-ui .r10-lineup-switch-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.72fr);gap:5px;margin-bottom:7px}
body.v128r10-ui .r10-lineup-switch{display:grid;grid-template-columns:1fr 1fr;gap:2px;padding:2px;border:1px solid #1d4259;border-radius:8px;background:#03111c}
body.v128r10-ui .r10-lineup-switch button{min-width:0!important;min-height:29px!important;padding:3px 5px!important;border:0!important;border-radius:6px!important;background:transparent!important;color:#8ea6b6!important;box-shadow:none!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px!important}
body.v128r10-ui .r10-lineup-switch button.active{background:#285f39!important;color:#f4fff6!important;font-weight:850!important}
body.v128r10-ui #r10PhaseSwitch button.active{background:#174665!important;color:#f3fbff!important}
body.v128r10-ui .r10-lineup-switch button:disabled{opacity:.35}
body.v128r10-ui .r10-player-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}
body.v128r10-ui .r10-player-shirt{display:flex!important;min-width:0!important;min-height:51px!important;padding:4px 2px!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;border:1px solid #2e5d75!important;border-top:3px solid #59d26b!important;border-radius:8px!important;background:#0a2639!important;color:#fff!important;box-shadow:none!important}
body.v128r10-ui .r10-player-shirt span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8da9ba;font-size:7px;font-weight:800;text-transform:uppercase}
body.v128r10-ui .r10-player-shirt strong{color:#fff;font-size:19px;line-height:1;font-weight:900}
body.v128r10-ui .r10-player-shirt.empty{border-top-color:#718493!important;opacity:.62}
body.v128r10-ui #trackingInputCard>#stepTitle{margin-top:5px!important}

@media(max-width:390px){
  body.v128r10-ui .r10-player-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.v128r10-ui .r10-player-shirt{min-height:45px!important}
  body.v128r10-ui .r10-lineup-switch-row{grid-template-columns:1fr}
}

/* Prevent browser scroll anchoring from carrying the old page position into a
   newly activated workspace. */
html.v128r10-resetting-scroll,html.v128r10-resetting-scroll body{scroll-behavior:auto!important;overflow-anchor:none!important}
body.v128r10-ui .page{overflow-anchor:none}

/* Desktop action menu lives at viewport level, outside folder overflow and
   stacking contexts. */
body.v128r10-ui .r10-desktop-menu-overlay{
  position:fixed!important;z-index:50000!important;display:grid;gap:3px;min-width:220px;max-width:calc(100vw - 16px);
  padding:7px;border:1px solid #31536a;border-radius:11px;background:#071a29;box-shadow:0 20px 55px rgba(0,0,0,.56)
}
body.v128r10-ui .r10-desktop-menu-overlay.hidden{display:none!important}
body.v128r10-ui .r10-desktop-menu-overlay button{width:100%;min-height:38px;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:#dce9ef;text-align:left;font-size:12px;font-weight:700;box-shadow:none}
body.v128r10-ui .r10-desktop-menu-overlay button:hover{background:#12344a}
body.v128r10-ui .r10-desktop-menu-overlay .danger-text{color:#ff7777!important}

/* The source menus stay hidden on desktop; the viewport overlay is the only
   visible menu. Mobile keeps the existing bottom-sheet behavior. */
@media(min-width:761px){
  body.v128r10-ui .game-menu,body.v128r10-ui .folder-action-menu{z-index:1}
}
