/* 17 October 2026 — focused corrections for the statistics sections.
   No template data, filter behaviour, monitoring or chat changes. */

/* HITMAPS: the search icon is inside its own submit button, unlike frag/match stats.
   Keep the button fully inside the search field and prevent the icon and placeholder overlapping. */
html body .wapper .content .hitmap-stats-card .stats-search-control {
  position:relative!important;
}
html body .wapper .content .hitmap-stats-card .stats-search-control > .hitmap-search-submit {
  position:absolute!important;
  inset:0 auto 0 0!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  width:46px!important;
  min-width:46px!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  z-index:2!important;
}
html body .wapper .content .hitmap-stats-card .stats-search-control > .hitmap-search-submit > .fa-search {
  position:static!important;
  display:block!important;
  flex:none!important;
  inset:auto!important;
  transform:none!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
  font-size:15px!important;
  pointer-events:none!important;
}
html body .wapper .content .hitmap-stats-card .stats-search-control > input {
  box-sizing:border-box!important;
  padding-left:52px!important;
  text-indent:0!important;
}

/* DESKTOP match statistics: statistic types come before general navigation and online users.
   site.css deliberately reversed these two blocks, so restore consistent statistics ordering. */
@media(min-width:992px) {
  html body .wapper .content .automix-stat-sidebar > .automix-stat-nav {order:0!important}
  html body .wapper .content .automix-stat-sidebar > .automix-main-nav {order:1!important}
  html body .wapper .content .automix-stat-sidebar > .automix-online {order:2!important}
}

/* MOBILE match statistics only. The other pages (incl. match history) retain their titles. */
@media(max-width:650px) {
  /* Title and count in opposing corners; admin action shares the compact second row. */
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content > .am-native-title:has(>.am-heading-total) {
    display:grid!important;
    grid-template-columns:20px minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    grid-auto-rows:auto!important;
    gap:5px 8px!important;
    align-items:center!important;
    min-height:0!important;
    height:auto!important;
    padding:11px 13px!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content > .am-native-title > .am-heading-icon {
    grid-column:1!important;
    grid-row:1!important;
    position:static!important;
    font-size:17px!important;
    line-height:1!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content > .am-native-title > .am-heading-label {
    grid-column:2 / 4!important;
    grid-row:1!important;
    font-size:17px!important;
    line-height:1.25!important;
    min-width:0!important;
    margin:0!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content > .am-native-title > .am-heading-total {
    grid-column:3!important;
    grid-row:2!important;
    justify-self:end!important;
    align-self:center!important;
    position:static!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    left:auto!important;
    white-space:nowrap!important;
    text-align:right!important;
    font-size:11px!important;
    line-height:1.25!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content > .am-native-title > .am-heading-total :is(strong,b) {
    font-size:inherit!important;
    line-height:inherit!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content > .am-native-title > .am-heading-action {
    grid-column:1 / 3!important;
    grid-row:2!important;
    justify-self:start!important;
    align-self:center!important;
    box-sizing:border-box!important;
    min-height:29px!important;
    width:auto!important;
    max-width:100%!important;
    margin:0!important;
    padding:5px 8px!important;
    white-space:nowrap!important;
    font-size:10px!important;
    line-height:1.2!important;
  }
  /* Four monthly-result tiles: still 2x2, but less vertical padding and smaller figures. */
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content .am-board {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    margin:8px 0 15px!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content .am-board > article {
    grid-template-rows:minmax(25px,auto) minmax(18px,auto) auto!important;
    gap:2px!important;
    min-height:0!important;
    padding:7px 8px!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content .am-board small {
    align-items:flex-start!important;
    min-height:0!important;
    margin:0!important;
    padding:0 0 4px!important;
    font-size:11px!important;
    line-height:1.22!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content .am-board .am-board-player {
    min-height:18px!important;
    margin:0!important;
    font-size:12px!important;
    line-height:1.2!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content .am-board .am-board-value {
    font-size:20px!important;
    line-height:1.08!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content .am-board .am-board-total .am-board-value {
    font-size:29px!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content .am-section-title {
    font-size:17px!important;
    line-height:1.3!important;
    margin:0 0 10px!important;
    padding-bottom:8px!important;
  }
}
/* Extremely narrow phones: keep complete, readable text without collisions. */
@media(max-width:340px) {
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content > .am-native-title:has(>.am-heading-total) {
    grid-template-columns:20px minmax(0,1fr)!important;
    gap:5px 7px!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content > .am-native-title > .am-heading-label {grid-column:2!important}
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content > .am-native-title > .am-heading-total {
    grid-column:1 / -1!important;
    grid-row:2!important;
    white-space:normal!important;
  }
  html.am-mobile-layout body .wapper .content .automix-stat-content #am-content > .am-native-title > .am-heading-action {
    grid-column:1 / -1!important;
    grid-row:3!important;
    justify-self:end!important;
  }
}
