/* Loading spinner */
.ce-ntl__loading-cell {
  text-align: center !important;
  padding: 60px 20px !important;
  background: transparent !important; /* Remove striped background */
}

.ce-ntl__local-prompt-cell {
  text-align: center !important;
  padding: 50px 20px !important;
  background: transparent !important;
  color: #888;
  font-size: 15px;
}

.ce-ntl__spinner {
  display: inline-block;
  width: 80px;
  height: 80px;
  animation: spin 1.5s linear infinite;
}

.ce-ntl__spinner img {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hide table headers and instruction by default - JS will show after load */
.ce-ntl__table thead {
  display: none;
}

#ce-ntl-instruction {
  display: none;
}

.ce-ntl__filters{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  margin:12px auto;
  max-width: 1200px;
}
.ce-ntl__filters label span{
  display:block;
  font-size:.85rem;
  color:#555;
  margin-bottom:4px;
  font-weight: bold;
}

.ce-ntl__local-league-field {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.ce-ntl__local-league-field label {
  display: block;
  font-size: .85rem;
  color: #555;
  margin-bottom: 4px;
  font-weight: bold;
}

.ce-ntl__local-filter-dropdown {
  position: relative;
  flex-shrink: 0;
}

.ce-ntl__local-filter-field {
  display: block;
  margin-bottom: 12px;
}

/* ============================================================================
   TABLE STYLING - Refined to match National Leaders
   ============================================================================ */

.ce-ntl__table {
  width: 100%;
  border-collapse: collapse;
}

.ce-ntl__table th,
.ce-ntl__table td {
  border-bottom: 1px solid #ececec;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

/* Team name cell with badges underneath */
.ce-ntl__team-name-primary {
  font-weight: 600;
  font-size: 15px;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.ce-ntl__team-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  align-items: center;
}

.ce-ntl__team-meta .ntl-badge {
  margin-left: 0;
}

.ce-ntl__national-rank-indicator {
  font-size: 11px;
  color: #666;
  white-space: nowrap;
}

.ce-ntl__table tbody tr {
  cursor: pointer;
  transition: all 0.15s ease;
}

/* ── Gap-from-first column ───────────────────────────────────────────────
   Only meaningful for a day-filtered National view, so it's hidden unless
   the table carries the show-gap class (toggled in JS based on whether the
   rows actually have a gap_from_first value). */
.ce-ntl__gap-column {
  display: none;
}

.ce-ntl__table--show-gap .ce-ntl__gap-column {
  display: table-cell;
}

/* ── Venue Rank / Venue Score columns ─────────────────────────────────────
   Only meaningful for a venue-filtered National view — hidden unless the
   table carries the show-venue class. */
.ce-ntl__venue-column {
  display: none;
}

.ce-ntl__table--show-venue .ce-ntl__venue-column {
  display: table-cell;
}

/* One-prize-rule exclusion row (day-filtered National view) — same grey
   treatment as the leaderboard cards' ineligible entries. */
#ce-ntl-table tbody tr.ce-ntl__row-ineligible {
  opacity: 0.4;
  filter: grayscale(60%);
  cursor: help;
}

@media (hover: none) and (pointer: coarse) {
  #ce-ntl-table tbody tr.ce-ntl__row-ineligible td:nth-child(3)::after {
    content: " ⓘ";
    font-size: 0.8em;
    opacity: 0.6;
  }
}

/* ── National filter bar (search + day/venue popup filter) ─────────────── */
.ce-ntl__national-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.ce-ntl__national-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.ce-ntl__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  opacity: .5;
  pointer-events: none;
}

.ce-ntl__national-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px 10px 34px;
  border: 1.5px solid #e0e0e0;
  border-radius: 999px;
  font-size: 14px;
}

.ce-ntl__national-search input:focus {
  outline: none;
  border-color: #cc0000;
}

.ce-ntl__national-filter-dropdown {
  position: relative;
  flex-shrink: 0;
      margin-left: auto;
}

.ce-ntl__national-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8f8f8;
  border: 1.5px solid #e0e0e0;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  cursor: pointer;
}

.ce-ntl__national-filter-toggle:hover {
  background: #f0f0f0;
}

.ce-ntl__filter-icon {
  font-size: 13px;
  opacity: .65;
}

