
.staley-league-table{
  width:100%;
  border:1px solid #ddd;
  background:#fff;
  font-family:"Pro Sans","Arial","Helvetica",sans-serif;
  box-sizing:border-box;
}
.staley-league-table-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  padding:16px 18px;
  border-bottom:1px solid #ddd;
}
.staley-league-table-head h3{
  margin:0;
  color:#111;
  font-size:24px;
  line-height:1.1;
  font-weight:800;
  text-transform:uppercase;
}
.staley-league-table-subtitle{
  margin-top:4px;
  color:#757575;
  font-size:14px;
  text-transform:uppercase;
}
.staley-league-table-updated{
  color:#888;
  font-size:12px;
  white-space:nowrap;
}
.staley-league-table-scroll{
  width:100%;
  overflow-x:auto;
}
.staley-league-table table{
  width:100%;
  min-width:980px;
  border-collapse:collapse;
}
.staley-league-table th,
.staley-league-table td{
  padding:11px 10px;
  border-right:1px solid #eee;
  border-bottom:1px solid #eee;
  text-align:center;
  white-space:nowrap;
}
.staley-league-table th:last-child,
.staley-league-table td:last-child{border-right:none}
.staley-league-table thead th{
  background:#111;
  color:#fff;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
}
.staley-league-table thead tr.subhead th{
  background:#222;
  padding-top:7px;
  padding-bottom:7px;
  font-size:11px;
}
.staley-league-table th:nth-child(2),
.staley-league-table td.team{text-align:left}
.staley-league-table td.rank{
  width:42px;
  color:#757575;
  font-weight:700;
}
.staley-league-table td.team{
  min-width:180px;
  font-weight:600;
}
.staley-league-table tbody td{
  color:#111;
  font-size:13px;
}
.staley-league-table tbody tr.is-staley td{
  background:#f1f8f3;
  font-weight:700;
}
@media(max-width:700px){
  .staley-league-table-head{
    align-items:flex-start;
    flex-direction:column;
    gap:6px;
    padding:14px;
  }
  .staley-league-table-head h3{font-size:21px}
  .staley-league-table th,.staley-league-table td{padding:9px 8px}
}


/* =========================================================
   1.9.25 - compact/homepage league table mode
   ========================================================= */

.staley-league-team-logo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  margin-right:9px;
  vertical-align:middle;
  flex:0 0 30px;
}

.staley-league-team-logo img{
  width:28px !important;
  height:28px !important;
  max-width:28px !important;
  max-height:28px !important;
  object-fit:contain;
}

.staley-league-table td.team{
  display:table-cell;
}

.staley-league-table td.team > span{
  vertical-align:middle;
}

