/* NOMAD 3.43 Statistics-only layout fixes.
   Statistics uses ONE navigation DOM. The same nav is fixed to the bottom on
   mobile/touch and sits in the header on a clearly desktop viewport. */

body[data-page="statistics"] .public-stat-table th{
  position:static;
  top:auto;
}

body[data-page="statistics"] .shell{
  padding-bottom:calc(76px + env(safe-area-inset-bottom));
}

body[data-page="statistics"] .stat-kpi-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
}

body[data-page="statistics"] .statistics-nav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:2147483000;
  min-height:56px;
  padding-bottom:env(safe-area-inset-bottom);
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  background:#142019;
  border-top:1px solid var(--line);
}

body[data-page="statistics"] .statistics-nav a{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#aeb9b1;
  font-size:10px;
  font-weight:900;
  white-space:nowrap;
  border-top:2px solid transparent;
}

body[data-page="statistics"] .statistics-nav a.active{
  color:#fff;
  background:#1b3021;
  border-top-color:var(--yellow);
}

@media(max-width:760px){
  body[data-page="statistics"] .stat-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Only a clearly desktop browser moves the SAME nav into the header. */
@media (min-width:1101px) and (hover:hover) and (pointer:fine){
  body[data-page="statistics"] .shell{
    padding-bottom:72px;
  }

  body[data-page="statistics"] .statistics-nav{
    position:static;
    left:auto;
    right:auto;
    bottom:auto;
    z-index:auto;
    min-height:0;
    height:58px;
    margin-left:auto;
    padding-bottom:0;
    display:flex;
    align-items:stretch;
    background:transparent;
    border-top:0;
  }

  body[data-page="statistics"] .statistics-nav a{
    padding:0 15px;
    color:#c8d1ca;
    font-size:12px;
    border-top:0;
    border-bottom:3px solid transparent;
  }

  body[data-page="statistics"] .statistics-nav a:hover{
    background:rgba(255,255,255,.035);
    color:#fff;
  }

  body[data-page="statistics"] .statistics-nav a.active{
    color:#fff;
    background:transparent;
    border-bottom-color:var(--yellow);
  }
}