.ce-ntl__national-filter-badge {
  background: #cc0000;
  color: #fff;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
}

.ce-ntl__national-filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
  padding: 16px;
  width: 280px;
  z-index: 30;
}

.ce-ntl__national-filter-panel[hidden] {
  display: none;
}

.ce-ntl__filter-panel-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.ce-ntl__filter-panel-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
}

.ce-ntl__filter-panel-field {
  margin-bottom: 12px;
}

.ce-ntl__filter-panel-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
}

.ce-ntl__filter-panel-hint {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: #888;
  line-height: 1.4;
}

.ce-ntl__filter-panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ce-ntl__filter-clear {
  background: transparent;
  border: 0;
  color: #888;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 4px;
}

.ce-ntl__filter-apply {
  background: #cc0000;
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ce-ntl__table tbody tr:hover {
  background: #f5f5f5 !important;
  transform: translateX(2px);
}

.ce-ntl__table--details tbody tr {
  cursor: default;
}

.ce-ntl__details {
  margin-top: 16px;
}

.ce-ntl__table-wrap {
  height: 400px;
  overflow: scroll;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      margin-bottom: 80px;
}

.ce-ntl__filters select {
  width: 100%;
  max-width: 100%;
}

.ce-ntl__table tbody tr:nth-child(odd) {
  background-color: #fafafa;
}

.ce-ntl__table tbody tr:nth-child(even) {
  background-color: #ffffff;
}

.ce-ntl__table thead {
  background-color: #071b37;
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.ce-ntl__table thead th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Rank column - more prominent */
.ce-ntl__table td:first-child {
  font-weight: 700;
  font-size: 16px;
  color: #cc0000;
  width: 50px;
  text-align: center;
}

/* Top 3 special styling */
.ce-ntl__table tbody tr:nth-child(1) td:first-child {
  font-size: 18px;
}

.ce-ntl__table tbody tr:nth-child(2) td:first-child {
  color: #c0c0c0;
  font-size: 17px;
}

.ce-ntl__table tbody tr:nth-child(3) td:first-child {
  color: #cd7f32;
  font-size: 17px;
}

/* Team ID column */
.ce-ntl__table td:nth-child(2) {
  font-family: monospace;
  font-size: 13px;
  color: #666;
  width: 80px;
}

/* League column */
.ce-ntl__table td:nth-child(4) {
  color: #666;
  font-size: 14px;
}


@media (max-width: 768px) {
.ce-ntl__table td:nth-child(4),
 .ce-ntl__table td:nth-child(5){
  max-width: 100px;
  word-break: break-all;
}
}

/* Score column - bold and red */
.ce-ntl__table td:last-child {
  font-weight: 700;
  font-size: 16px;
  color: #cc0000;
  text-align: right;
  width: 100px;
}

/* ============================================================================
   BADGES - Redesigned with CE brand colors
   ============================================================================ */

.ntl-badge {
  display: inline-block;
  padding: 3px 8px;
  margin-left: 0;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.4;
}

/* Cumulative Leader - CE Red */
.ntl-badge--cumulative {
  background-color: #cc0000;
  color: #ffffff;
}

/* Venue Leader - Dark Grey */
.ntl-badge--venue {
  background-color: #2d2d2d;
  color: #ffffff;
}

/* Day of Week Leader - Light with Red border */
.ntl-badge--dow {
  background-color: #ffffff;
  color: #cc0000;
  border: 1px solid #cc0000;
}

/* ============================================================================
   ROW HIGHLIGHTING - Simplified, cleaner
   ============================================================================ */

/* Cumulative leaders - subtle red left border */
.ce-ntl__table tbody tr.is-cumulative-leader {
  border-left: 4px solid #cc0000;
}

/* Venue leaders - subtle grey left border */
.ce-ntl__table tbody tr.is-venue-leader {
  border-left: 4px solid #666666;
}

/* Day of week leaders - very light background */
.ce-ntl__table tbody tr.is-dow-leader {
  background-color: #fffaf0 !important;
}

/* Current filtered day leader - more prominent */
.ce-ntl__table tbody tr.is-dow-leader--current {
  background-color: #fff4e6 !important;
  border-left: 4px solid #cc0000;
}

/* Multiple highlights - red border wins */
.ce-ntl__table tbody tr.is-cumulative-leader.is-venue-leader,
.ce-ntl__table tbody tr.is-cumulative-leader.is-dow-leader {
  border-left: 4px solid #cc0000;
}

/* ============================================================================
   NATIONAL RANK BADGES - Refined colors
   ============================================================================ */

.ce-ntl__national-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.ce-ntl__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Split badges - Gold theme */
.ce-ntl__badge--split-cumulative {
  background: #ffd700;
  color: #1a1a1a;
}

.ce-ntl__badge--split-day {
  background: #f4c430;
  color: #1a1a1a;
}

/* Yearly badges - CE Red theme */
.ce-ntl__badge--yearly-overall {
  background: #cc0000;
  color: #ffffff;
}

.ce-ntl__badge--yearly-day {
  background: #d13237;
  color: #ffffff;
}

.ce-ntl__badge--yearly-avg {
  background: #e63946;
  color: #ffffff;
}

/* National rank indicator */
.ce-ntl__national-rank-indicator {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 8px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 11px;
  color: #666;
  font-weight: 600;
}

.ce-ntl__national-rank-indicator strong {
  color: #cc0000;
  font-weight: 700;
}

/* Season Notes - Area Manager */
.ntl-season-notes-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
}

.ntl-season-notes-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.ntl-season-notes-section textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  resize: vertical;
}

