/* GX Tracking v0.10.76 | No title/ID row, no map-expand icon in sheet.
   Back + 4 original functional actions stay in one compact row. Mobile only. */
@media (max-width:850px) {
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions #sidebar.gx64-sheet { gap:0!important; }
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions #sidebar.gx64-sheet #gx64SheetHead {
    display:none!important;
    height:0!important;min-height:0!important;max-height:0!important;
    flex:0 0 0!important;margin:0!important;padding:0!important;
    border:0!important;overflow:hidden!important;
  }
  /* Do not display the obsolete expand/map icon; it is a descendant of the
     now-hidden header and has no independent layout footprint. */
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions #sidebar.gx64-sheet #gx64Expand {display:none!important}
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions #sidebar.gx64-sheet #gx64Actions {
    display:grid!important;
    grid-template-columns:36px repeat(4,minmax(0,1fr))!important;
    align-items:stretch!important;
    gap:4px!important;
    width:auto!important;max-width:none!important;
    margin:1px 10px 6px!important;
    padding:0!important;
    flex:0 0 auto!important;
    min-height:39px!important;
  }
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions #sidebar.gx64-sheet #gx64Actions > button {
    box-sizing:border-box!important;
    min-width:0!important;
    width:100%!important;
    min-height:39px!important;
    padding:5px 2px!important;
    margin:0!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    gap:3px!important;white-space:nowrap!important;
    font-size:clamp(8.5px,2.6vw,10.5px)!important;
    letter-spacing:-.012em!important;
  }
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions #sidebar.gx64-sheet #gx64Actions > button svg {
    width:clamp(12px,3.7vw,16px)!important;
    height:clamp(12px,3.7vw,16px)!important;
    flex:0 0 auto!important;
  }
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions #sidebar.gx64-sheet #gx64Actions #gx64Back {
    grid-column:1!important;grid-row:1!important;
    display:grid!important;place-items:center!important;
    width:36px!important;height:auto!important;min-height:39px!important;
    visibility:visible!important;
    padding:7px!important;margin:0!important;
    border-radius:10px!important;
    box-shadow:none!important;
    background:var(--panel-soft,#1b2b3e)!important;
    border:1px solid var(--line,#32455c)!important;
    color:var(--text,#eef5ff)!important;
  }
  /* Fleet has no device to go back from. Keep the existing three fleet actions. */
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions:not(.gx64-selected) #sidebar.gx64-sheet #gx64Actions,
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions[data-gx64-view="fleet"] #sidebar.gx64-sheet #gx64Actions {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions:not(.gx64-selected) #sidebar.gx64-sheet #gx64Actions #gx64Back,
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions[data-gx64-view="fleet"] #sidebar.gx64-sheet #gx64Actions #gx64Back {
    display:none!important;
  }
  /* The old native shell hides Details in fleet. Our layout overrides generic
     button display, so explicitly retain that semantic behavior. */
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions:not(.gx64-selected) #sidebar.gx64-sheet #gx64Actions > button[data-gx64-action="detail"],
  html body.tracking-dashboard.gx64-mobile.gx76-compact-actions[data-gx64-view="fleet"] #sidebar.gx64-sheet #gx64Actions > button[data-gx64-action="detail"] {
    display:none!important;
  }
  @media(max-width:360px) {
    html body.tracking-dashboard.gx64-mobile.gx76-compact-actions.gx64-selected:not([data-gx64-view="fleet"]) #sidebar.gx64-sheet #gx64Actions {
      grid-template-columns:32px repeat(4,minmax(0,1fr))!important;
      margin-left:6px!important;margin-right:6px!important;gap:3px!important;
    }
    html body.tracking-dashboard.gx64-mobile.gx76-compact-actions #sidebar.gx64-sheet #gx64Actions #gx64Back {
      width:32px!important;padding:5px!important;
    }
    html body.tracking-dashboard.gx64-mobile.gx76-compact-actions #sidebar.gx64-sheet #gx64Actions > button {
      gap:2px!important;padding-left:0!important;padding-right:0!important;
      font-size:clamp(8px,2.58vw,9px)!important;
      letter-spacing:-.025em!important;
    }
    html body.tracking-dashboard.gx64-mobile.gx76-compact-actions #sidebar.gx64-sheet #gx64Actions > button svg {
      width:11px!important;height:11px!important;
    }
  }
}
