/*
============================================================
SVS ERP — F15.22.13
COMMAND CENTER TEAM LOAD FINAL FIX

Only Team Load is touched:
- guaranteed visible title + subtitle using card pseudo-header
- exact raw LIGHT suppression
- wider worker-name area
- attendance badge kept
- open count kept
- no changes to Pulse / Alerts / leaderboards / activity
============================================================
*/

/* ------------------------------------------------------------
   TEAM LOAD HEADER — stop depending on flaky legacy label rendering
   ------------------------------------------------------------ */

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card{
  position:relative!important;
  padding-top:44px!important;
}

/* Hide legacy label completely so we don't get faint/double text. */
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-section-label{
  display:none!important;
}

/* Guaranteed visual title */
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card::before{
  content:"Team Load & Next Assignment"!important;
  position:absolute!important;
  left:12px!important;
  top:10px!important;
  display:block!important;
  color:#12324d!important;
  font-size:13px!important;
  line-height:1.15!important;
  font-weight:900!important;
  letter-spacing:-.01em!important;
}

/* Guaranteed visual subtitle */
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card::after{
  content:"Eligible and available for new handoff."!important;
  position:absolute!important;
  left:12px!important;
  top:27px!important;
  display:block!important;
  color:#6f8598!important;
  font-size:6.5px!important;
  line-height:1.15!important;
  font-weight:500!important;
}

/* ------------------------------------------------------------
   TEAM LOAD WORKER HEADER
   ------------------------------------------------------------ */

/* Give name maximum room, attendance only what it needs. */
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) max-content!important;
  align-items:center!important;
  gap:4px!important;
  width:100%!important;
  height:20px!important;
  min-height:20px!important;
  margin:0 0 8px!important;

  /* Suppresses raw text nodes such as LIGHT. */
  font-size:0!important;
  line-height:0!important;
  color:transparent!important;
  text-shadow:none!important;
}

/* Restore only worker name. */
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-head>strong{
  display:block!important;
  min-width:0!important;
  width:100%!important;
  max-width:none!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#38556c!important;
  font-size:8.5px!important;
  line-height:1!important;
  font-weight:850!important;
}

/* Restore only attendance state. */
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-head .attendance-tag{
  display:inline-flex!important;
  align-items:center!important;
  justify-self:end!important;
  max-width:82px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#557085!important;
  font-size:4.7px!important;
  line-height:1!important;
}

/* Everything else in worker header is visual noise. */
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-head>span:not(.attendance-tag),
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-head>small,
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-head>em,
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-head>label,
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-role-badge{
  display:none!important;
}

/* ------------------------------------------------------------
   CARD DENSITY
   ------------------------------------------------------------ */

html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-recommended{
  margin-top:0!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,72px)!important;
  grid-auto-rows:72px!important;
  gap:7px!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-card{
  height:72px!important;
  min-height:72px!important;
  max-height:72px!important;
  padding:9px 10px!important;
  overflow:hidden!important;
  font-size:0!important;
}

/* Keep OPEN as the only numeric worker detail. */
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-card>strong{
  display:inline-block!important;
  color:#667e91!important;
  font-size:19px!important;
  line-height:1!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-card>strong::after{
  content:"  OPEN"!important;
  color:#8194a4!important;
  font-size:5px!important;
  font-weight:850!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-mini,
html body:not(.dark) #page-command-center.ccx-layout-live
.ccx-team-card .command-cfpb-load-card>small{
  display:none!important;
}

/* Let Team Load breathe without touching sibling cards. */
@media(min-width:1281px){
  html body:not(.dark) #page-command-center.ccx-layout-live
  .ccx-team-card{
    min-height:224px!important;
    height:224px!important;
    max-height:224px!important;
  }
}