.ntl-season-notes-section .ntl-field-hint {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
}

/* Season Notes - Leaderboard Display */
.ce-ntl__season-notes {
  margin: 15px auto;
  padding: 15px;
  background: #f8f9fa;
  border-left: 4px solid #cc0000;
  border-radius: 4px;
  max-width: 1200px;
}

.ce-ntl__notes-content {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

/* ============================================================================
   NTL National Rankings Styles
   ============================================================================ */

/* National Summary Section */
.ce-ntl__national-summary {
  margin: 40px auto 80px;;
  padding: 25px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  max-width: 1200px;
  box-sizing: border-box;
  overflow: hidden;
}

.ce-ntl__national-title {
  margin: 0 0 20px 0;
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
}

.ce-ntl__national-title span {
  color: #cc0000;
}

/* Tabs */
.ce-ntl__national-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  justify-content: center;
  flex-wrap: wrap;
}

.ce-ntl__national-tab {
  background: #f8f8f8;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 14px 28px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.ce-ntl__national-tab:hover {
  background: #f0f0f0;
  border-color: #ccc;
}

.ce-ntl__national-tab.active {
  background: #cc0000;
  border-color: #cc0000;
  color: #fff;
}

.ce-ntl__national-tab .tab-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.ce-ntl__national-tab.active .tab-label {
  opacity: 0.9;
}

.ce-ntl__national-tab .tab-name {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

/* Panels */
.ce-ntl__national-panel {
  display: none;
}

.ce-ntl__national-panel.active {
  display: block;
}

/* Cards */
.ce-ntl__national-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* 1024px and up: there's room for every leaderboard at once, so they all
   just show — no tabs, no paging, nothing to click to see more. */
.ce-ntl__national-card {
  display: block;
}

.ce-ntl__card-tabs {
  display: none;
}

@media (max-width: 1023.98px) {
  /* Below 1024px only one card fits comfortably, so a row of labeled
     tap-tabs picks which single card is showing. */
  .ce-ntl__national-grid {
    grid-template-columns: 1fr;
  }

  .ce-ntl__national-card {
    display: none;
  }

  .ce-ntl__national-card.is-selected {
    display: block;
  }

  .ce-ntl__card-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }
}

.ce-ntl__card-tab {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  padding: 10px 6px;
  border: 1.5px solid #d8dce3;
  background: #fff;
  color: #0f2244;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.ce-ntl__card-tab--cumulative {
  border-color: #f3c6c8;
  color: #D13237;
}

.ce-ntl__card-tab--cumulative.is-active {
  background: #D13237;
  border-color: #D13237;
  color: #fff;
}

.ce-ntl__card-tab--average {
  border-color: #b7e8dc;
  color: #0c7867;
}

.ce-ntl__card-tab--average.is-active {
  background: #17b8a6;
  border-color: #17b8a6;
  color: #fff;
}

.ce-ntl__card-tab--day.is-active {
  background: #0f2244;
  border-color: #0f2244;
  color: #fff;
}