.staley-league-table-compact{
  border-top:4px solid var(--staley-primary,#00853f);
}

.staley-league-table-compact .staley-league-table-head{
  padding:10px 14px;
  background:#111;
  color:#fff;
  border-bottom:none;
}

.staley-league-table-compact .staley-league-table-head h3{
  color:#fff;
  font-size:18px;
}

.staley-league-table-compact .staley-league-table-subtitle{
  display:none;
}

.staley-league-table-compact table{
  min-width:560px;
}

.staley-league-table-compact thead th{
  background:#fff;
  color:#222;
  border-bottom:1px solid #ddd;
  text-transform:none;
  font-size:13px;
}

.staley-league-table-compact tbody td{
  padding:10px 12px;
  font-size:14px;
}

.staley-league-table-compact td.team{
  min-width:230px;
}

.staley-league-table-compact tbody tr.is-staley td{
  background:#f1f8f3;
}

@media(max-width:700px){
  .staley-league-table-compact .staley-league-table-head{
    padding:9px 11px;
  }

  .staley-league-table-compact .staley-league-table-head h3{
    font-size:16px;
  }

  .staley-league-table-compact tbody td{
    padding:8px 9px;
    font-size:13px;
  }

  .staley-league-team-logo{
    width:26px;
    height:26px;
    margin-right:7px;
  }

  .staley-league-team-logo img{
    width:24px !important;
    height:24px !important;
    max-width:24px !important;
    max-height:24px !important;
  }
}


/* =========================================================
   1.9.27 - true mobile standings layouts
   ========================================================= */

@media(max-width:700px){

  /* Header stays clean and compact. */
  .staley-league-table{
    border-color:#ddd;
  }

  .staley-league-table-head{
    display:block;
    padding:14px 14px 12px;
  }

  .staley-league-table-head h3{
    font-size:20px;
    line-height:1.05;
  }

  .staley-league-table-subtitle{
    display:block;
    margin-top:4px;
    font-size:12px;
  }

  .staley-league-table-updated{
    display:block;
    margin-top:7px;
    font-size:11px;
  }

  .staley-league-table-scroll{
    overflow:visible;
  }

  /* ---------------- FULL VIEW ---------------- */

  .staley-league-table-full table{
    display:block;
    width:100%;
    min-width:0;
    border-collapse:separate;
  }

  .staley-league-table-full thead{
    display:none;
  }

  .staley-league-table-full tbody{
    display:block;
  }

  .staley-league-table-full tbody tr{
    display:grid;
    grid-template-columns:42px minmax(0,1fr);
    grid-template-areas:
      "rank team"
      "district district"
      "overall overall"
      "streak streak";
    width:100%;
    margin:0;
    padding:0;
    border-bottom:1px solid #e6e6e6;
    background:#fff;
  }

  .staley-league-table-full tbody tr.is-staley{
    background:#f1f8f3;
  }

  .staley-league-table-full tbody tr.is-staley td{
    background:transparent;
  }

  .staley-league-table-full tbody td{
    display:block;
    border:0;
    padding:0;
    white-space:normal;
    box-sizing:border-box;
  }

  .staley-league-table-full tbody td.rank{
    grid-area:rank;
    display:flex;
    align-items:center;
    justify-content:center;
    width:auto;
    min-height:58px;
    padding:10px 4px;
    border-right:1px solid #ececec;
    color:#757575;
    font-size:13px;
    font-weight:700;
  }

  .staley-league-table-full tbody td.team{
    grid-area:team;
    display:flex;
    align-items:center;
    min-width:0;
    min-height:58px;
    padding:10px 12px;
    font-size:14px;
    font-weight:700;
  }

  .staley-league-table-full tbody td.team .staley-league-team-logo{
    flex:0 0 28px;
    width:28px;
    height:28px;
    margin-right:9px;
  }

  .staley-league-table-full tbody td.team .staley-league-team-logo img{
    width:26px !important;
    height:26px !important;
    max-width:26px !important;
    max-height:26px !important;
  }

  /* Stat cells become compact labeled chips/rows. */
  .staley-league-table-full tbody td[data-label^="District"],
  .staley-league-table-full tbody td[data-label^="Overall"],
  .staley-league-table-full tbody td[data-label="Streak"]{
    display:inline-flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-width:0;
    padding:5px 11px;
    font-size:12px;
    color:#222;
  }

  .staley-league-table-full tbody td[data-label^="District"]::before,
  .staley-league-table-full tbody td[data-label^="Overall"]::before,
  .staley-league-table-full tbody td[data-label="Streak"]::before{
    content:attr(data-label);
    color:#777;
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
  }

  .staley-league-table-full tbody tr{
    /* four District + four Overall + streak are auto-flowed below team */
    grid-auto-flow:row;
  }

  .staley-league-table-full tbody td[data-label^="District"]{
    grid-area:auto;
    background:rgba(0,0,0,.018);
  }

  .staley-league-table-full tbody td[data-label^="Overall"]{
    grid-area:auto;
  }

  .staley-league-table-full tbody td[data-label="Streak"]{
    grid-area:streak;
    border-top:1px solid #f0f0f0;
    padding-top:7px;
    padding-bottom:8px;
  }

  /* Put the 8 stats into a two-column grid below the team heading. */
  .staley-league-table-full tbody tr{
    grid-template-columns:42px repeat(2,minmax(0,1fr));
    grid-template-areas:
      "rank team team"
      "d1 d2 d3"
      "d4 o1 o2"
      "o3 o4 streak";
  }

  .staley-league-table-full tbody td.rank{grid-area:rank}
  .staley-league-table-full tbody td.team{grid-area:team}

  .staley-league-table-full tbody td[data-label="District W-L"]{grid-area:d1}
  .staley-league-table-full tbody td[data-label="District PCT"]{grid-area:d2}
  .staley-league-table-full tbody td[data-label="District PF"]{grid-area:d3}
  .staley-league-table-full tbody td[data-label="District PA"]{grid-area:d4}
  .staley-league-table-full tbody td[data-label="Overall W-L"]{grid-area:o1}
  .staley-league-table-full tbody td[data-label="Overall PCT"]{grid-area:o2}
  .staley-league-table-full tbody td[data-label="Overall PF"]{grid-area:o3}
  .staley-league-table-full tbody td[data-label="Overall PA"]{grid-area:o4}
  .staley-league-table-full tbody td[data-label="Streak"]{grid-area:streak}

  /* ---------------- COMPACT / HOMEPAGE VIEW ---------------- */

  .staley-league-table-compact{
    border-top:4px solid var(--staley-primary,#00853f);
  }

  .staley-league-table-compact .staley-league-table-head{
    padding:10px 12px;
    background:#111;
  }

  .staley-league-table-compact .staley-league-table-head h3{
    color:#fff;
    font-size:17px;
  }

  .staley-league-table-compact .staley-league-table-subtitle{
    display:none;
  }

  .staley-league-table-compact table{
    width:100%;
    min-width:0;
  }

  .staley-league-table-compact thead{
    display:none;
  }

  .staley-league-table-compact tbody{
    display:block;
  }

  .staley-league-table-compact tbody tr{
    display:grid;
    grid-template-columns:38px minmax(0,1fr) auto;
    align-items:center;
    min-height:48px;
    border-bottom:1px solid #e8e8e8;
  }

  .staley-league-table-compact tbody tr.is-staley td{
    background:transparent;
  }

  .staley-league-table-compact tbody tr.is-staley{
    background:#f1f8f3;
  }

  .staley-league-table-compact tbody td{
    display:none;
    border:0;
    padding:8px 8px;
  }

  .staley-league-table-compact tbody td.rank{
    display:flex;
    align-items:center;
    justify-content:center;
    width:auto;
    color:#757575;
    font-size:12px;
  }

  .staley-league-table-compact tbody td.team{
    display:flex;
    align-items:center;
    min-width:0;
    font-size:13px;
    font-weight:700;
  }

  /* The first selected compact stat becomes the right-side snapshot. */
  .staley-league-table-compact tbody td.team ~ td{
    display:none;
  }

  .staley-league-table-compact tbody td.team + td{
    display:block;
    min-width:44px;
    text-align:right;
    font-size:12px;
    font-weight:700;
  }

  .staley-league-table-compact tbody td.team + td::before{
    content:attr(data-label) " ";
    color:#888;
    font-size:9px;
    font-weight:700;
  }
}


/* =========================================================
   1.9.28 - simplified mobile standings cards
   ========================================================= */

.staley-mobile-summary{
  display:none;
}

@media(max-width:700px){

  .staley-league-table-full table{
    display:block;
    width:100%;
    min-width:0;
  }

  .staley-league-table-full thead{
    display:none;
  }

  .staley-league-table-full tbody{
    display:block;
  }

  .staley-league-table-full tbody tr{
    display:grid !important;
    grid-template-columns:42px minmax(0,1fr) !important;
    grid-template-areas:
      "rank team"
      "summary summary" !important;
    width:100%;
    min-width:0;
    border-bottom:1px solid #e6e6e6;
    background:#fff;
  }

  .staley-league-table-full tbody tr.is-staley{
    background:#f1f8f3;
  }

  .staley-league-table-full tbody td{
    display:none !important;
    border:0 !important;
    background:transparent !important;
  }

  .staley-league-table-full tbody td.rank{
    grid-area:rank !important;
    display:flex !important;
    align-items:center;
    justify-content:center;
    min-height:54px;
    padding:8px 4px !important;
    border-right:1px solid #ececec !important;
    color:#757575;
    font-size:13px;
    font-weight:700;
  }

  .staley-league-table-full tbody td.team{
    grid-area:team !important;
    display:flex !important;
    align-items:center;
    min-width:0;
    min-height:54px;
    padding:8px 12px !important;
    font-size:14px;
    font-weight:700;
  }

  .staley-league-table-full tbody td.team .staley-league-team-logo{
    flex:0 0 28px;
    width:28px;
    height:28px;
    margin-right:9px;
  }

  .staley-league-table-full tbody td.team .staley-league-team-logo img{
    width:26px !important;
    height:26px !important;
    max-width:26px !important;
    max-height:26px !important;
  }

  .staley-league-table-full tbody td.staley-mobile-summary{
    grid-area:summary !important;
    display:flex !important;
    flex-wrap:wrap;
    align-items:center;
    gap:6px 14px;
    padding:8px 12px 10px 54px !important;
    border-top:1px solid #f0f0f0 !important;
    color:#444;
    font-size:12px;
    line-height:1.2;
  }

  .staley-league-table-full tbody td.staley-mobile-summary span{
    white-space:nowrap;
  }

  .staley-league-table-full tbody td.staley-mobile-summary strong{
    color:#7a7a7a;
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
  }

  /* Compact homepage mode: keep one-line team rows and stop exposing extra hidden stats. */
  .staley-league-table-compact tbody tr{
    display:grid !important;
    grid-template-columns:38px minmax(0,1fr) auto !important;
    min-height:46px;
  }

  .staley-league-table-compact tbody td{
    display:none !important;
  }

  .staley-league-table-compact tbody td.rank,
  .staley-league-table-compact tbody td.team{
    display:flex !important;
  }

  .staley-league-table-compact tbody td.team + td{
    display:block !important;
    align-self:center;
    padding-right:10px;
    text-align:right;
    font-size:12px;
    font-weight:700;
  }
}


/* 1.9.29 - compact table full-standings link */
.staley-league-full-link{
  display:flex;
  justify-content:flex-end;
  padding:10px 14px;
  border-top:1px solid #e5e5e5;
  background:#fff;
}

.staley-league-full-link a{
  color:var(--staley-primary,#00853f);
  font-family:"Pro Sans","Arial","Helvetica",sans-serif;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
  text-transform:uppercase;
}

.staley-league-full-link a:hover{
  text-decoration:underline;
}

@media(max-width:700px){
  .staley-league-full-link{
    justify-content:center;
    padding:10px 12px;
  }
}


/* =========================================================
   1.9.41 - modern compact standings + mobile W-L record
   ========================================================= */

.staley-league-table-compact .staley-compact-record{
  display:none;
}

/* Shared Elementor header choice for current and future Staley widgets. */
.staley-league-table.is-header-dark{
  border-top:4px solid var(--staley-primary,#00853f);
}

.staley-league-table.is-header-dark .staley-league-table-head{
  background:#111;
  border-bottom:0;
  color:#fff;
  margin:0;
  padding:10px 14px;
}

.staley-league-table.is-header-dark .staley-league-table-head h3{
  color:#fff;
  font-family:"Oswald",sans-serif;
  font-size:26px;
  font-weight:400;
  line-height:1.15;
}
.staley-league-table.is-header-dark .staley-league-table-subtitle,
.staley-league-table.is-header-dark .staley-league-table-updated{color:#d2d7d4}

.staley-league-table.is-header-clean .staley-league-table-head{
  background:#fff;
  border-bottom:3px solid var(--staley-primary,#00853f);
  color:#111;
  margin:0;
  padding:10px 0 12px;
}

.staley-league-table-compact.is-header-clean{border-top:1px solid #ddd}

.staley-league-table.is-header-clean .staley-league-table-head h3{
  color:#111;
  font-family:"Oswald",sans-serif;
  font-size:26px;
  font-weight:400;
  line-height:1.15;
}
.staley-league-table.is-header-clean .staley-league-table-subtitle{color:#667069}
.staley-league-table.is-header-clean .staley-league-table-updated{color:#757575;padding-right:2px}

@media(max-width:700px){
  .staley-league-table.is-header-dark .staley-league-table-head{padding:9px 11px}
  .staley-league-table.is-header-clean .staley-league-table-head{padding:10px 0}
}

.staley-league-table-compact tbody tr{
  transition:background .15s ease;
}

.staley-league-table-compact tbody tr:hover{
  background:#fafafa;
}

.staley-league-table-compact tbody tr.is-staley{
  box-shadow:inset 4px 0 0 var(--staley-primary,#00853f);
}

@media(max-width:700px){
  .staley-league-table-compact{
    overflow:hidden;
    border:1px solid #e2e2e2;
    border-top:4px solid var(--staley-primary,#00853f);
  }

  .staley-league-table-compact tbody tr{
    grid-template-columns:42px minmax(0,1fr) auto !important;
    min-height:54px !important;
    padding:0 8px 0 0;
    background:#fff;
  }

  .staley-league-table-compact tbody tr.is-staley{
    background:#f3f8f4 !important;
    box-shadow:inset 4px 0 0 var(--staley-primary,#00853f);
  }

  .staley-league-table-compact tbody td.rank{
    width:28px !important;
    height:28px;
    min-height:28px;
    align-self:center;
    margin-left:7px;
    padding:0 !important;
    border-radius:50%;
    background:#f1f1f1 !important;
    color:#666 !important;
    font-size:11px !important;
    font-weight:800 !important;
  }

  .staley-league-table-compact tbody tr.is-staley td.rank{
    background:var(--staley-primary,#00853f) !important;
    color:#fff !important;
  }

  .staley-league-table-compact tbody td.team{
    padding:8px 10px !important;
    font-size:13px !important;
  }

  .staley-league-table-compact tbody td.team + td,
  .staley-league-table-compact tbody td.team ~ td{
    display:none !important;
  }

  .staley-league-table-compact tbody td.staley-compact-record{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    align-self:center;
    min-width:54px;
    padding:6px 10px !important;
    border-radius:999px;
    background:#f0f0f0 !important;
    color:#222 !important;
    font-size:12px !important;
    font-weight:800 !important;
    line-height:1 !important;
    letter-spacing:.01em;
  }

  .staley-league-table-compact tbody tr.is-staley td.staley-compact-record{
    background:var(--staley-primary,#00853f) !important;
    color:#fff !important;
  }

  .staley-league-table-compact tbody td.staley-compact-record::before{
    display:none !important;
    content:none !important;
  }
}


/* 1.9.42 - ensure the dedicated W-L pill wins over older mobile hide rules */
@media(max-width:700px){
  .staley-league-table-compact tbody td.team + td.staley-compact-record,
  .staley-league-table-compact tbody td.staley-compact-record{
    display:inline-flex !important;
  }
}


/* =========================================================
   1.9.43 - compact mobile standings legend
   ========================================================= */
.staley-compact-mobile-head{
  display:none;
}

@media(max-width:700px){
  .staley-compact-mobile-head{
    display:grid;
    grid-template-columns:42px minmax(0,1fr) 64px;
    align-items:center;
    gap:0;
    padding:7px 8px 7px 0;
    border-bottom:1px solid #dedede;
    background:#f5f5f5;
    color:#777;
    font-size:9px;
    font-weight:800;
    letter-spacing:.055em;
  }

  .staley-compact-mobile-head span:first-child{
    text-align:center;
  }

  .staley-compact-mobile-head span:nth-child(2){
    padding-left:10px;
  }

  .staley-compact-mobile-head span:last-child{
    text-align:center;
  }
}

/* =========================================================
   2.1.30.8 - remove outer league-table chrome
   Keep the actual table grid/row separators and header accents.
   ========================================================= */
.staley-league-table{
  border-left:0;
  border-right:0;
  border-bottom:0;
}

.staley-league-table-head{
  border-bottom:0;
}

.staley-league-table-scroll{
  border:0;
}

/* Preserve the intentional green/clean header accent. */
.staley-league-table.is-header-clean .staley-league-table-head{
  border-bottom:3px solid var(--staley-primary,#00853f);
}

/* Compact/mobile had its own gray frame later in the stylesheet. */
@media(max-width:700px){
  .staley-league-table-compact{
    border-left:0;
    border-right:0;
    border-bottom:0;
  }
}

/* =========================================================
   2.1.30.10 - finish outer league-table border cleanup
   Remove the remaining top frame without changing the table grid
   or the green underline beneath the clean header.
   ========================================================= */
.staley-league-table,
.staley-league-table.is-header-dark,
.staley-league-table-compact.is-header-clean{
  border-top:0 !important;
}

@media(max-width:700px){
  .staley-league-table-compact{
    border-top:0 !important;
  }
}