.ce-ntl__national-card h4 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  border-bottom: 2px solid #cc0000;
  padding-bottom: 10px;
      text-transform: uppercase;
    text-align: center;
}

.ce-ntl__subtitle {
  font-weight: 400;
  font-size: 14px;
  color: #666;
}

/* Day indicator icon */
.ce-ntl__day-icon {
  margin-right: 8px;
}

/* Lists */
.ce-ntl__national-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ce-ntl__national-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #eee;
  font-size: 15px;
  transition: all 0.15s ease;
  min-width: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.ce-ntl__national-list .team-name {
  flex: 1;
  margin: 0 10px;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ce-ntl__national-list li:hover {
  border-color: #cc0000;
  box-shadow: 0 2px 4px rgba(204,0,0,0.1);
}

.ce-ntl__national-list li:last-child {
  margin-bottom: 0;
}

/* Rank number styling */
.ce-ntl__national-list .team-rank {
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: #cc0000;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Gold/Silver/Bronze for top 3 */
.ce-ntl__national-list li:nth-child(1) .team-rank {
  background: #ffd700;
  color: #1a1a1a;
}

.ce-ntl__national-list li:nth-child(2) .team-rank {
  background: #c0c0c0;
  color: #1a1a1a;
}

.ce-ntl__national-list li:nth-child(3) .team-rank {
  background: #cd7f32;
  color: #ffffff;
}

.ce-ntl__national-list .team-score {
  font-weight: 700;
  font-size: 13px;
  color: #cc0000;
  background: #fff5f5;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid #ffcccc;
  white-space: nowrap;
  flex-shrink: 0;
}

.ce-ntl__national-list .team-league {
  font-size: 11px;
  color: #666;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  display: block;
  margin-top: 3px;
  width: fit-content;
}

.ce-ntl__national-list .team-games {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}


.ce-ntl__national-list--wide li {
  margin-bottom: 0;
}

/* Top 10 list */
.ce-ntl__national-list--top10 {
  grid-template-columns: repeat(2, 1fr);
}

/* ============================================================================
   Responsive - Filters
   ============================================================================ */


@media (max-width: 768px) {
  /* Adjust filter labels on mobile */
  .ce-ntl__filters label span {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }
  
  .ce-ntl__filters select {
    padding: 10px;
    font-size: 14px;
  }
  
  .ce-ntl__table {
    font-size: 13px;
  }
  
  .ce-ntl__table th,
  .ce-ntl__table td {
    padding: 6px 4px;
  }
  
  .ce-ntl__team-name-primary {
    font-size: 13px;
  }
  
  .ntl-badge {
    font-size: 9px;
    padding: 2px 5px;
  }
  
  .ce-ntl__national-rank-indicator {
    font-size: 10px;
  }
}

/* ============================================================================
   Responsive - National Rankings
   ============================================================================ */

@media (max-width: 768px) {
  .ce-ntl__national-summary {
    padding: 15px;
    margin: 15px;
  }

  .ce-ntl__standings-heading,
  .ce-ntl__national-filterbar,
  .ce-ntl__table-wrap,
  .ce-ntl__team-detail-panel {
    margin-right: 15px;
    margin-left: 15px;
  }
  
  .ce-ntl__national-title {
    font-size: 22px;
  }
  
  .ce-ntl__national-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
  
  .ce-ntl__national-card--wide {
    grid-column: span 1; /* Full width */
  }
  
  .ce-ntl__national-card--full {
    grid-column: 1 / -1;
  }
  
  .ce-ntl__national-list--wide {
    grid-template-columns: 1fr;
  }
  
  .ce-ntl__national-tab {
    padding: 10px 16px;
  }
  
  .ce-ntl__national-tab .tab-name {
    font-size: 14px;
  }
  
  .ce-ntl__national-list li {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  .ce-ntl__national-list .team-rank {
    min-width: 24px;
    height: 24px;
    font-size: 12px;
  }
  
  .ce-ntl__national-list .team-name {
    font-size: 14px;
    margin: 0 10px;
  }
  
  .ce-ntl__national-list .team-score {
    font-size: 13px;
    padding: 3px 8px;
  }
  
  .ce-ntl__national-list .team-league {
    display: none;
  }
}

@media (max-width: 480px) {
  .ce-ntl__national-grid {
    grid-template-columns: 1fr;
  }
  
  .ce-ntl__national-card--wide,
  .ce-ntl__national-card--full {
    grid-column: span 1;
  }
}

/* Average score styling - show games inline with score */
.ce-ntl__national-list .team-score .ce-ntl__games {
  font-size: 0.85em;
  color: rgba(136, 136, 136, 1);
  font-weight: normal;
  margin-left: 4px;
  background: transparent;
  padding: 0;
  border: none;
}

/* Make sure the score container can hold both score and games */
.ce-ntl__national-list .team-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.ce-ntl__national-list li.ce-ntl__leader-ineligible {
    opacity: 0.38;
    cursor: help;
    filter: grayscale(60%);
    pointer-events: auto;
    /* Score and name still fully readable via hover tooltip */
}
/* Rank number on ineligible rows shown in parentheses to signal non-prize */
.ce-ntl__leader-ineligible .ce-ntl__ineligible-rank::before { content: "("; }
.ce-ntl__leader-ineligible .ce-ntl__ineligible-rank::after  { content: ")"; }
 
/* ── Historical split tabs ───────────────────────────────────────────────── */
.ce-ntl__national-tab--historical {
    opacity: 0.8;
}
.ce-ntl__national-tab--historical .tab-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #aaa;
}
.ce-ntl__national-panel--historical {
    /* same layout as regular panels */
}
.ce-ntl__archive-note {
    text-align: center;
    font-size: 0.82em;
    color: #888;
    margin-top: 18px;
    padding: 6px 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ── Archived splits dropdown ───────────────────────────────────────────── */
.ce-ntl__archived-dropdown {
    position: relative;
    align-self: center;
}

.ce-ntl__archived-toggle {
    background: #f8f8f8;
    border: 1.5px solid #e0e0e0;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
}

.ce-ntl__archived-toggle:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.ce-ntl__archived-toggle.is-active-selection {
    background: #cc0000;
    border-color: #cc0000;
    color: #fff;
}

.ce-ntl__archived-chevron {
    display: inline-block;
    font-size: 12px;
    margin-left: 1px;
}

.ce-ntl__archived-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px;
    min-width: 220px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Without this, the bare `display: flex` above wins over the browser's
   default [hidden]{display:none} styling (author CSS overrides user-agent
   defaults regardless of selector specificity), so the menu would stay
   visible even with the hidden attribute set. */
.ce-ntl__archived-menu[hidden] {
    display: none;
}

.ce-ntl__archived-item {
    /* This shares .ce-ntl__national-tab, so it already gets the red
       active-state look for free when selected — just override the
       dimmed opacity that's meant for inline historical tabs, and
       make it read as a compact menu row instead of a big tab button. */
    opacity: 1;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 10px 14px;
    text-align: left;
    width: 100%;
}

.ce-ntl__archived-item:hover {
    background: #f0f0f0;
}

.ce-ntl__archived-item .tab-name {
    display: block;
    font-weight: 700;
    font-size: 14px;
}

.ce-ntl__archived-item .tab-dates {
    display: block;
    font-size: 11px;
    opacity: 0.75;
    margin-top: 2px;
}
 
/* ── Rules button ────────────────────────────────────────────────────────── */
.ce-ntl__rules-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: inherit;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.82em;
    cursor: pointer;
    margin: 10px 0 14px;
    transition: background 0.15s, border-color 0.15s;
}
.ce-ntl__rules-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.55);
}
 
/* ── Rules popup content (Popup Maker) ───────────────────────────────────── */
.ntl-rules-popup h2 { margin-top: 0; }
.ntl-rules-popup h3 { margin: 1.2em 0 0.4em; }
.ntl-rules-popup h4 { margin: 0.8em 0 0.3em; }
.ntl-rules-popup ol { padding-left: 1.4em; line-height: 1.9; }
.ntl-rules-popup p  { line-height: 1.6; }
.ntl-rules-contact  { font-style: italic; opacity: 0.7; margin-top: 1.4em; }

/* Tap-to-reveal reason row (mobile) */
.ce-ntl__ineligible-reason {
    display: none; /* controlled by JS slideToggle */
    list-style: none;
    background: rgba(255, 255, 255, 0.06);
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 4px 4px 0;
    margin: -4px 0 6px 12px;
    padding: 8px 12px;
    font-size: 0.78em;
    color: #bbb;
    line-height: 1.4;
}
.ce-ntl__ineligible-reason span {
    display: block;
}
/* Subtle tap-hint icon on mobile so users know it's interactive */
@media (hover: none) and (pointer: coarse) {
    .ce-ntl__leader-ineligible::after {
        content: " ⓘ";
        font-size: 0.75em;
        opacity: 0.5;
        margin-left: 4px;
    }
}

/* ── National list clickable rows ───────────────────────────────────────── */
.ce-ntl__national-list li.ce-ntl__leader-clickable {
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.ce-ntl__national-list li.ce-ntl__leader-clickable:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}
/* On ineligible rows, only the name span is clickable */
.ce-ntl__leader-ineligible .ce-ntl__leader-clickable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}
.ce-ntl__leader-ineligible .ce-ntl__leader-clickable:hover {
    opacity: 0.7;
}

/* ── Split tab date range ────────────────────────────────────────────────── */
.ce-ntl__national-tab .tab-dates {
    display: block;
    font-size: 0.68em;
    opacity: 0.7;
    font-weight: normal;
    letter-spacing: 0.01em;
    margin-top: 2px;
}
/* ==========================================================================
   NTL View Split: National vs Local
   ========================================================================== */
.ce-ntl__view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;;
  max-width: 1200px;
  margin: 20px auto 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.ce-ntl__view-tab {
  appearance: none;
  background: #f0f5f8;
  color: #08213f;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
  text-align: left;
  transition: all .18s ease;
      border-radius: 8px 8px 0px 0px;
}


.ce-ntl__view-tab + .ce-ntl__view-tab { border-left: 0; }

.ce-ntl__view-tab strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.ce-ntl__view-tab em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 13px;
  color: #667085;
}

.ce-ntl__view-tab-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef6fb;
  color: #0493aa;
  flex: 0 0 auto;
}

.ce-ntl__view-tab.is-active {
  background: #ffffff;
}

.ce-ntl__view-tab.is-active strong {color: #d13237;}
.ce-ntl__view-tab.is-active .ce-ntl__view-tab-icon { background: #d13237; color: #fff; }

.ce-ntl__filters--local {
  background: #fff;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.ce-ntl__view-tab:hover {
  background-color: #071b37;
}

.ce-ntl__standings-heading {
  max-width: 1200px;
  margin: 18px auto 10px;
  text-align: center;
}

.ce-ntl__standings-heading h3 {
  margin: 0 0 6px;
  color: #08213f;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.ce-ntl__standings-heading p {
  margin: 0;
  color: #667085;
}

.ce-ntl[data-current-view="national"] .ce-ntl__season-notes { display: none !important; }

@media (max-width: 768px) {
  .ce-ntl__view-tabs {
       box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
    border-radius: 12px;
    gap: 0px;
  }

  .ce-ntl__view-tab {
    padding: 12px;
    border-radius: 12px 0px 0px 12px;

  }

  .ce-ntl__view-tab.is-active {

    background-color: #071b37;
  }

  .ce-ntl__view-tab.is-active strong,
    .ce-ntl__view-tab.is-active em {
    color: #ffffff;
    }
  .ce-ntl__view-tab + .ce-ntl__view-tab { border-left: 1px solid #e5e7eb; border-top: 0; border-radius: 0px 12px 12px 0px }
  .ce-ntl__view-tab strong { font-size: 16px; }
}

/* ============================================================================
   Team Detail Panel — modern card display
   ============================================================================ */
.ce-ntl__team-detail-panel {
  max-width: 1200px;
  margin: 28px auto 80px;
  border: 1px solid #061b37;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(6, 27, 55, 0.12);
}

.ce-ntl__detail-shell {
  background: #ffffff;
}

.ce-ntl__detail-bar {
  display: flex;
  align-items: center;
  gap: 0px;
  padding: 14px 20px;
  background: #061b37;
  color: #ffffff;
}

.ce-ntl__detail-bar h3 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.ce-ntl__detail-context {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .9;
}

.ce-ntl__detail-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  opacity: .9;
  padding: 0px;
    margin-left:50px;
}

@media (max-width: 768px) {
  .ce-ntl__detail-close {
    position: absolute;
        right: 30px;
    width: 50px;
  }
}


.ce-ntl__detail-close:hover {
  opacity: 1;
  color: #ffffff;
  background-color: transparent;
}

.ce-ntl__detail-body {
  padding: 22px;
}

.ce-ntl__detail-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.ce-ntl__team-avatar {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d13237, #061b37);
  color: #ffffff;
  font-size: 34px;
  font-weight: 900;
  border: 4px solid #f2f6fa;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  overflow: hidden;
}

.ce-ntl__team-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
}

.ce-ntl__team-heading h4 {
  margin: 0 0 6px;
  color: #061b37;
  font-size: 36px;
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: .01em;
}

.ce-ntl__team-detail-meta {
  display: flex;
  flex-wrap: wrap;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.ce-ntl__detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.ce-ntl__detail-stat {
  padding: 16px 14px;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 4px 14px rgba(6, 27, 55, 0.06);
}

.ce-ntl__detail-stat span,
.ce-ntl__detail-stat small {
  display: block;
  color: #5b6472;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ce-ntl__detail-stat strong {
  display: block;
  margin: 6px 0 2px;
  color: #061b37;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.ce-ntl__detail-table-card {
  border: 1px solid #e1e7ef;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.ce-ntl__detail-table-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e1e7ef;
}

.ce-ntl__detail-table-head h4 {
  margin: 0;
  color: #061b37;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
}

.ce-ntl__detail-table-head span {
  color: #5b6472;
  font-size: 12px;
  font-weight: 700;
}

.ce-ntl__detail-table-wrap {
  max-height: 460px;
  overflow: auto;
}

.ce-ntl__detail-table {
  width: 100%;
  border-collapse: collapse;
}

.ce-ntl__detail-table th,
.ce-ntl__detail-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #eef1f5;
  text-align: left;
}

.ce-ntl__detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #061b37;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ce-ntl__score-cell,
.ce-ntl__place-cell {
  color: #d13237;
  font-weight: 900;
  text-align: right !important;
}

.ce-ntl__best-star {
  color: #f5a400;
  margin-left: 4px;
}

.ce-ntl__empty-detail,
.ce-ntl__detail-error,
.ce-ntl__detail-loading {
  padding: 38px 20px;
  text-align: center;
  color: #5b6472;
  font-weight: 800;
}

@media (max-width: 900px) {
  .ce-ntl__detail-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ce-ntl__detail-context {
    margin-left: 0;
  }

  .ce-ntl__detail-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .ce-ntl__detail-body {
    padding: 16px;
  }

  .ce-ntl__team-heading h4 {
    font-size: 28px;
  }

  .ce-ntl__detail-stat-grid {
    grid-template-columns: 1fr;
  }

  .ce-ntl__detail-table th,
  .ce-ntl__detail-table td {
    padding: 11px 10px;
    font-size: 13px;
  }
}

/* ==========================================================================
   Team Details Dashboard Upgrade
   ========================================================================== */
.ce-ntl__detail-shell--dashboard .ce-ntl__detail-body {
  padding: 22px 24px 26px;
}

.ce-ntl__detail-header--wide {
  margin-bottom: 20px;
}

.ce-ntl__detail-stat-grid--five {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 24px;
}

.ce-ntl__detail-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-grid !important;
  place-items: center;
  margin: 0 auto 10px;
  background: #f8fafc;
  border: 1px solid #dce5ef;
  font-size: 22px !important;
  line-height: 1;
}

.ce-ntl__detail-stat--primary .ce-ntl__detail-stat-icon {
  background: #fff5f5;
  color: #d13237;
  border-color: #ffd3d5;
}

.ce-ntl__detail-stat--primary strong,
.ce-ntl__season-stat--primary strong {
  color: #d13237;
}

.ce-ntl__detail-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 22px;
  align-items: start;
}

.ce-ntl__detail-table-card--history,
.ce-ntl__detail-table-card--stats {
  height: 100%;
}

.ce-ntl__detail-table-head h4 small {
  color: #5b6472;
  font-size: 12px;
  letter-spacing: .04em;
}

.ce-ntl__season-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.ce-ntl__season-stat {
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  background: #ffffff;
  padding: 17px 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(6, 27, 55, 0.04);
}

.ce-ntl__season-stat span,
.ce-ntl__season-stat small {
  display: block;
  color: #5b6472;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ce-ntl__season-stat strong {
  display: block;
  margin: 8px 0 3px;
  color: #061b37;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.ce-ntl__personal-best-callout {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 6px 18px 18px;
  padding: 18px 20px;
  border: 1px solid #cfe0f1;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.ce-ntl__personal-best-callout > span {
  color: #f5a400;
  font-size: 34px;
  line-height: 1;
}

.ce-ntl__personal-best-callout strong {
  display: block;
  color: #061b37;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 6px;
}

.ce-ntl__personal-best-callout p {
  margin: 0;
  color: #263445;
  font-weight: 600;
}

.ce-ntl__personal-best-callout p span {
  color: #5b6472;
  font-weight: 600;
}

.ce-ntl__detail-card-footer {
  padding: 16px 18px 18px;
  text-align: center;
}

.ce-ntl__detail-soft-btn {
  appearance: none;
  min-width: 240px;
  border: 1px solid #b7c9dc;
  border-radius: 999px;
  background: #ffffff;
  color: #061b37;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: default;
}

@media (max-width: 1100px) {
  .ce-ntl__detail-stat-grid--five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ce-ntl__detail-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ce-ntl__detail-stat-grid--five,
  .ce-ntl__season-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .ce-ntl__detail-stat-grid--five,
  .ce-ntl__season-stat-grid {
    grid-template-columns: 1fr;
  }

  .ce-ntl__detail-soft-btn {
    min-width: 0;
    width: 100%;
  }
}

.page-id-130336 .buttons-container {
  display: none !important;
}

.ce-ntl__leader-hidden,
.ce-ntl__leader-hidden-reason {
  display: none !important;
}

.ce-ntl__national-list.is-expanded .ce-ntl__leader-hidden {
  display: flex !important;
}

.ce-ntl__national-list.is-expanded .ce-ntl__leader-hidden-reason {
  display: none !important;
}

.ce-ntl__view-full-list {
  margin-top: 12px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: #f2f4f7;
  color: #071b37;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
}

.ce-ntl__view-full-list:hover {
  background: #071b37;
  color: #fff;
}

.ce-ntl__national-card {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #eee;
    padding: 16px 12px 12px;
}

.ce-ntl__national-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 5px 5px 0 0;
  background: transparent;
}

.ce-ntl__card-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 4px;
}

.ce-ntl__card-kicker-icon {
  font-size: 13px;
  line-height: 1;
}

.ce-ntl__card-kicker-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ce-ntl__day-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: #0f2244;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cumulative leaderboards (split + yearly overall) — red */
.ce-ntl__national-card--cumulative::before { background: #D13237; }
.ce-ntl__national-card--cumulative .ce-ntl__card-kicker-icon,
.ce-ntl__national-card--cumulative .ce-ntl__card-kicker-label { color: #D13237; }
.ce-ntl__national-card--cumulative.ce-ntl__national-card h4 { border-bottom-color: #D13237; }

/* Average score leaderboards — teal, including a teal score pill so the
   per-game average reads as a different unit than the raw point totals */
.ce-ntl__national-card--average::before { background: #17b8a6; }
.ce-ntl__national-card--average .ce-ntl__card-kicker-icon,
.ce-ntl__national-card--average .ce-ntl__card-kicker-label { color: #0c7867; }
.ce-ntl__national-card--average.ce-ntl__national-card h4 { border-bottom-color: #17b8a6; }
.ce-ntl__national-card--average .ce-ntl__national-list .team-score {
  color: #0b5c50;
  background: #e6f7f4;
  border-color: #b7e8dc;
}

/* Day-of-week leaderboards — shared navy identity, individual days told
   apart by the small letter badge in the corner */
.ce-ntl__national-card--day::before { background: #0f2244; }
.ce-ntl__national-card--day .ce-ntl__card-kicker-icon,
.ce-ntl__national-card--day .ce-ntl__card-kicker-label { color: #0f2244; }
.ce-ntl__national-card--day.ce-ntl__national-card h4 { border-bottom-color: #0f2244; }

.ce-ntl .buttons-container {
  gap: 12px;
}

.ce-ntl .buttons-container button {
  padding: 12px;
  width: 50%;
}