/* Shared widget structure. Values are supplied by assets/skins/*.css. */
/* ============================================================================
   2. DESIGN SYSTEM UTILITIES - Reusable Components
   See: DESIGN-SYSTEM.md for usage guide
   ============================================================================ */

/* ========== 2.1 Typography Utilities ========== */
.tw-font-book {
  font-family: var(--tw-font-book);
}

.tw-font-heavy {
  font-family: var(--tw-font-heavy);
}

/* ========== 2.2 Alternating Row Pattern ========== */
.tw-alternating-container > *:nth-child(odd) {
  background-color: var(--tw-surfaces-primary);
}

.tw-alternating-container > *:nth-child(even) {
  background-color: var(--tw-surfaces-secondary);
}

/* ========== 2.3 Tab Button Pattern ========== */
.tw-tab-button {
  color: var(--tw-tabs-text) !important;
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-11px);
  background: transparent;
  border: 2px solid var(--tw-tabs-border);
}

.tw-tab-button.active {
  background-color: var(--tw-tabs-bg-active) !important;
  color: var(--tw-tabs-text-active) !important;
  border: 2px solid var(--tw-tabs-border);
  border-radius: 0;
  border-bottom: none;
}

/* ========== 2.4 Header Bar Pattern ========== */
.tw-header-bar {
  background-color: var(--tw-headers-bg);
  color: var(--tw-headers-text);
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  text-align: center;
  line-height: 40px;
  text-transform: uppercase;
}

/* ========== 2.5 Stat Rectangle Pattern ========== */
.tw-stat-rectangle {
  padding: var(--tw-space-15px);
  color: var(--tw-text-on-dark-primary);
  font-family: var(--tw-font-book);
}

.tw-stat-rectangle .label {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-16px);
  text-transform: uppercase;
  letter-spacing: var(--tw-space-1_5px);
}

.tw-stat-rectangle .value {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-28px);
}

/* ========== 2.6 Progress Bar Pattern ========== */
.tw-progress-container {
  background-color: var(--tw-chart-track);
  height: 8px;
  width: 80%;
  margin: auto;
}

.tw-progress-bar {
  height: 100%;
  background-color: var(--tw-chart-positive);
}

/* ========== 2.7 Gradient Background Pattern ========== */
.tw-gradient-section {
  background-image: linear-gradient(
    180deg,
    var(--tw-surfaces-gradient-start) 0%,
    var(--tw-surfaces-gradient-end) 100%
  );
  color: var(--tw-text-on-dark-primary);
}

/* ========== 2.8 Dark Section Pattern ========== */
.tw-dark-section {
  background-color: var(--tw-surfaces-primary);
  color: var(--tw-text-on-dark-primary);
  font-family: var(--tw-font-book);
}

/* ========== 2.9 Utility Classes ========== */
.tw-hidden {
  display: none !important;
}

/* ============================================================================
   3. GLOBAL UTILITIES & BOOTSTRAP OVERRIDES
   Used by: All files
   ============================================================================ */

/* ========== Container & Layout ========== */
/* Used by: twa-html.js, twa-init.js */
.container.tw_full_match,
.container.tw_player,
.container.tw_team {
  padding: var(--tw-space-0px) !important;
  max-width: 720px;
}

.section_wrapper,
.container,
.four.columns .widget-area {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.the_content_wrapper {
  margin: 0;
}

/* ========== Bootstrap Grid Overrides ========== */
/* Used by: All component files */
.row {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.col,
.col-1,
.col-10,
.col-11,
.col-2,
.col-3,
.col-4,
.col-5,
.col-6,
.col-7,
.col-8,
.col-9,
.col-auto,
.col-lg,
.col-lg-1,
.col-lg-10,
.col-lg-11,
.col-lg-12,
.col-lg-2,
.col-lg-3,
.col-lg-4,
.col-lg-5,
.col-lg-6,
.col-lg-7,
.col-lg-8,
.col-lg-9,
.col-lg-auto,
.col-md,
.col-md-1,
.col-md-10,
.col-md-11,
.col-md-12,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-9,
.col-md-auto,
.col-sm,
.col-sm-1,
.col-sm-10,
.col-sm-11,
.col-sm-12,
.col-sm-2,
.col-sm-3,
.col-sm-4,
.col-sm-5,
.col-sm-6,
.col-sm-7,
.col-sm-8,
.col-sm-9,
.col-sm-auto,
.col-xl,
.col-xl-1,
.col-xl-10,
.col-xl-11,
.col-xl-12,
.col-xl-2,
.col-xl-3,
.col-xl-4,
.col-xl-5,
.col-xl-6,
.col-xl-7,
.col-xl-8,
.col-xl-9,
.col-xl-auto {
  position: relative !important;
  width: 100% !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.col-12 {
  position: relative !important;
  width: 100% !important;
}

/* ========== Padding Utilities ========== */
.p-1 {
  padding: var(--tw-space-0_5rem) 0 !important;
}

.p-3 {
  padding: var(--tw-space-1rem) 0 !important;
}

.no-padding {
  padding: 0 !important;
}

.tw_match_player.p-2 {
  padding: var(--tw-space-0_5rem) 0 !important;
}

.tw_barchart_container.p-3 {
  padding: var(--tw-space-12px) 0 !important;
}

/* ========== Cursor & Interaction ========== */
/* Used by: twa-html.js, twa-utils.js */
.pointer {
  cursor: pointer;
}

.cursor {
  cursor: pointer;
  /* Used for chevron containers */
}

/* ========== FontAwesome Icons ========== */
/* Used by: Throughout all templates */
i.fad {
  padding-right: var(--tw-space-5px);
  font-size: var(--tw-font-size-16px);
  vertical-align: middle;
}

/* ========== Team Logos (Global) ========== */
/* Used by: twa-standings.js, twa-utils.js, top-*.js */
.team-logo-standings {
  height: 25px;
  width: 25px;
  float: left;
  padding: 0 var(--tw-space-3px);
  margin-right: var(--tw-space-2px);
}

.team-logo-standings img {
  max-width: 100%;
}

/* ============================================================================
   3. LOADING STATES & OVERLAYS
   Used by: twa-html.js (GetLoaderHtml), twa-competitions.js, twa-standings.js,
            twa-player.js, top-*.js
   ============================================================================ */

/* ========== Overlay ========== */
.overlay {
  height: 100%;
  width: 100%;
  position: absolute;
  z-index: 0;
  top: 0;
  opacity: 0.5;
  background-color: var(--tw-overlay-bg);
}

/* ========== Loading Spinner ========== */
/* Default loader - white text and dots for dark backgrounds */
.loader {
  display: inline-block;
  position: absolute;
  width: 80px;
  height: 80px;
  top: 45%;
  left: 45%;
  color: var(--tw-text-on-dark-primary);
  font-size: var(--tw-font-size-16px);
}

.loader div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: var(--tw-radius-50percent);
  background: var(--tw-overlay-content-bg);
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

/* Dark loader for white backgrounds (cards view) */
.tw_top_swimoffs_cards .loader,
.tw_top_scorers_cards .loader,
.tw_top_assists_cards .loader,
.tw_top_blockers_cards .loader,
.tw_top_saves_cards .loader,
.tw_top_steals_cards .loader,
.tw_top_turnovers_cards .loader {
  color: var(--tw-surfaces-secondary);
  /* Dark gray text */
}

.tw_top_swimoffs_cards .loader div,
.tw_top_scorers_cards .loader div,
.tw_top_assists_cards .loader div,
.tw_top_blockers_cards .loader div,
.tw_top_saves_cards .loader div,
.tw_top_steals_cards .loader div,
.tw_top_turnovers_cards .loader div {
  background: var(--tw-surfaces-secondary);
  /* Dark gray dots */
}

/* Dark text for status messages on white backgrounds */
.tw_top_swimoffs_cards .tw_group_table tbody td,
.tw_top_scorers_cards .tw_group_table tbody td,
.tw_top_assists_cards .tw_group_table tbody td,
.tw_top_blockers_cards .tw_group_table tbody td,
.tw_top_saves_cards .tw_group_table tbody td,
.tw_top_steals_cards .tw_group_table tbody td,
.tw_top_turnovers_cards .tw_group_table tbody td {
  color: var(--tw-tabs-text-active);
  /* Black text for readability */
}

/* Same for regular table view on white backgrounds */
.tw_top_swimoffs .tw_group_table tbody td,
.tw_top_scorers .tw_group_table tbody td,
.tw_top_assists .tw_group_table tbody td,
.tw_top_blockers .tw_group_table tbody td,
.tw_top_saves .tw_group_table tbody td,
.tw_top_steals .tw_group_table tbody td,
.tw_top_turnovers .tw_group_table tbody td {
  color: var(--tw-text-on-dark-primary);
  /* White text for dark backgrounds */
}

.loader div:nth-child(1) {
  left: 8px;
  animation: lds-ellipsis1 0.8s infinite;
}

.loader div:nth-child(2) {
  left: 8px;
  animation: lds-ellipsis2 0.8s infinite;
}

.loader div:nth-child(3) {
  left: 32px;
  animation: lds-ellipsis2 0.8s infinite;
}

.loader div:nth-child(4) {
  left: 56px;
  animation: lds-ellipsis3 0.8s infinite;
}

/* ========== Loading Animations ========== */
@keyframes lds-ellipsis1 {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes lds-ellipsis3 {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(0);
  }
}

@keyframes lds-ellipsis2 {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(24px, 0);
  }
}

/* ============================================================================
   4. MATCH COMPONENTS (HIERARCHICAL TREE)
   Used by: twa-html.js, twa-match.js, twa-init.js
   ============================================================================ */

/* ========== 4.1 Match Header ========== */
/* Component: .tw_match_head (GetMatchHeadHtml, tw_one_match, tw_match_expanded) */
/* Purpose: Top header bar with back button and competition name */
.tw_match_head {
  overflow: hidden;
  background-color: var(--tw-headers-bg);
  color: var(--tw-text-on-dark-primary);
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  text-align: center;
  line-height: 40px;
  text-transform: uppercase;
}

.tw_match_head i {
  float: left;
  padding-top: var(--tw-space-12px);
  padding-left: var(--tw-space-40px);
}

.tw_match_head span {
  margin-left: var(--tw-space-negative-60px);
}

.tw_match_head span a {
  color: var(--tw-text-on-dark-primary);
}

.tw_match_head .tw-profile-home {
  float: left;
  height: 40px;
  color: inherit;
  outline-offset: -2px;
}

.tw_match_head .tw-profile-brand {
  width: 160px;
  max-width: 50%;
  height: auto;
  vertical-align: middle;
}

/* ========== 4.1b Competition Match Carousel ========== */
/* Component: .tw_match_carousel_wrapper (GetCompetitionMatchCarouselHtml) */
/* Purpose: Arrow-navigated carousel — 1 card mobile, 3 cards desktop */

.tw_match_carousel_wrapper {
  background-color: var(--tw-surfaces-secondary);
  border-bottom: 1px solid var(--tw-border-on-dark);
  position: relative;
  display: flex;
  align-items: stretch;
}

/* Arrow buttons */
.tw_carousel_arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--tw-text-on-dark-primary);
  background-color: transparent;
  transition: opacity 0.2s;
  user-select: none;
  z-index: 2;
}

.tw_carousel_arrow:hover {
  opacity: 0.7;
}

.tw_carousel_arrow.tw_carousel_arrow_disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

.tw_carousel_arrow i {
  font-size: var(--tw-font-size-14px);
}

/* Viewport clips overflow; track slides inside it */
.tw_match_carousel_viewport {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.tw_match_carousel_track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.3s ease;
}

/* Cards: 100% on mobile (1 visible), 33.333% on desktop (3 visible) */
.tw_carousel_card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 0 0 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: var(--tw-space-5px) var(--tw-space-10px);
  color: var(--tw-text-on-dark-primary);
  text-decoration: none !important;
  border-right: 1px solid var(--tw-border-faint);
  transition: background-color 0.2s;
  cursor: pointer;
  gap: var(--tw-space-2px);
}

@media (min-width: 768px) {
  .tw_carousel_card {
    flex: 0 0 33.333%;
    max-width: 33.333%;
  }
}

.tw_carousel_card:hover {
  background-color: var(--tw-surfaces-hover);
  color: var(--tw-text-on-dark-primary);
  text-decoration: none !important;
}

.tw_carousel_card_active {
  background-color: var(--tw-surface-faint);
  border-bottom: 2px solid var(--tw-palette-primary-blue);
}

.tw_carousel_card_active:hover {
  background-color: var(--tw-surface-active);
}

/* Main matchup row: Logo Name  Score-Score  Name Logo */
.tw_carousel_matchup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--tw-space-6px);
  width: 100%;
}

.tw_carousel_team_logo {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.tw_carousel_team_logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--tw-radius-50percent);
}

.tw_carousel_team_name {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-11px);
  white-space: nowrap;
}

.tw_carousel_score_block {
  display: flex;
  align-items: center;
  gap: var(--tw-space-3px);
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-13px);
  min-width: 36px;
  justify-content: center;
}

.tw_carousel_score_sep {
  opacity: 0.5;
  font-size: var(--tw-font-size-10px);
}

/* Meta line: status · date · round */
.tw_carousel_meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--tw-space-4px);
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-9px);
  color: var(--tw-text-on-dark-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tw_carousel_meta_sep {
  opacity: 0.4;
}

.tw_carousel_status_label {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-8px);
  text-transform: uppercase;
  letter-spacing: var(--tw-space-0_3px);
}

.tw_carousel_status_label.carousel-status-finished {
  color: var(--tw-palette-bar-green);
}

.tw_carousel_status_label.carousel-status-active {
  color: var(--tw-palette-bar-green);
}

.tw_carousel_status_label.carousel-status-not-started {
  color: var(--tw-text-on-dark-muted);
}

/* ========== 4.2 Match Container & Tabs ========== */
/* Component: .tw_full_match (GetMatchHeadHtml) */
/* Purpose: Full match page wrapper with tabs */
.tw_full_match .tab-pane {
  min-height: 500px;
  background-color: var(--tw-surfaces-primary);
}

.tw_full_match .nav-tabs {
  background-color: var(--tw-surfaces-primary);
  font-size: var(--tw-font-size-11px);
  font-family: var(--tw-font-heavy);
  border: none;
  display: flex;
  flex-wrap: nowrap;
}

.tw_full_match .nav-tabs .nav-link {
  color: var(--tw-text-on-dark-primary) !important;
  background-color: transparent;
  border: 2px solid var(--tw-border-on-dark) !important;
  text-decoration: none !important;
  text-transform: uppercase;
  border-radius: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

.tw_full_match .nav-tabs .nav-item.show .nav-link,
.tw_full_match .nav-tabs .nav-link.active {
  color: var(--tw-tabs-text-active) !important;
  background-color: var(--tw-tabs-bg-active) !important;
  border: 2px solid var(--tw-border-on-dark) !important;
  text-decoration: none !important;
  border-radius: 0;
  border-bottom: none;
  box-sizing: border-box;
  flex-shrink: 0;
}

.tw_full_match .nav-link i.fas,
.tw_full_match .nav-link i.fa,
.tw_full_match .nav-link i.far {
  padding-right: var(--tw-space-5px);
  font-size: var(--tw-font-size-16px);
}

/* ========== 4.3 Match Detailed View ========== */
/* Component: .tw_match_detailed (GetMatchHeadHtml) */
/* Purpose: Full match display with teams, score, quarters */
.tw_match_detailed {
  font-family: var(--tw-font-book);
  background-image: linear-gradient(
    180deg,
    var(--tw-surfaces-gradient-start) 0%,
    var(--tw-surfaces-gradient-end) 100%
  );
  color: var(--tw-text-on-dark-primary);
  font-size: var(--tw-font-size-14px);
}

/* ===== Match Details Text ===== */
.tw_match_detailed .details {
  text-align: center;
  line-height: 1.14;
  opacity: 0.8;
}

/* ===== Team Logos ===== */
.tw_match_detailed .teamlogo {
  width: 63px;
  height: 63px;
  border-radius: var(--tw-radius-10px);
  margin: auto;
}

.tw_match_detailed .teamlogo img {
  height: 100%;
}

/* ===== Score Display ===== */
.tw_match_detailed .score {
  font-size: var(--tw-font-size-36px);
  text-align: center;
  line-height: 1.63;
  font-family: var(--tw-font-heavy);
  padding: 0 var(--tw-space-5px);
  text-shadow: 2px 2px 4px var(--tw-shadow-md);
}

a.score {
  color: var(--tw-text-on-dark-primary);
  text-decoration: none !important;
}

.score-container {
  display: flex;
  align-self: center;
  justify-content: center;
}

/* ===== Team Labels ===== */
.tw_match_detailed .teamlabel {
  font-size: var(--tw-font-size-16px);
  font-family: var(--tw-font-heavy);
  line-height: 1.19;
  letter-spacing: var(--tw-space-0_4px);
  text-transform: uppercase;
  text-align: center;
}

/* ===== Match Status ===== */
.tw_match_detailed .status {
  font-size: var(--tw-font-size-16px);
  line-height: 1.19;
  text-align: center;
}

/* ===== Quarter Scores ===== */
.tw_match_detailed .part_score_div {
  border-bottom: 1px solid;
  border-left: 1px solid var(--tw-border-on-dark);
  text-align: center;
  border-top: 1px solid;
}

.tw_match_detailed .part_score_div:first-child,
.col.part_score_div:first-child,
.part_score_div:first-child {
  border-left: none;
}

.tw_match_detailed .part_name {
  font-size: var(--tw-font-size-9px);
  line-height: 1.44;
  font-family: var(--tw-font-book);
}

.tw_match_detailed .part_score {
  font-family: var(--tw-font-heavy);
}

/* ===== Active Match Indicator ===== */
.tw_match_detailed .img_active {
  height: 10px;
  vertical-align: top;
  margin-left: var(--tw-space-5px);
}

/* ===== Compact Simple Match Layout ===== */
/* Component: .tw_match_simple_compact (GetMatchHeadSimpleHtml) */
/* Purpose: Reduced height version for tw_match_active_next_simple_preload */
.tw_match_simple_compact {
  padding: 0 !important;
}

.tw_match_simple_compact .tw_match_detailed_compact {
  padding: var(--tw-space-8px) 0;
}

.tw_match_simple_compact .tw_match_detailed_compact .row {
  margin: 0;
}

.tw_match_simple_compact .teamlogo-compact {
  width: 50px;
  height: 50px;
  margin: 0 auto var(--tw-space-4px) auto;
}

.tw_match_simple_compact .teamlabel-compact {
  font-size: var(--tw-font-size-14px);
  padding: 0;
  margin: 0;
}

.tw_match_simple_compact .details-compact {
  font-size: var(--tw-font-size-12px);
  padding: 0;
  margin-bottom: var(--tw-space-2px);
  opacity: 0.8;
}

.tw_match_simple_compact .score-compact {
  font-size: var(--tw-font-size-24px);
  line-height: 1.2;
  padding: 0;
}

.tw_match_simple_compact .status-compact {
  font-size: var(--tw-font-size-14px);
  padding: var(--tw-space-2px) 0 0 0;
  margin: 0;
}

.tw_match_simple_compact .status-compact .status-label {
  padding: var(--tw-space-4px) var(--tw-space-12px);
  font-size: var(--tw-font-size-12px);
}

/* ===== Last Event Container (Preload Widgets) ===== */
/* Component: .tw_last_event_container (GetLastEventHtml) */
/* Purpose: Shows last event in preload widgets for live matches */
/* Inherits all styles from .tw_play_by_play */
.tw_last_event_container {
  margin-top: 0;
  cursor: pointer;
}

.tw_last_event_container:hover {
  opacity: 0.85;
}

.tw_last_event {
  cursor: pointer;
}

.tw_last_event > .row {
  min-height: 50px;
  align-items: center;
}

/* Loading/placeholder state */
.tw_last_event_loading {
  background-color: var(--tw-surfaces-primary);
}

.tw_last_event_loading .last-event-cta {
  padding: var(--tw-space-8px) 0;
}

.tw_last_event_loading .loading-text {
  font-size: var(--tw-font-size-12px);
  opacity: 0.7;
  font-family: var(--tw-font-book);
}

.tw_last_event_loading .cta-text {
  font-size: var(--tw-font-size-14px);
  font-family: var(--tw-font-heavy);
  margin-top: var(--tw-space-4px);
}

.tw_last_event_loading .cta-text i {
  margin-left: var(--tw-space-5px);
}

/* Last event CTA arrow column */
.tw_last_event .last-event-cta-arrow {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: var(--tw-space-4px);
  overflow: hidden;
  padding-left: var(--tw-space-8px);
}

.tw_last_event .last-event-cta-arrow .cta-label {
  font-size: var(--tw-font-size-10px);
  opacity: 0.8;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

.tw_last_event .last-event-cta-arrow i {
  font-size: var(--tw-font-size-14px);
}

/* ========== 4.4 Match Basic View (List Item) ========== */
/* Component: .tw_match_basic (GetBasicMatchDiv) */
/* Purpose: Compact match display for lists */
/* Redesigned: January 2026 - Follows design system */
.tw_match_basic {
  min-height: 4em;
  color: var(--tw-text-on-dark-primary);
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  border-bottom: 1px solid var(--tw-border-on-dark);
  box-sizing: border-box;
  padding: var(--tw-space-8px) 0;
}

.tw_match_basic:nth-child(even) {
  background-color: var(--tw-surfaces-secondary);
}

.tw_match_basic:nth-child(odd) {
  background-color: var(--tw-surfaces-primary);
}

/* ===== Group Number ===== */
.tw_match_basic .tw_group {
  color: var(--tw-text-on-dark-primary);
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-18px);
  text-align: center;
  line-height: 65px;
  padding: 0;
}

/* ===== Team Display ===== */
.tw_match_basic .tw_teams {
  padding: var(--tw-space-4px) 0;
}

.tw_match_basic .tw_teams .tw_team_row {
  margin-bottom: var(--tw-space-4px);
}

.tw_match_basic .tw_teams .tw_logo {
  height: 28px;
  width: 28px;
  margin: auto;
  display: block;
  padding: 0 var(--tw-space-3px);
  float: left;
}

.tw_match_basic .tw_teams .tw_logo img {
  height: auto;
  width: 100%;
  margin-top: var(--tw-space-2px);
}

.tw_match_basic .tw_teams .tw_name {
  font-family: var(--tw-font-book);
  color: var(--tw-text-on-dark-primary);
  text-align: left;
  letter-spacing: var(--tw-space-0_5px);
  line-height: 28px;
  font-size: var(--tw-font-size-16px);
  margin-left: var(--tw-space-4px);
}

.tw_match_basic .tw_teams .tw_goals {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-16px);
  color: var(--tw-text-on-dark-primary);
  text-align: center;
  line-height: 28px;
}

/* ===== Match Details Link ===== */
.tw_match_basic .tw_details {
  border-left: 1px solid var(--tw-border-on-dark);
  text-align: center;
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-16px);
  line-height: 1.2;
  padding-left: var(--tw-space-4px) !important;
  display: flex;
  align-self: center;
}

.tw_match_basic .tw_details a {
  color: var(--tw-text-on-dark-primary);
  vertical-align: middle;
  text-decoration: none !important;
  margin: 0 auto;
  padding: var(--tw-space-8px) 0;
  font-family: var(--tw-font-heavy);
}

/* ========== 4.5 Match Time & Date ========== */
/* Used by: twa-match.js (SetMatchData) */
.match-time {
  color: var(--tw-text-on-dark-primary);
  text-shadow: 1px 3px 3px var(--tw-shadow-sm);
  font-size: var(--tw-font-size-16px);
}

span.date-label {
  font-size: var(--tw-font-size-13px);
  opacity: 0.7;
}

.match-link {
  color: var(--tw-text-on-dark-primary);
  text-shadow: 1px 5px 5px var(--tw-shadow-md);
  font-size: var(--tw-font-size-24px);
}

.tw_match_date {
  color: var(--tw-text-on-dark-muted);
  font-size: var(--tw-font-size-12px);
  display: block;
  text-align: center;
  margin: var(--tw-space-10px);
}

/* ========== 4.6 Status Labels ========== */
/* Used by: twa-html.js (GetMatchHeadHtml), twa-match.js */
.status-label {
  display: block;
  padding: var(--tw-space-3px) var(--tw-space-15px);
  text-transform: lowercase;
  color: var(--tw-text-on-dark-primary);
  /* White for "finished" */
}

/* Status label color variants */
.status-label.status-finished {
  color: var(--tw-text-on-dark-primary);
}

.status-label.status-active {
  color: var(--tw-accent-positive);
}

a.status-label-link {
  text-decoration: none;
  background-color: var(--tw-panels-bg-muted);
  border-radius: var(--tw-radius-17px);
  display: inline-block;
  box-shadow: 0 3px 6px var(--tw-shadow-sm);
}

a.status-label-link:hover {
  background-color: var(--tw-panels-bg);
  text-decoration: none;
}

/* ========== 4.7 Live Match Indicator ========== */
/* Used by: twa-match.js (for active matches) */
.blink-image {
  -moz-animation: blink normal 1s infinite ease-in-out;
  -webkit-animation: blink normal 1s infinite ease-in-out;
  -ms-animation: blink normal 1s infinite ease-in-out;
  animation: blink normal 1s infinite ease-in-out;
  height: 0px !important;
  border: 5px solid;
  border-radius: var(--tw-radius-5px);
  border-color: var(--tw-cards-border);
  margin-top: var(--tw-space-10px);
  position: absolute;
}

@-moz-keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@-webkit-keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@-ms-keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* ========== 4.8 Match Startlist Tabs ========== */
/* Used by: twa-html.js (GetMatchStatsDiv) */
/* HOME / AWAY / REF buttons - pill-shaped when active */
.tw_match_startlist_tabs {
  background-image: linear-gradient(
    180deg,
    var(--tw-surfaces-gradient-start) 0%,
    var(--tw-surfaces-gradient-end) 100%
  );
}

.tw_match_startlist_tabs .nav-link {
  color: var(--tw-text-on-dark-primary) !important;
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-11px);
  border: none;
  background-color: transparent;
  padding: var(--tw-space-5px) var(--tw-space-15px);
}

.tw_match_startlist_tabs .nav-link.active {
  border-radius: var(--tw-radius-17px);
  background-color: var(--tw-tabs-bg-active) !important;
  color: var(--tw-tabs-text-active) !important;
  border: 2px solid var(--tw-border-on-dark);
  padding: var(--tw-space-5px) var(--tw-space-15px);
}

/* ========== 4.9 Match Player List ========== */
/* Component: .tw_match_player (GetPlayerDiv, GetGoalkeeperDiv) */
/* Purpose: Player rows in startlist */
.tw_match_player {
  color: var(--tw-text-on-dark-primary);
  font-size: var(--tw-font-size-16px);
  line-height: 22px;
  font-family: var(--tw-font-book);
}

.tw_match_player:nth-child(even) {
  background-color: var(--tw-surfaces-secondary);
}

.tw_match_player:nth-child(odd) {
  background-color: var(--tw-surfaces-primary);
}

.tw_match_player .value {
  font-family: var(--tw-font-heavy);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding-top: var(--tw-space-3px);
}

/* ===== Player List Header ===== */
.tw_match_player_head {
  background-color: var(--tw-cards-bg);
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-cards-text-muted);
  box-shadow: 0 3px 6px var(--tw-shadow-sm);
  -moz-box-shadow: 0px 3px 6px var(--tw-shadow-sm);
  -webkit-box-shadow: 0px 3px 6px var(--tw-shadow-sm);
}

/* ===== Player Name & Number ===== */
div.name-label {
  line-height: 1.3;
  align-items: center;
  justify-content: left;
  display: flex;
  min-height: 40px;
  cursor: pointer;
  font-family: var(--tw-font-book);
}

.player-name {
  line-height: 1.2;
  font-family: var(--tw-font-book);
}

.player-number-container {
  align-self: center;
  justify-content: center;
  display: flex;
  line-height: 50px;
  font-family: var(--tw-font-heavy);
}

/* ===== Expandable Player Details ===== */
/* Used by: twa-html.js (GetPlayerDiv), twa-utils.js (TooglePlayerDetails) */
.playerDetails.pt-3.pb-1 {
  padding: 0 !important;
  box-shadow: 0 0 20px var(--tw-shadow-inset) inset;
  -moz-box-shadow: 0 0px 20px var(--tw-shadow-inset) inset;
  -webkit-box-shadow: 0 0px 20px var(--tw-shadow-inset) inset;
}

.playerDetails .tab-pane {
  background-image: none !important;
  min-height: 200px !important;
}

/* ===== Show/Hide Details Icon ===== */
span.showDetails {
  padding-left: var(--tw-space-10px);
}

.expand-container {
  align-self: center;
  justify-content: center;
  line-height: 50px;
}

.col-2.text-center.cursor {
  display: flex;
  align-self: center;
  justify-content: center;
  text-shadow: 2px 3px 4px var(--tw-shadow-text);
  padding-top: var(--tw-space-3px);
}

/* ========== 4.10 Legacy Match Styles ========== */
/* Note: These may be legacy or unused */
.tw_match_page_title {
  padding: var(--tw-space-0px) var(--tw-space-20px) var(--tw-space-10px) var(--tw-space-20px);
  margin: 0 !important;
}

.tw_match_page_div {
  text-align: center;
  margin: var(--tw-space-20px) var(--tw-space-0px);
  font-size: var(--tw-font-size-14px);
}

.tw_match_details {
  border: 1px solid var(--tw-text-on-dark-muted);
  padding: var(--tw-space-0px) var(--tw-space-20px) var(--tw-space-10px) var(--tw-space-20px);
  margin: 0 !important;
}

.tw_label {
  font-weight: 500;
  color: var(--tw-text-on-dark-muted);
  text-align: left;
}

.tw_result {
  font-size: var(--tw-font-size-20px);
  text-align: center;
  margin: 0;
  padding: 0;
}

h3.tw_match_title {
  font-size: var(--tw-font-size-24px);
  text-align: center;
  margin: 0;
  padding: 0;
}

h4.tw_match_title {
  font-size: var(--tw-font-size-20px);
  text-align: center;
  margin: 0;
  padding: 0;
}

.tw_team_logo {
  height: 2em;
}

/* ============================================================================
   5. PLAYER COMPONENTS (HIERARCHICAL TREE)
   Used by: twa-html.js, twa-player.js
   ============================================================================ */

/* ========== 5.1 Player Profile Container ========== */
/* Component: .tw_player (GetPlayerProfileDiv) */
/* Purpose: Player profile page wrapper */
/* Redesigned: January 2026 - Follows design system */
.tw_player {
  color: var(--tw-text-on-dark-primary);
  font-size: var(--tw-font-size-14px);
  line-height: 22px;
  font-family: var(--tw-font-book);
}

/* ========== 5.2 Player Profile Header ========== */
/* Component: .tw_player_head (GetPlayerProfileDiv) */
/* Purpose: Top section with photo, name, basic info */
/* Redesigned: January 2026 - Follows design system */
.tw_player_head {
  background-image: linear-gradient(
    180deg,
    var(--tw-surfaces-gradient-start) 0%,
    var(--tw-surfaces-gradient-end) 100%
  );
  color: var(--tw-text-on-dark-primary);
}

/* ===== Player Photo ===== */
.tw_player_head .profilepic-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tw_player_head .profilepic-placeholder img {
  height: 90px;
  max-width: 100%;
  border-radius: var(--tw-radius-50percent);
}

/* ===== Team Logo ===== */
.tw_player_head .teamlogo-placeholder img {
  height: 90px;
  max-width: 100%;
}

/* ===== Player Name ===== */
.tw_player_head .name {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-21px);
  text-align: left;
  color: var(--tw-text-on-dark-primary);
}

.col-6.player-name-container {
  padding: var(--tw-space-10px) var(--tw-space-0px) var(--tw-space-10px) var(--tw-space-10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: var(--tw-font-book);
}

/* ===== Club & Birthday ===== */
.tw_player_head .clubs {
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  text-align: left;
  color: var(--tw-text-on-dark-primary);
  font-weight: 300;
  line-height: 1;
}

.tw_player_head .birthday {
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  text-align: left;
  color: var(--tw-text-on-dark-primary);
  font-weight: 300;
  line-height: 20px;
}

.tw_player_head .birthday i {
  font-size: var(--tw-font-size-14px);
  line-height: 21px;
}

/* ===== Player Details (Position, Hand, Height, Weight) ===== */
.tw_player_head .data-label {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-11px);
  letter-spacing: var(--tw-space-0_55px);
  text-align: left;
  color: var(--tw-text-on-dark-primary);
  text-transform: uppercase;
}

.tw_player_head .data-value {
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  letter-spacing: var(--tw-space-0_55px);
  text-align: left;
  color: var(--tw-text-on-dark-primary);
}

.col-3.player-details-icon {
  display: flex;
  align-self: center;
  justify-content: center;
  font-size: var(--tw-font-size-21px);
}

/* ========== 5.3 Player Profile Tabs ========== */
/* Used by: twa-html.js (GetPlayerProfileDiv) */
/* Redesigned: January 2026 - Follows design system */
.tw_player .nav-tabs {
  background-color: var(--tw-surfaces-primary);
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-11px);
  border: none;
  margin: 0;
}

.tw_player .nav-tabs .nav-link {
  color: var(--tw-text-on-dark-primary) !important;
  background-color: transparent;
  border: 2px solid var(--tw-border-on-dark) !important;
  text-decoration: none !important;
  font-family: var(--tw-font-heavy);
  text-transform: uppercase;
  border-radius: 0;
}

.tw_player .nav-tabs .nav-item.show .nav-link,
.tw_player .nav-tabs .nav-link.active {
  color: var(--tw-tabs-text-active) !important;
  background-color: var(--tw-tabs-bg-active) !important;
  border: 2px solid var(--tw-border-on-dark) !important;
  border-radius: 0;
  text-decoration: none !important;
}

.tw_player .nav-link i.fas,
.tw_player .nav-link i.fa,
.tw_player .nav-link i.far {
  padding-right: var(--tw-space-5px);
  font-size: var(--tw-font-size-16px);
}

.tw_player .tab-pane {
  min-height: 300px;
  background-color: var(--tw-surfaces-primary);
}

/* Player profile — CAREER tab (club / national timeline from stats API) */
.tw_player .tw_player_lifetime_wrap {
  padding: var(--tw-space-12px) var(--tw-space-14px) var(--tw-space-20px);
  font-family: var(--tw-font-book);
  color: var(--tw-text-on-dark-primary);
}

.tw_player .tw_player_lifetime_disclaimer {
  margin: 0 0 var(--tw-space-12px) 0;
  font-size: var(--tw-font-size-12px);
  line-height: 1.45;
  font-style: italic;
  opacity: 0.88;
}

.tw_player .tw_player_lifetime_body {
  min-height: 40px;
}

.tw_player .tw_player_lifetime_hint,
.tw_player .tw_player_lifetime_loading,
.tw_player .tw_player_lifetime_empty,
.tw_player .tw_player_lifetime_err {
  margin: 0;
  font-size: var(--tw-font-size-14px);
  line-height: 1.45;
  opacity: 0.92;
}

.tw_player .tw_player_lifetime_err {
  color: var(--tw-stat-negative);
}

.tw_player .tw_pl_timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--tw-space-16px) var(--tw-space-22px);
  align-items: start;
}

@media (max-width: 700px) {
  .tw_player .tw_pl_timeline {
    grid-template-columns: 1fr;
  }
}

.tw_player .tw_pl_col {
  background: var(--tw-surfaces-secondary);
  border: 1px solid var(--tw-border-on-dark);
  padding: var(--tw-space-14px) var(--tw-space-12px) var(--tw-space-16px);
  min-height: 80px;
}

.tw_player .tw_pl_col_h {
  margin: 0 0 var(--tw-space-4px) 0;
  font-size: var(--tw-font-size-15px);
  font-family: var(--tw-font-heavy);
  text-transform: uppercase;
  letter-spacing: var(--tw-space-0_04em);
  color: var(--tw-text-on-dark-primary);
}

.tw_player .tw_pl_col_sub {
  margin: 0 0 var(--tw-space-12px) 0;
  font-size: var(--tw-font-size-12px);
  opacity: 0.85;
}

.tw_player .tw_pl_track {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tw_player .tw_pl_club {
  position: relative;
  padding-left: var(--tw-space-12px);
  margin-bottom: var(--tw-space-16px);
  border-left: 3px solid var(--tw-career-club-border);
}

.tw_player .tw_pl_col_nat .tw_pl_club {
  border-left-color: var(--tw-career-national-border);
}

.tw_player .tw_pl_club_head {
  display: flex;
  align-items: flex-start;
  gap: var(--tw-space-10px);
  margin-bottom: var(--tw-space-8px);
}

.tw_player .tw_pl_club_block {
  min-width: 0;
  flex: 1;
}

.tw_player .tw_pl_club_line1 {
  font-size: var(--tw-font-size-15px);
  line-height: 1.35;
}

.tw_player .tw_pl_club_line2 {
  font-size: var(--tw-font-size-11px);
  line-height: 1.3;
  opacity: 0.82;
  margin-top: var(--tw-space-4px);
}

.tw_player .tw_pl_logo_wrap {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tw-surface-subtle);
  border: 1px solid var(--tw-border-on-dark);
  border-radius: var(--tw-radius-8px);
  overflow: hidden;
}

.tw_player .tw_pl_team_logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.tw_player .tw_pl_club_name {
  font-weight: 600;
  font-size: var(--tw-font-size-15px);
}

.tw_player .tw_pl_teams {
  margin-top: var(--tw-space-4px);
  padding-left: var(--tw-space-4px);
}

.tw_player .tw_pl_team {
  margin-bottom: var(--tw-space-12px);
  padding-bottom: var(--tw-space-10px);
  border-bottom: 1px solid var(--tw-border-on-dark);
}

.tw_player .tw_pl_team:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.tw_player .tw_pl_team_head {
  font-size: var(--tw-font-size-13px);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: var(--tw-space-10px);
}

.tw_player .tw_pl_team_head .tw_pl_logo_wrap {
  width: 36px;
  height: 36px;
}

.tw_player .tw_pl_team_block {
  min-width: 0;
  flex: 1;
}

.tw_player .tw_pl_team_line1 {
  font-size: var(--tw-font-size-13px);
  line-height: 1.35;
}

.tw_player .tw_pl_team_line1 .tw_pl_team_name {
  font-family: var(--tw-font-heavy);
  font-weight: inherit;
}

.tw_player .tw_pl_team_dash {
  font-weight: normal;
  opacity: 0.55;
}

.tw_player .tw_pl_team_cat {
  font-weight: normal;
  opacity: 0.88;
}

.tw_player .tw_pl_team_line2 {
  font-size: var(--tw-font-size-11px);
  line-height: 1.3;
  opacity: 0.82;
  margin-top: var(--tw-space-4px);
}

.tw_player .tw_pl_stints {
  margin-top: var(--tw-space-5px);
}

.tw_player .tw_pl_stint {
  margin-bottom: var(--tw-space-5px);
}

.tw_player .tw_pl_stint:last-child {
  margin-bottom: 0;
}

.tw_player .tw_pl_comps {
  font-size: var(--tw-font-size-10px);
  line-height: 1.3;
  opacity: 0.88;
  letter-spacing: var(--tw-space-0_01em);
}

.tw_player .tw_pl_comp_sep {
  display: inline;
  padding: 0 var(--tw-space-1px);
  font-size: var(--tw-font-size-9px);
  opacity: 0.45;
  vertical-align: 0.05em;
}

.tw_player .tw_pl_empty {
  margin: 0;
  font-size: var(--tw-font-size-13px);
  opacity: 0.75;
}

/* ========== 5.4 Player Statistics Section ========== */
/* Component: .playerStats (GetPlayerProfileDiv) */
/* Purpose: List of player stats */
/* Redesigned: January 2026 - Follows design system */
.playerStats {
  border-top: 1px solid var(--tw-border-on-dark);
  line-height: 30px;
  font-family: var(--tw-font-book);
  padding: 0;
  box-sizing: border-box;
}

.playerStats .row {
  padding: var(--tw-space-10px);
  margin: 0;
}

.playerStats .row:nth-child(odd) {
  background-color: var(--tw-surfaces-primary);
}

.playerStats .row:nth-child(even) {
  background-color: var(--tw-surfaces-secondary);
}

.playerStats .label {
  text-transform: uppercase;
  padding: var(--tw-space-5px);
  text-align: left;
  font-size: var(--tw-font-size-14px);
  font-family: var(--tw-font-book);
  letter-spacing: var(--tw-space-0_5px);
  color: var(--tw-text-on-dark-primary);
}

.playerStats .value {
  padding: var(--tw-space-5px);
  text-align: right;
  font-size: var(--tw-font-size-16px);
  font-family: var(--tw-font-heavy);
  color: var(--tw-text-on-dark-primary);
}

/* ============================================================================
   6. TEAM COMPONENTS (HIERARCHICAL TREE)
   Used by: twa-html.js, twa-team.js
   ============================================================================ */

/* ========== 6.1 Team Profile Container ========== */
/* Component: .tw_team (GetTeamProfileDiv) */
/* Purpose: Team profile page wrapper */
.tw_team {
  font-family: var(--tw-font-book);
  color: var(--tw-text-on-dark-primary);
  font-size: var(--tw-font-size-14px);
  line-height: 20px;
}

/* ========== 6.2 Team Profile Header ========== */
/* Component: .tw_team_head (GetTeamProfileDiv) */
/* Purpose: Top section with logo and name */
.tw_team_head {
  background-image: linear-gradient(
    180deg,
    var(--tw-surfaces-gradient-start) 0%,
    var(--tw-surfaces-gradient-end) 100%
  );
  color: var(--tw-text-on-dark-primary);
  min-height: 120px;
}

/* ===== Team Logo ===== */
.tw_team_head .teamlogo-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--tw-space-10px);
}

.tw_team_head .teamlogo-placeholder img {
  max-height: 100px;
  max-width: 100%;
}

/* ===== Team Name ===== */
.tw_team_head .name {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-24px);
  text-align: left;
  color: var(--tw-text-on-dark-primary);
  display: flex;
  align-items: center;
  min-height: 50px;
}

.tw_team_head .team-location {
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  text-align: left;
  color: var(--tw-text-on-dark-primary);
  display: flex;
  align-items: center;
  margin-top: var(--tw-space-5px);
}

.col-8.team-name-container {
  padding: var(--tw-space-10px) var(--tw-space-0px) var(--tw-space-10px) var(--tw-space-10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ========== 6.3 Team Profile Tabs ========== */
/* Used by: twa-html.js (GetTeamProfileDiv) */
.tw_team .nav-tabs {
  background-color: var(--tw-surfaces-primary);
  font-family: var(--tw-font-heavy);
  color: var(--tw-text-on-dark-primary);
  border: none;
  font-size: var(--tw-font-size-12px);
}

.tw_team .nav-tabs .nav-link {
  color: var(--tw-text-on-dark-primary);
  background-color: var(--tw-headers-bg);
  border: 1px solid var(--tw-border-on-dark);
  border-radius: 0;
}

.tw_team .nav-tabs .nav-item.show .nav-link,
.tw_team .nav-tabs .nav-link.active {
  background-color: var(--tw-tabs-bg-active) !important;
  color: var(--tw-tabs-text-active) !important;
  border: 1px solid var(--tw-border-on-dark);
  border-bottom: none;
  border-radius: 0;
}

/* ===== No Matches Message ===== */
.no-matches-message {
  display: inline-block;
  position: absolute;
  width: 100%;
  text-align: center;
  font-family: var(--tw-font-heavy);
  color: var(--tw-text-on-dark-primary);
  text-transform: uppercase;
  padding: var(--tw-space-20px);
  top: 45%;
  left: 0;
  font-size: var(--tw-font-size-16px);
  letter-spacing: var(--tw-space-1px);
}

.tw_team .nav-link i.fas,
.tw_team .nav-link i.fa,
.tw_team .nav-link i.far,
.tw_team .nav-link i.fad {
  padding-right: var(--tw-space-5px);
  font-size: var(--tw-font-size-16px);
}

.tw_team .tab-pane {
  min-height: 300px;
  background-color: var(--tw-surfaces-primary);
}

/* ============================================================================
   7. COMPETITION & STANDINGS COMPONENTS
   Used by: twa-html.js, twa-competitions.js, twa-standings.js
   ============================================================================ */

/* ========== 7.1 Competition First Match Container ========== */
/* Component: .tw_competition_first_match (GetNextActiveMatchHtml) */
/* Purpose: Shows next/active match for a competition */
/* Redesigned: January 2026 - Follows design system */
.tw_competition_first_match {
  font-family: var(--tw-font-book);
  background-color: var(--tw-surfaces-primary);
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
}

/* ========== 7.2 Competition Matches Container ========== */
/* Component: .tw_competition_matches (GetCompetitionMatchesHtml, GetUpcomingMatchesHtml) */
/* Purpose: Competition fixtures wrapper */
/* Redesigned: January 2026 - Follows design system */
.tw_competition_matches {
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  background-color: var(--tw-surfaces-primary);
}

/* ===== Competition Matches Inner Container ===== */
.tw_competition_matches .competitionMatches {
  background-color: var(--tw-surfaces-primary);
}

/* ===== Title Header ===== */
.tw_competition_matches .tw_group_title {
  background-color: var(--tw-headers-bg);
  color: var(--tw-text-on-dark-primary);
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-18px);
  text-transform: uppercase;
  padding: var(--tw-space-12px);
  text-align: center;
  border-bottom: 2px solid var(--tw-border-on-dark);
}

/* ===== Matches Background ===== */
.tw_competition_matches .matches_wrap {
  position: relative;
  background-color: var(--tw-surfaces-primary);
  min-height: 200px;
}

/* ===== Table Styling ===== */
.tw_competition_matches .tw_group_table {
  width: 100%;
  background-color: var(--tw-surfaces-primary);
  border-collapse: collapse;
  margin: 0;
}

.tw_competition_matches .tw_group_table thead tr {
  background-color: var(--tw-headers-bg);
  border-bottom: 2px solid var(--tw-border-on-dark) !important;
}

.tw_competition_matches .tw_group_table thead td {
  font-family: var(--tw-font-heavy);
  text-transform: uppercase;
  color: var(--tw-text-on-dark-primary);
  padding: var(--tw-space-12px) var(--tw-space-8px);
  text-align: center;
}

.tw_competition_matches .tw_group_table thead td.text-left {
  text-align: left;
}

.tw_competition_matches .tw_group_table tbody tr:nth-child(even) {
  background-color: var(--tw-surfaces-secondary);
}

.tw_competition_matches .tw_group_table tbody tr:nth-child(odd) {
  background-color: var(--tw-surfaces-primary);
}

.tw_competition_matches .tw_group_table tbody tr {
  border-bottom: 1px solid var(--tw-border-on-dark);
}

.tw_competition_matches .tw_group_table tbody tr:last-child {
  border-bottom: none;
}

.tw_competition_matches .tw_group_table .rownum {
  font-family: var(--tw-font-heavy);
  color: var(--tw-text-on-dark-primary);
  text-align: center;
  padding: var(--tw-space-12px) var(--tw-space-8px);
  width: 40px;
}

.tw_competition_matches .tw_group_table .value {
  font-family: var(--tw-font-heavy);
  color: var(--tw-text-on-dark-primary);
  text-align: center;
  padding: var(--tw-space-12px) var(--tw-space-8px);
}

.tw_competition_matches .tw_group_table .text-left {
  text-align: left;
}

.tw_competition_matches .tw_group_table .team {
  display: flex;
  align-items: center;
  padding: var(--tw-space-8px);
}

.tw_competition_matches .tw_group_table .team .name {
  font-family: var(--tw-font-book);
  color: var(--tw-text-on-dark-primary);
}

.tw_competition_matches .tw_group_table .team-logo-standings {
  height: 28px;
  width: 28px;
  display: inline-block;
  vertical-align: middle;
}

.tw_competition_matches .tw_group_table .team-logo-standings img {
  width: 100%;
  height: auto;
}

/* ===== FIXTURES Header (using tw_group_wrap) ===== */
.tw_competition_matches .tw_group_wrap {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-text-on-dark-primary);
  background-color: var(--tw-headers-bg);
  text-align: center;
  line-height: 40px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--tw-border-on-dark);
  margin: 0;
  padding: 0;
}

/* ===== Competition Tabs (COMPLETED/UPCOMING) ===== */
.tw_competition_matches .nav-tabs {
  background-color: var(--tw-surfaces-primary);
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-11px);
  border: none;
  margin: 0;
}

.tw_competition_matches .nav-tabs .nav-link {
  color: var(--tw-text-on-dark-primary) !important;
  background-color: transparent;
  border: 2px solid var(--tw-border-on-dark) !important;
  text-decoration: none !important;
  font-family: var(--tw-font-heavy);
  text-transform: uppercase;
  border-radius: 0;
}

.tw_competition_matches .nav-tabs .nav-item.show .nav-link,
.tw_competition_matches .nav-tabs .nav-link.active {
  color: var(--tw-tabs-text-active) !important;
  background-color: var(--tw-tabs-bg-active) !important;
  border: 2px solid var(--tw-border-on-dark) !important;
  border-radius: 0;
  text-decoration: none !important;
}

.tw_competition_matches .nav-link i.fas,
.tw_competition_matches .nav-link i.fa,
.tw_competition_matches .nav-link i.far {
  padding-right: var(--tw-space-5px);
  font-size: var(--tw-font-size-16px);
}

/* ===== Tab Panes ===== */
.tw_competition_matches .tab-pane {
  min-height: 300px;
  background-color: var(--tw-surfaces-primary);
  position: relative;
}

/* ========== 7.3 Group/Standings Container ========== */
/* Component: .tw_group_div (GetStandingsHtml) */
/* Purpose: Standings table wrapper */
/* Redesigned: January 2026 - Follows design system */
.tw_group_div {
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  border: none;
  position: relative;
  background-color: var(--tw-surfaces-primary);
  min-height: 250px;
}

/* ===== Group Title (Header Bar Pattern) ===== */
.tw_group_div .tw_group_title {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-text-on-dark-primary);
  background-color: var(--tw-headers-bg);
  text-align: center;
  line-height: 40px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--tw-border-on-dark);
}

/* ===== Group Table ===== */
.tw_group_div .tw_group_table {
  color: var(--tw-text-on-dark-primary);
  font-family: var(--tw-font-book);
  text-align: center;
}

.tw_group_div .tw_group_table td {
  border: none;
  padding: var(--tw-space-12px) var(--tw-space-8px);
}

/* Table header row */
.tw_group_div .tw_group_table thead {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-11px);
  text-transform: uppercase;
  letter-spacing: var(--tw-space-1px);
  background-color: var(--tw-surfaces-primary);
  color: var(--tw-text-on-dark-primary);
}

.tw_group_div .tw_group_table thead td {
  border-bottom: 1px solid var(--tw-surfaces-secondary);
  padding: var(--tw-space-15px) var(--tw-space-8px);
}

/* Alternating row pattern (design system) */
.tw_group_div .tw_group_table tbody tr:nth-child(even) {
  background-color: var(--tw-surfaces-secondary);
}

.tw_group_div .tw_group_table tbody tr:nth-child(odd) {
  background-color: var(--tw-surfaces-primary);
}

/* White border between rows for separation */
.tw_group_div .tw_group_table tbody tr {
  border-bottom: 1px solid var(--tw-border-on-dark);
}

/* Remove border from last row */
.tw_group_div .tw_group_table tbody tr:last-child {
  border-bottom: none;
}

/* Ensure thead doesn't get alternating colors or borders */
.tw_group_div .tw_group_table thead {
  background-color: var(--tw-surfaces-primary) !important;
}

.tw_group_div .tw_group_table thead tr {
  border-bottom: 2px solid var(--tw-border-on-dark) !important;
}

/* Row number (rank) */
.tw_group_div .tw_group_table .rownum {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-18px);
  color: var(--tw-text-on-dark-primary);
  width: 40px;
}

/* Values (numbers) */
.tw_group_div .tw_group_table .value {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-16px);
  letter-spacing: var(--tw-space-0_5px);
}

/* Team cell */
.tw_group_div .tw_group_table .team {
  text-align: left;
}

/* Team name */
.tw_group_div .tw_group_table .team .name {
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
}

/* Opt-in standings only: themes may override --tw-* colours on any ancestor. */
.tw-standings {
  width: 100%;
  border-collapse: collapse;
}

.tw-standings th {
  padding: 15px 8px;
  text-align: center;
}

.tw-standings .tw-col-team {
  text-align: left;
}

.tw-standings .tw-col-form {
  white-space: nowrap;
}

.tw-form {
  display: inline-block;
  min-width: 1.5em;
  margin-inline: 1px;
  padding: 2px;
  border-radius: 3px;
  text-align: center;
  font-size: 12px;
  color: var(--tw-form-text, #fff);
}

.tw-form--w { background-color: var(--tw-form-win, #267345); }
.tw-form--d { background-color: var(--tw-form-draw, #626262); }
.tw-form--l { background-color: var(--tw-form-loss, #ad3030); }

.tw-zone { --tw-zone-color: var(--tw-zone-neutral, #888); }
.tw-zone--playoff { --tw-zone-color: var(--tw-zone-playoff, #479c76); }
.tw-zone--relegation { --tw-zone-color: var(--tw-zone-relegation, #d96c6c); }

.tw_group_div .tw-standings .tw-zone .tw-col-position {
  border-inline-start: 3px solid var(--tw-zone-color);
}

.tw-zone-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--tw-text-on-dark-primary, #fff);
}

.tw-zone-legend-item::before {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-inline-end: 6px;
  background-color: var(--tw-zone-color);
}

@media (max-width: 768px) {
  .tw-standings--full .tw-col-w,
  .tw-standings--full .tw-col-d,
  .tw-standings--full .tw-col-l,
  .tw-standings--full .tw-col-gf,
  .tw-standings--full .tw-col-ga,
  .tw-standings--full .tw-col-form {
    display: none;
  }
}

/* ========== 7.4 Group Wrap (Header Styling) ========== */
/* Used by: twa-competitions.js (round navigation) */
.tw_group_wrap {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-text-on-dark-primary);
  background-color: var(--tw-headers-bg);
  text-align: center;
  line-height: 40px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--tw-border-on-dark);
}

/* ========== 7.5 Info Text ========== */
/* Used by: twa-competitions.js (InitFirstMatchData - "NO PENDING MATCH") */
.tw_info_text {
  font-family: var(--tw-font-heavy);
  color: var(--tw-text-on-dark-primary);
  text-align: center;
  line-height: 40px;
  padding: var(--tw-space-20px);
  text-transform: uppercase;
}

/* ========== 7.6 Competition Team Matches Preload ========== */
/* Used by: tw_competition_team_matches_preload shortcode */

.tw_competition_team_matches_preload .tw_team_selector {
  padding: var(--tw-space-10px);
  background-color: var(--tw-surfaces-primary);
}

.tw_competition_team_matches_preload .tw_team_dropdown {
  width: 100%;
  padding: var(--tw-space-10px) var(--tw-space-15px);
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-text-on-dark-primary);
  background-color: var(--tw-headers-bg);
  border: 2px solid var(--tw-border-on-dark);
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: var(--tw-dropdown-icon-1);
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
}

.tw_competition_team_matches_preload .tw_team_dropdown:hover,
.tw_competition_team_matches_preload .tw_team_dropdown:focus,
.tw_competition_team_matches_preload .tw_team_dropdown:active {
  border-color: var(--tw-accent-highlight);
  outline: none;
  background-color: var(--tw-headers-bg);
  color: var(--tw-text-on-dark-primary);
}

.tw_competition_team_matches_preload .tw_team_dropdown option {
  background-color: var(--tw-headers-bg);
  color: var(--tw-text-on-dark-primary);
}

.tw_competition_team_matches_preload .tw_team_dropdown option:checked,
.tw_competition_team_matches_preload .tw_team_dropdown option:hover {
  background-color: var(--tw-surfaces-primary);
  color: var(--tw-text-on-dark-primary);
}

/* Round navigation within team matches */
.tw_team_round .tw_round_nav {
  cursor: default;
}

.tw_team_round .previousTeamRound,
.tw_team_round .nextTeamRound {
  cursor: pointer;
}

.tw_team_round .previousTeamRound:hover,
.tw_team_round .nextTeamRound:hover {
  color: var(--tw-accent-highlight);
}

/* ========== 7.7 Seven Days Matches ========== */
/* Used by: tw_matches_seven_days shortcode */

/* Day navigation header with arrows */
.tw_seven_days_day .tw_day_nav {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-text-on-dark-primary);
  background-color: var(--tw-surfaces-gradient-start);
  text-align: center;
  line-height: 44px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--tw-accent-highlight);
  margin: 0;
}

.tw_seven_days_day .tw_day_nav .previousDay,
.tw_seven_days_day .tw_day_nav .nextDay {
  cursor: pointer;
  padding: 0;
}

.tw_seven_days_day .tw_day_nav .previousDay:hover,
.tw_seven_days_day .tw_day_nav .nextDay:hover {
  color: var(--tw-accent-highlight);
}

/* Competition-Round header within each day */
.tw_seven_days_day .tw_competition_round_header {
  font-size: var(--tw-font-size-12px);
  line-height: 32px;
  background-color: var(--tw-surfaces-primary);
}

/* ============================================================================
   8. STATISTICS & CHARTS
   Used by: twa-html.js, twa-match.js, twa-charts.js, twa-utils.js
   ============================================================================ */

/* ========== 8.1 Bar Charts (Team Stats) ========== */
/* Component: .tw_chart_container (GetBarChartHtml) */
/* Purpose: Horizontal bar charts for team comparisons */
.tw_chart_container {
  font-family: var(--tw-font-book);
  color: var(--tw-text-on-dark-primary);
}

.tw_chart_container:nth-child(even) {
  background-color: var(--tw-surfaces-secondary);
}

.tw_chart_container:nth-child(odd) {
  background-color: var(--tw-surfaces-primary);
}

/* ===== Chart Labels ===== */
.tw_chart_container .chart-label {
  text-transform: uppercase;
  font-size: var(--tw-font-size-16px);
  font-family: var(--tw-font-heavy);
  letter-spacing: var(--tw-space-1_5px);
  display: flex;
  align-self: center;
  justify-content: center;
  line-height: 1.2 !important;
}

.row.chart-labels {
  margin: var(--tw-space-5px) var(--tw-space-0px);
}

/* ===== Chart Values ===== */
.tw_chart_container .chart-value {
  font-size: var(--tw-font-size-28px);
  font-family: var(--tw-font-heavy);
  display: flex;
  align-self: center;
  justify-content: center;
}

/* ========== 8.2 Bar Chart Bars ========== */
/* Used by: twa-html.js (GetBarChartHtml), twa-utils.js (SetBarChartData) */
.tw_chart {
  height: 8px;
  background-color: var(--tw-chart-track);
  padding: 0;
  margin: 0;
  width: 80%;
  margin: auto;
  box-shadow: 0 3px 6px var(--tw-shadow-sm);
  -moz-box-shadow: 0 3px 6px var(--tw-shadow-sm);
  -webkit-box-shadow: 0 3px 6px var(--tw-shadow-sm);
}

.tw_chart.negative {
  background-color: var(--tw-chart-negative-bg);
}

.tw_bar {
  height: 0;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--tw-accent-positive);
}

.tw_bar.negative {
  border-top-color: var(--tw-chart-negative);
}

/* ========== 8.3 Chart Details (Expandable) ========== */
/* Used by: twa-html.js (GetBarChartHtml), twa-utils.js (ToogleBarChartDetails) */
.chartDetails .detail {
  padding: var(--tw-space-5px) var(--tw-space-10px);
}

.col-12.row.detail {
  padding: var(--tw-space-10px) var(--tw-space-0px);
}

.chartDetails .label {
  line-height: 18px;
  text-align: center;
  text-transform: uppercase;
  font-size: var(--tw-font-size-15px);
  font-family: var(--tw-font-heavy);
  display: flex;
  align-self: center;
  justify-content: center;
}

.chartDetails .value {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-22px);
  line-height: 50px;
}

/* ========== 8.4 Player Bar Charts ========== */
/* Component: .tw_barchart_container (GetBarChartHtml for player stats) */
/* Purpose: Player-specific bar charts (player vs team total) */
.tw_barchart_container {
  font-family: var(--tw-font-book);
  color: var(--tw-text-on-dark-primary);
}

.tw_barchart_container .chart-labels {
  width: 80%;
  margin: auto;
}

.tw_barchart_container .chart-labels div {
  display: inline-block;
}

.tw_barchart_container .chart-label {
  text-transform: uppercase;
  font-size: var(--tw-font-size-14px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--tw-space-1px);
}

.tw_barchart_container .chart-value {
  font-size: var(--tw-font-size-16px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--tw-text-on-dark-subtle);
}

.tw_barchart_container .chart-value .chart-value-bold {
  font-size: var(--tw-font-size-16px);
  font-weight: 600;
  color: var(--tw-text-on-dark-primary);
}

.chart-value.text-right {
  float: right;
  color: var(--tw-text-on-dark-subtle);
}

.chart-label.text-left {
  float: left;
}

/* ========== 8.5 Player Chart Titles ========== */
/* Used by: twa-html.js (GetPlayerDiv) */
.playerChartTitle {
  text-transform: uppercase;
  font-size: var(--tw-font-size-14px);
  font-weight: 400;
  text-align: right;
  width: 80%;
  margin: auto;
  color: var(--tw-text-on-dark-subtle);
}

.playerChartTitle-bold {
  font-size: var(--tw-font-size-14px);
  font-weight: 600;
  opacity: 1 !important;
  color: var(--tw-text-on-dark-primary);
}

.col-12.detailsChartContainer {
  border-top: 1px dashed var(--tw-text-on-dark-subtle);
  padding-top: var(--tw-space-20px);
  padding-bottom: var(--tw-space-20px);
}

/* ========== 8.6 Circular Percentage Charts ========== */
/* Created by: twa-charts.js (AddPercChart) */
/* Purpose: Shows goals/shots as circular progress */
.tw_perc_chart_percentage {
  text-align: center;
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-16px);
  color: var(--tw-text-on-dark-primary);
  width: 100%;
}

/* ========== 8.7 Goals Details Section ========== */
/* Used by: twa-html.js (GetPlayerDiv) */
.row.goals-details {
  width: 100%;
  margin: var(--tw-space-20px) 0 var(--tw-space-30px);
}

.goals-details .value {
  font-family: var(--tw-font-heavy);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding-top: var(--tw-space-3px);
}

/* ========== 8.8 Label Styling ========== */
/* ===== Player Goals Section ===== */
.player-goals-section {
  background-color: var(--tw-surfaces-primary);
  padding-bottom: var(--tw-space-20px) !important;
}

.player-goals-section .label-prim {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-text-on-dark-primary);
  text-transform: uppercase;
}

.player-goals-section .goals-details {
  margin-top: var(--tw-space-20px);
}

.player-goals-section .goals-details .value {
  margin: auto;
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-16px);
  color: var(--tw-text-on-dark-primary);
}

.label-prim {
  display: flex;
  align-self: center;
  justify-content: center;
  font-family: var(--tw-font-heavy);
  color: var(--tw-text-on-dark-primary);
}

.row.label-sec {
  margin-top: var(--tw-space-5px);
  justify-content: center;
  font-size: var(--tw-font-size-11px);
  line-height: 1.2;
  letter-spacing: var(--tw-space-0_8px);
  font-family: var(--tw-font-book);
  color: var(--tw-text-on-dark-primary);
  text-transform: uppercase;
}

/* ========== 8.9 Generic Table Styles ========== */
/* Used by: Legacy code, may not be actively used */
.tw_table {
  max-width: 1000px;
  margin: auto;
}

.tw_table thead {
  font-weight: 500;
  font-size: var(--tw-font-size-0_9em);
  color: var(--tw-text-on-dark-muted);
}

.tw_table.noborder td {
  border: none !important;
}

.tw_table td {
  border: 1px solid var(--tw-text-on-dark-muted);
}

.options_table {
  width: 100%;
}

.wrap {
  padding: var(--tw-space-5px);
}

/* ============================================================================
   9. PLAY-BY-PLAY EVENTS
   Used by: twa-html.js, twa-match.js, twa-utils.js
   ============================================================================ */

/* ========== 9.1 Play-by-Play Event Row ========== */
/* Component: .tw_play_by_play (GetPlayByPlayDiv) */
/* Purpose: Individual event display in play-by-play */
.tw_play_by_play {
  border: 1px solid var(--tw-border-on-dark);
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-16px);
  color: var(--tw-text-on-dark-primary);
}

.tw_play_by_play:nth-child(even) {
  background-color: var(--tw-surfaces-secondary);
}

.tw_play_by_play:nth-child(odd) {
  background-color: var(--tw-surfaces-primary);
}

/* ===== Event Description ===== */
.tw_play_by_play .description {
  text-transform: uppercase;
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-12px);
  opacity: 0.8;
  line-height: 1.2;
}

.col-4.event-label {
  align-self: center;
}

/* ===== Event Result (Score) ===== */
.tw_play_by_play .result {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-21px);
  line-height: 50px;
}

/* ===== Player Number Badge ===== */
.tw_play_by_play .player_number {
  width: 40px;
  height: 40px;
  box-shadow: 0 3px 6px var(--tw-shadow-sm);
  -moz-box-shadow: 0 3px 6px var(--tw-shadow-sm);
  -webkit-box-shadow: 0 3px 6px var(--tw-shadow-sm);
  text-align: center;
  font-size: var(--tw-font-size-21px);
  margin: auto;
  border-radius: var(--tw-radius-50percent);
  display: inline-block;
  line-height: 43px;
  font-family: var(--tw-font-heavy);
}

.tw_play_by_play .player_number.home {
  background-color: var(--tw-cards-bg);
  color: var(--tw-cards-text);
}

.tw_play_by_play .player_number.away {
  background-color: var(--tw-chart-track);
}

/* ===== Clickable Play-by-Play Row ===== */
/* Makes entire row clickable for events with expandable details */
.tw_play_by_play .pbp-clickable {
  cursor: pointer;
}

.tw_play_by_play .pbp-clickable:hover {
  opacity: 0.85;
}

/* ========== 9.2 Event Severity Colors ========== */
/* Used by: twa-match.js (ParseEvent - severity levels) */
.tw_color_l1 {
  background-color: var(--tw-level-1) !important;
}

.tw_color_l2 {
  background-color: var(--tw-level-2) !important;
}

.tw_color_l3 {
  background-color: var(--tw-level-3) !important;
}

/* ========== 9.3 Event Details (Expandable) ========== */
/* Used by: twa-html.js (GetPlayByPlayEventDetails) */
.eventDetails .tab-pane {
  background-image: none !important;
  min-height: 200px !important;
}

.detailsOverview {
  max-width: 500px;
  margin: auto;
}

.goalDetailsRow {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-24px);
  text-align: center;
  line-height: 40px;
}

.goalDetailsRow .score {
  font-size: var(--tw-font-size-28px);
  font-weight: 600;
}

.detailsMetaRow {
  color: var(--tw-text-on-dark-primary);
  font-family: var(--tw-font-book);
  border-top: 1px var(--tw-border-on-dark) dashed;
}

.detailsMetaRow .description {
  font-size: var(--tw-font-size-14px);
  text-transform: uppercase;
  text-align: left;
  line-height: 1.2;
  display: flex;
  align-self: center;
  font-family: var(--tw-font-book);
}

.detailsMetaRow .label {
  font-size: var(--tw-font-size-18px);
  font-family: var(--tw-font-heavy);
  text-align: right;
  line-height: 1.2;
  display: flex;
  align-self: center;
  justify-content: flex-end;
  padding: var(--tw-space-5px) 0;
  letter-spacing: var(--tw-space-1px);
}

/* ============================================================================
   10. LOCATION/TARGET VISUALIZATION
   Used by: twa-html.js, twa-match.js, twa-utils.js
   ============================================================================ */

/* ========== 10.1 Location Wrapper ========== */
/* Component: .tw_location_wrap (GetLocationTabHTML, GetTargetTabHTML) */
/* Purpose: Container for shot location/target display */
.tw_location_wrap {
  position: relative;
  display: flex;
}

/* ===== Pool Map Image ===== */
.tw_location_wrap .tw_map {
  border-top: 1px solid var(--tw-border-on-light);
  border-bottom: 1px solid var(--tw-border-on-light);
  position: relative;
  height: 100%;
  width: 100%;
}

/* ===== Goal Target Image ===== */
.tw_location_wrap .tw_target {
  position: relative;
  height: 100%;
  width: 100%;
}

/* ===== Shot Markers ===== */
.tw_location_wrap .tw_marker {
  position: absolute;
  font-size: var(--tw-font-size-18px) !important;
  text-shadow: 2px 2px 4px var(--tw-shadow-sm);
  height: 20px;
  width: 20px;
  padding: 0 !important;
  text-align: center;
  margin-left: var(--tw-space-negative-10px);
  margin-bottom: var(--tw-space-0px);
}

i.tw_marker.fad.fa-crosshairs.green,
i.tw_marker.fas.fa-times.red {
  margin-bottom: var(--tw-space-negative-10px);
}

/* ========== 10.2 Marker Colors ========== */
/* Used by: twa-utils.js (GetMapLocationImg, GetTargetLocationImg) */
.green {
  color: var(--tw-accent-positive);
  z-index: 10;
}

.red {
  color: var(--tw-marker-negative);
}

.grey {
  color: var(--tw-text-on-dark-primary);
}

/* ========== 10.3 Water Surface & Pool ========== */
/* Used by: twa-html.js (GetTargetTabHTML) */
.water-surface {
  height: 100px;
  background-image: linear-gradient(
    var(--tw-water-gradient-start),
    var(--tw-water-gradient-end)
  );
  margin-bottom: var(--tw-space-negative-10px);
}

.location-map {
  height: 35px;
  background-color: var(--tw-surfaces-secondary);
  position: relative;
}

/* ========== 10.4 Goal Posts ========== */
/* Used by: twa-html.js (GetLocationTabHTML) */
.goal-posts-top {
  position: absolute;
  border-top: 5px solid;
  border-left: 5px solid;
  border-right: 5px solid;
  width: 20%;
  height: 55%;
  bottom: 0;
  left: 50%;
  margin-left: var(--tw-space-negative-10percent);
}

.goal-posts-bottom {
  position: absolute;
  border-bottom: 5px solid;
  border-left: 5px solid;
  border-right: 5px solid;
  width: 20%;
  height: 55%;
  top: 0;
  left: 50%;
  margin-left: var(--tw-space-negative-10percent);
}

/* ============================================================================
   11. TOP TABLES - STAT LEADERS
   Used by: top-scorers.js, top-assists.js, top-blockers.js, top-saves.js,
            top-steals.js, top-turnovers.js, top-pfdrawn.js
   Redesigned: January 2026 - Follows design system
   ============================================================================ */

/* ========== 11.0 Top Tables Regular View (Table) ========== */
/* Same styling as standings table */
.tw_top_swimoffs,
.tw_top_scorers,
.tw_top_assists,
.tw_top_blockers,
.tw_top_saves,
.tw_top_steals,
.tw_top_turnovers,
.tw_top_pfdrawn {
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  border: none;
  position: relative;
  background-color: var(--tw-surfaces-primary);
  min-height: 250px;
}

/* Header (black bar pattern) */
.tw_top_swimoffs .tw_group_title,
.tw_top_scorers .tw_group_title,
.tw_top_assists .tw_group_title,
.tw_top_blockers .tw_group_title,
.tw_top_saves .tw_group_title,
.tw_top_steals .tw_group_title,
.tw_top_turnovers .tw_group_title,
.tw_top_pfdrawn .tw_group_title {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-text-on-dark-primary);
  background-color: var(--tw-headers-bg);
  text-align: center;
  line-height: 40px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--tw-border-on-dark);
}

/* Table styling */
.tw_top_swimoffs .tw_group_table,
.tw_top_scorers .tw_group_table,
.tw_top_assists .tw_group_table,
.tw_top_blockers .tw_group_table,
.tw_top_saves .tw_group_table,
.tw_top_steals .tw_group_table,
.tw_top_turnovers .tw_group_table,
.tw_top_pfdrawn .tw_group_table {
  color: var(--tw-text-on-dark-primary);
  font-family: var(--tw-font-book);
  text-align: center;
  width: 100%;
}

.tw_top_swimoffs .tw_group_table td,
.tw_top_scorers .tw_group_table td,
.tw_top_assists .tw_group_table td,
.tw_top_blockers .tw_group_table td,
.tw_top_saves .tw_group_table td,
.tw_top_steals .tw_group_table td,
.tw_top_turnovers .tw_group_table td,
.tw_top_pfdrawn .tw_group_table td {
  border: none;
  padding: var(--tw-space-12px) var(--tw-space-8px);
}

/* Table header */
.tw_top_swimoffs .tw_group_table thead,
.tw_top_scorers .tw_group_table thead,
.tw_top_assists .tw_group_table thead,
.tw_top_blockers .tw_group_table thead,
.tw_top_saves .tw_group_table thead,
.tw_top_steals .tw_group_table thead,
.tw_top_turnovers .tw_group_table thead,
.tw_top_pfdrawn .tw_group_table thead {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-11px);
  text-transform: uppercase;
  letter-spacing: var(--tw-space-1px);
  background-color: var(--tw-surfaces-primary);
  color: var(--tw-text-on-dark-primary);
}

.tw_top_swimoffs .tw_group_table thead td,
.tw_top_scorers .tw_group_table thead td,
.tw_top_assists .tw_group_table thead td,
.tw_top_blockers .tw_group_table thead td,
.tw_top_saves .tw_group_table thead td,
.tw_top_steals .tw_group_table thead td,
.tw_top_turnovers .tw_group_table thead td,
.tw_top_pfdrawn .tw_group_table thead td {
  border-bottom: 2px solid var(--tw-border-on-dark);
  padding: var(--tw-space-15px) var(--tw-space-8px);
}

/* Alternating rows with white borders */
.tw_top_swimoffs .tw_group_table tbody tr:nth-child(even),
.tw_top_scorers .tw_group_table tbody tr:nth-child(even),
.tw_top_assists .tw_group_table tbody tr:nth-child(even),
.tw_top_blockers .tw_group_table tbody tr:nth-child(even),
.tw_top_saves .tw_group_table tbody tr:nth-child(even),
.tw_top_steals .tw_group_table tbody tr:nth-child(even),
.tw_top_turnovers .tw_group_table tbody tr:nth-child(even),
.tw_top_pfdrawn .tw_group_table tbody tr:nth-child(even) {
  background-color: var(--tw-surfaces-secondary);
}

.tw_top_swimoffs .tw_group_table tbody tr:nth-child(odd),
.tw_top_scorers .tw_group_table tbody tr:nth-child(odd),
.tw_top_assists .tw_group_table tbody tr:nth-child(odd),
.tw_top_blockers .tw_group_table tbody tr:nth-child(odd),
.tw_top_saves .tw_group_table tbody tr:nth-child(odd),
.tw_top_steals .tw_group_table tbody tr:nth-child(odd),
.tw_top_turnovers .tw_group_table tbody tr:nth-child(odd),
.tw_top_pfdrawn .tw_group_table tbody tr:nth-child(odd) {
  background-color: var(--tw-surfaces-primary);
}

/* White border between rows */
.tw_top_swimoffs .tw_group_table tbody tr,
.tw_top_scorers .tw_group_table tbody tr,
.tw_top_assists .tw_group_table tbody tr,
.tw_top_blockers .tw_group_table tbody tr,
.tw_top_saves .tw_group_table tbody tr,
.tw_top_steals .tw_group_table tbody tr,
.tw_top_turnovers .tw_group_table tbody tr,
.tw_top_pfdrawn .tw_group_table tbody tr {
  border-bottom: 1px solid var(--tw-border-on-dark);
}

/* Remove border from last row */
.tw_top_swimoffs .tw_group_table tbody tr:last-child,
.tw_top_scorers .tw_group_table tbody tr:last-child,
.tw_top_assists .tw_group_table tbody tr:last-child,
.tw_top_blockers .tw_group_table tbody tr:last-child,
.tw_top_saves .tw_group_table tbody tr:last-child,
.tw_top_steals .tw_group_table tbody tr:last-child,
.tw_top_turnovers .tw_group_table tbody tr:last-child,
.tw_top_pfdrawn .tw_group_table tbody tr:last-child {
  border-bottom: none;
}

/* Row number (rank) */
.tw_top_swimoffs .tw_group_table .rownum,
.tw_top_scorers .tw_group_table .rownum,
.tw_top_assists .tw_group_table .rownum,
.tw_top_blockers .tw_group_table .rownum,
.tw_top_saves .tw_group_table .rownum,
.tw_top_steals .tw_group_table .rownum,
.tw_top_turnovers .tw_group_table .rownum,
.tw_top_pfdrawn .tw_group_table .rownum {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-18px);
  color: var(--tw-text-on-dark-primary);
  width: 40px;
}

/* Values (numbers) */
.tw_top_swimoffs .tw_group_table .value,
.tw_top_scorers .tw_group_table .value,
.tw_top_assists .tw_group_table .value,
.tw_top_blockers .tw_group_table .value,
.tw_top_saves .tw_group_table .value,
.tw_top_steals .tw_group_table .value,
.tw_top_turnovers .tw_group_table .value,
.tw_top_pfdrawn .tw_group_table .value {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-16px);
  letter-spacing: var(--tw-space-0_5px);
}

/* Player and team cells */
.tw_top_swimoffs .tw_group_table .player,
.tw_top_scorers .tw_group_table .player,
.tw_top_assists .tw_group_table .player,
.tw_top_blockers .tw_group_table .player,
.tw_top_saves .tw_group_table .player,
.tw_top_steals .tw_group_table .player,
.tw_top_turnovers .tw_group_table .player,
.tw_top_pfdrawn .tw_group_table .player,
.tw_top_swimoffs .tw_group_table .team,
.tw_top_scorers .tw_group_table .team,
.tw_top_assists .tw_group_table .team,
.tw_top_blockers .tw_group_table .team,
.tw_top_saves .tw_group_table .team,
.tw_top_steals .tw_group_table .team,
.tw_top_turnovers .tw_group_table .team,
.tw_top_pfdrawn .tw_group_table .team {
  text-align: left;
}

/* Player and team name links */
.tw_top_swimoffs .tw_group_table .name,
.tw_top_scorers .tw_group_table .name,
.tw_top_assists .tw_group_table .name,
.tw_top_blockers .tw_group_table .name,
.tw_top_saves .tw_group_table .name,
.tw_top_steals .tw_group_table .name,
.tw_top_turnovers .tw_group_table .name,
.tw_top_pfdrawn .tw_group_table .name {
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-text-on-dark-primary);
}

.tw_top_swimoffs .tw_group_table a,
.tw_top_scorers .tw_group_table a,
.tw_top_assists .tw_group_table a,
.tw_top_blockers .tw_group_table a,
.tw_top_saves .tw_group_table a,
.tw_top_steals .tw_group_table a,
.tw_top_turnovers .tw_group_table a,
.tw_top_pfdrawn .tw_group_table a {
  text-decoration: none;
  color: var(--tw-text-on-dark-primary);
}

.tw_top_swimoffs .tw_group_table a:hover,
.tw_top_scorers .tw_group_table a:hover,
.tw_top_assists .tw_group_table a:hover,
.tw_top_blockers .tw_group_table a:hover,
.tw_top_saves .tw_group_table a:hover,
.tw_top_steals .tw_group_table a:hover,
.tw_top_turnovers .tw_group_table a:hover,
.tw_top_pfdrawn .tw_group_table a:hover {
  opacity: 0.8;
}

/* ========== 11.1 Top Tables Cards View ========== */
/* Card layout with white background and photos */
/* Components: .tw_top_scorers_cards, .tw_top_assists_cards, etc. */

/* Cards container - white background with higher specificity */
.tw_group_div.tw_top_swimoffs_cards,
.tw_group_div.tw_top_scorers_cards,
.tw_group_div.tw_top_assists_cards,
.tw_group_div.tw_top_blockers_cards,
.tw_group_div.tw_top_saves_cards,
.tw_group_div.tw_top_steals_cards,
.tw_group_div.tw_top_turnovers_cards,
.tw_group_div.tw_top_pfdrawn_cards {
  font-family: var(--tw-font-book);
  border: none;
  position: relative;
  background-color: var(--tw-tabs-bg-active) !important;
  min-height: 250px;
}

/* Header - Dark Gray with White Text and border */
.tw_top_swimoffs_cards .tw_group_title,
.tw_top_scorers_cards .tw_group_title,
.tw_top_assists_cards .tw_group_title,
.tw_top_blockers_cards .tw_group_title,
.tw_top_saves_cards .tw_group_title,
.tw_top_steals_cards .tw_group_title,
.tw_top_turnovers_cards .tw_group_title,
.tw_top_pfdrawn_cards .tw_group_title {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-text-on-dark-primary);
  background-color: var(--tw-surfaces-secondary);
  /* #2b2b2b */
  text-align: center;
  line-height: 40px;
  text-transform: uppercase;
  border: 2px solid var(--tw-border-on-light);
  border-bottom: none;
}

/* Table styling - white background with outside border */
.tw_top_swimoffs_cards .tw_group_table,
.tw_top_scorers_cards .tw_group_table,
.tw_top_blockers_cards .tw_group_table,
.tw_top_assists_cards .tw_group_table,
.tw_top_saves_cards .tw_group_table,
.tw_top_steals_cards .tw_group_table,
.tw_top_turnovers_cards .tw_group_table,
.tw_top_pfdrawn_cards .tw_group_table {
  background-color: var(--tw-tabs-bg-active) !important;
  width: 100%;
  border: 2px solid var(--tw-border-on-light);
  border-top: none;
  /* Header provides top border */
}

/* Table rows - white background with thicker black borders */
.tw_top_swimoffs_cards .tw_group_table tbody tr,
.tw_top_scorers_cards .tw_group_table tbody tr,
.tw_top_blockers_cards .tw_group_table tbody tr,
.tw_top_assists_cards .tw_group_table tbody tr,
.tw_top_saves_cards .tw_group_table tbody tr,
.tw_top_steals_cards .tw_group_table tbody tr,
.tw_top_turnovers_cards .tw_group_table tbody tr,
.tw_top_pfdrawn_cards .tw_group_table tbody tr {
  background-color: var(--tw-tabs-bg-active) !important;
  border-bottom: 2px solid var(--tw-border-on-light);
}

/* Table cells - white background */
.tw_top_swimoffs_cards .tw_group_table tbody td,
.tw_top_scorers_cards .tw_group_table tbody td,
.tw_top_blockers_cards .tw_group_table tbody td,
.tw_top_assists_cards .tw_group_table tbody td,
.tw_top_saves_cards .tw_group_table tbody td,
.tw_top_steals_cards .tw_group_table tbody td,
.tw_top_turnovers_cards .tw_group_table tbody td,
.tw_top_pfdrawn_cards .tw_group_table tbody td {
  background-color: var(--tw-tabs-bg-active) !important;
}

/* Remove border from last row */
.tw_top_swimoffs_cards .tw_group_table tbody tr:last-child,
.tw_top_scorers_cards .tw_group_table tbody tr:last-child,
.tw_top_blockers_cards .tw_group_table tbody tr:last-child,
.tw_top_assists_cards .tw_group_table tbody tr:last-child,
.tw_top_saves_cards .tw_group_table tbody tr:last-child,
.tw_top_steals_cards .tw_group_table tbody tr:last-child,
.tw_top_turnovers_cards .tw_group_table tbody tr:last-child,
.tw_top_pfdrawn_cards .tw_group_table tbody tr:last-child {
  border-bottom: none;
}

/* ===== Photo Cell ===== */
.tw_top_swimoffs_cards .tw_group_table td.photo-cell,
.tw_top_scorers_cards .tw_group_table td.photo-cell,
.tw_top_blockers_cards .tw_group_table td.photo-cell,
.tw_top_assists_cards .tw_group_table td.photo-cell,
.tw_top_saves_cards .tw_group_table td.photo-cell,
.tw_top_steals_cards .tw_group_table td.photo-cell,
.tw_top_turnovers_cards .tw_group_table td.photo-cell,
.tw_top_pfdrawn_cards .tw_group_table td.photo-cell {
  width: 70px;
  padding: var(--tw-space-15px) var(--tw-space-8px);
  vertical-align: middle;
}

/* ===== Player Name Column ===== */
.tw_top_swimoffs_cards .tw_group_table td.player-name,
.tw_top_scorers_cards .tw_group_table td.player-name,
.tw_top_blockers_cards .tw_group_table td.player-name,
.tw_top_assists_cards .tw_group_table td.player-name,
.tw_top_saves_cards .tw_group_table td.player-name,
.tw_top_steals_cards .tw_group_table td.player-name,
.tw_top_turnovers_cards .tw_group_table td.player-name,
.tw_top_pfdrawn_cards .tw_group_table td.player-name {
  text-align: left;
  padding-left: var(--tw-space-10px);
  padding-top: var(--tw-space-15px);
  padding-bottom: var(--tw-space-15px);
  vertical-align: middle;
}

/* ===== Stat Value Cell ===== */
.tw_top_swimoffs_cards .tw_group_table td.goals-cell,
.tw_top_scorers_cards .tw_group_table td.goals-cell,
.tw_top_blockers_cards .tw_group_table td.blocks-cell,
.tw_top_assists_cards .tw_group_table td.assists-cell,
.tw_top_saves_cards .tw_group_table td.saves-cell,
.tw_top_steals_cards .tw_group_table td.steals-cell,
.tw_top_turnovers_cards .tw_group_table td.turnovers-cell,
.tw_top_pfdrawn_cards .tw_group_table td.pfdrawn-cell {
  width: 80px;
  text-align: center;
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-32px);
  color: var(--tw-tabs-text-active);
  vertical-align: middle;
  padding: var(--tw-space-15px) var(--tw-space-8px);
}

/* ========== 11.2 Player Photo Container ========== */
/* All stat types use same photo styling */
.tw_scorer_photo_container,
.tw_blocker_photo_container,
.tw_assist_photo_container,
.tw_save_photo_container,
.tw_steal_photo_container,
.tw_turnover_photo_container,
.tw_pfdrawn_photo_container {
  position: relative;
  width: 50px;
  height: 50px;
  margin: 0 auto;
}

/* ===== Player Photo Image ===== */
.tw_scorer_photo,
.tw_blocker_photo,
.tw_assist_photo,
.tw_save_photo,
.tw_steal_photo,
.tw_turnover_photo,
.tw_pfdrawn_photo {
  width: 100%;
  height: 100%;
  border-radius: var(--tw-radius-50percent);
  object-fit: cover;
  border: 2px solid var(--tw-cards-border-muted);
}

/* ========== 11.3 Team Logo Overlay ========== */
/* Small team logo in bottom-right of player photo */
.tw_scorer_team_logo,
.tw_blocker_team_logo,
.tw_assist_team_logo,
.tw_save_team_logo,
.tw_steal_team_logo,
.tw_turnover_team_logo,
.tw_pfdrawn_team_logo {
  position: absolute;
  bottom: -3px;
  right: -15px;
}

.tw_scorer_team_logo .team-logo-standings,
.tw_blocker_team_logo .team-logo-standings,
.tw_assist_team_logo .team-logo-standings,
.tw_save_team_logo .team-logo-standings,
.tw_steal_team_logo .team-logo-standings,
.tw_turnover_team_logo .team-logo-standings,
.tw_pfdrawn_team_logo .team-logo-standings {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tw_scorer_team_logo img,
.tw_blocker_team_logo img,
.tw_assist_team_logo img,
.tw_save_team_logo img,
.tw_steal_team_logo img,
.tw_turnover_team_logo img,
.tw_pfdrawn_team_logo img {
  max-width: 25px;
  max-height: 25px;
}

/* ========== 11.4 Player Name Links ========== */
/* Clickable player names in cards */
.tw_scorer_name_link,
.tw_blocker_name_link,
.tw_assist_name_link,
.tw_save_name_link,
.tw_steal_name_link,
.tw_turnover_name_link,
.tw_pfdrawn_name_link {
  text-decoration: none;
  display: block;
}

.tw_scorer_name_link:hover,
.tw_blocker_name_link:hover,
.tw_assist_name_link:hover,
.tw_save_name_link:hover,
.tw_steal_name_link:hover,
.tw_turnover_name_link:hover,
.tw_pfdrawn_name_link:hover {
  opacity: 0.8;
}

/* ========== 11.5 Player Name Text ========== */
/* First name (Avenir Book, smaller) */
.tw_scorer_firstname,
.tw_blocker_firstname,
.tw_assist_firstname,
.tw_save_firstname,
.tw_steal_firstname,
.tw_turnover_firstname,
.tw_pfdrawn_firstname {
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
  color: var(--tw-text-on-light-primary);
  font-weight: normal;
  line-height: 1.2;
  margin: 0;
}

/* Last name (Avenir Heavy, larger, uppercase) */
.tw_scorer_lastname,
.tw_blocker_lastname,
.tw_assist_lastname,
.tw_save_lastname,
.tw_steal_lastname,
.tw_turnover_lastname,
.tw_pfdrawn_lastname {
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-16px);
  color: var(--tw-text-on-light-strong);
  margin: var(--tw-space-2px) 0 0 0;
  line-height: 1.2;
}

/* ============================================================================
   12. NAVIGATION & TABS
   Used by: twa-html.js (all template functions with tabs)
   ============================================================================ */

/* ========== 12.1 General Navigation Tabs ========== */
/* Used throughout: Match stats, Player profile, Competition fixtures */
.nav-link {
  display: block;
  padding: var(--tw-space-0_5rem) var(--tw-space-0_4rem);
}

.nav-fill .nav-item {
  font-family: var(--tw-font-heavy);
  letter-spacing: var(--tw-space-1px);
  align-self: center;
  flex: 1 1 auto;
}

/* Remove bullet points from all nav-pills lists */
.nav-pills .nav-item {
  list-style: none;
}

/* ========== 12.2 Details Tabs (Player/Event Details) ========== */
/* Used by: twa-html.js (GetDetailsTabsHTML) */
.nav-link.details {
  padding: var(--tw-space-0_5rem) var(--tw-space-0_5rem) !important;
}

.nav-link.details.active {
  color: var(--tw-text-on-dark-primary) !important;
}

.nav-link.details i.fad {
  padding-right: var(--tw-space-2px);
  font-size: var(--tw-font-size-14px);
}

/* OVERVIEW / TARGET / LOCATION buttons - pill-shaped when active */
.tw_match_details_tabs .nav-link {
  color: var(--tw-text-on-dark-primary) !important;
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-11px);
  border: none;
  background-color: transparent;
  padding: var(--tw-space-5px) var(--tw-space-15px);
}

.tw_match_details_tabs .nav-link.active {
  border-radius: var(--tw-radius-17px);
  background-color: var(--tw-tabs-bg-active) !important;
  color: var(--tw-tabs-text-active) !important;
  border: 2px solid var(--tw-border-on-dark);
  padding: var(--tw-space-5px) var(--tw-space-15px);
}

/* ============================================================================
   13. FILTERS & OPTIONS
   Used by: twa-player.js, twa-utils.js
   ============================================================================ */

/* ========== 13.1 Legacy Filter System ========== */
/* Note: DEPRECATED - Use .tw_player_filters or .tw_team_filters instead */
/* Keeping for backwards compatibility but should not be used in new code */
.filters_head {
  padding: var(--tw-space-12px);
  background-color: var(--tw-headers-bg);
  color: var(--tw-text-on-dark-primary);
  font-family: var(--tw-font-heavy);
  text-align: center;
  cursor: pointer;
}

.filters_head > i {
  font-size: var(--tw-font-size-18px);
  padding-right: var(--tw-space-5px);
}

.filters_options {
  padding: 0 var(--tw-space-2px);
}

.filters_options > select {
  display: block;
  width: 100%;
  text-align: center;
  background-color: var(--tw-headers-bg);
  color: var(--tw-text-on-dark-primary);
  border-bottom: 2px solid var(--tw-border-on-dark);
  font-family: var(--tw-font-heavy);
  padding: var(--tw-space-10px);
  text-transform: uppercase;
}

/* ========== 13.2 Player Profile Filters ========== */
/* Component: .tw_player_filters (GetPlayerProfileDiv) */
/* Purpose: Competition filter dropdown on player page */
/* Redesigned: January 2026 - Follows design system */
.tw_player_filters {
  padding: 0;
  margin: 0;
}

.tw_player_filters > select {
  width: 100%;
  padding: var(--tw-space-12px);
  background-color: var(--tw-headers-bg);
  color: var(--tw-text-on-dark-primary);
  border: 2px solid var(--tw-border-on-dark);
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: var(--tw-space-1px);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: var(--tw-dropdown-icon-2);
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: var(--tw-space-35px);
}

.tw_player_filters > select:focus {
  outline: none;
  background-color: var(--tw-surfaces-secondary);
}

/* Component: .tw_team_filters (GetTeamProfileDiv) */
/* Purpose: Competition filter dropdown on team page */
.tw_team_filters {
  padding: 0;
  margin-bottom: var(--tw-space-10px);
}

.tw_team_filters > select {
  width: 100%;
  padding: var(--tw-space-12px);
  background-color: var(--tw-headers-bg);
  color: var(--tw-text-on-dark-primary);
  border: none;
  border-bottom: 2px solid var(--tw-border-on-dark);
  font-family: var(--tw-font-heavy);
  font-size: var(--tw-font-size-14px);
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: var(--tw-dropdown-icon-2);
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: var(--tw-space-35px);
}

.tw_team_filters > select:focus {
  outline: none;
  background-color: var(--tw-surfaces-secondary);
}

/* ============================================================================
   14. SEARCH BAR - TEAMS AND PLAYERS
   Used by: twa-search.js
   ============================================================================ */

/* ========== 14.1 Search Container ========== */
.tw_search_container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: var(--tw-space-20px) auto;
  font-family: var(--tw-font-book);
}

/* ========== 14.2 Search Input ========== */
.tw_search_input_wrapper {
  position: relative;
  width: 100%;
}

.tw_search_input,
#tw_search_input {
  width: 100% !important;
  padding: var(--tw-space-12px) var(--tw-space-15px) !important;
  font-size: var(--tw-font-size-16px) !important;
  border: 2px solid var(--tw-border-on-dark) !important;
  border-radius: 0 !important;
  outline: none !important;
  box-sizing: border-box !important;
  background-color: var(--tw-headers-bg) !important;
  color: var(--tw-text-on-dark-primary) !important;
  font-family: var(--tw-font-book) !important;
}

.tw_search_input:focus,
#tw_search_input:focus {
  border: 2px solid var(--tw-border-on-dark) !important;
  background-color: var(--tw-headers-bg) !important;
  color: var(--tw-text-on-dark-primary) !important;
  outline: none !important;
}

.tw_search_input::placeholder,
#tw_search_input::placeholder {
  color: var(--tw-inputs-placeholder) !important;
}

.tw_search_input:disabled {
  background-color: var(--tw-inputs-disabled-bg);
  cursor: not-allowed;
  color: var(--tw-inputs-disabled-text);
  border: 2px solid var(--tw-inputs-disabled-border);
}

/* ========== 14.3 Search Icon ========== */
.tw_search_icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--tw-font-size-18px);
  pointer-events: none;
  color: var(--tw-surfaces-secondary);
}

/* ========== 14.4 Search Results Dropdown ========== */
.tw_search_results {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--tw-cards-bg);
  border: 2px solid var(--tw-border-on-light);
  border-top: none;
  border-radius: 0;
  box-shadow: none;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

/* ========== 14.5 Section Titles (TEAMS / PLAYERS) ========== */
.tw_search_section_title {
  padding: var(--tw-space-8px) var(--tw-space-15px);
  font-size: var(--tw-font-size-11px);
  font-family: var(--tw-font-heavy);
  color: var(--tw-text-on-dark-primary);
  text-transform: uppercase;
  letter-spacing: var(--tw-space-1px);
  background: var(--tw-headers-bg);
  border-bottom: 2px solid var(--tw-border-on-dark);
}

/* ========== 14.6 Search Result Items ========== */
.tw_search_result_item {
  display: flex;
  align-items: center;
  padding: var(--tw-space-12px) var(--tw-space-15px);
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid var(--tw-border-on-dark);
  background-color: var(--tw-surfaces-primary);
  color: var(--tw-text-on-dark-primary);
}

.tw_search_result_item:nth-child(even) {
  background-color: var(--tw-surfaces-secondary);
}

.tw_search_result_item:last-child {
  border-bottom: none;
}

.tw_search_result_item:hover,
.tw_search_result_item.selected {
  background-color: var(--tw-surfaces-hover);
}

/* ===== Result Icons (fallback emojis) ===== */
.tw_search_result_icon {
  font-size: var(--tw-font-size-24px);
  margin-right: var(--tw-space-12px);
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tw_search_team_icon {
  color: var(--tw-accent-positive);
}

.tw_search_player_icon {
  color: var(--tw-accent-link);
}

/* ===== Result Images (logos and photos) ===== */
.tw_search_result_logo_placeholder,
.tw_search_result_photo_placeholder {
  width: 40px;
  height: 40px;
  margin-right: var(--tw-space-12px);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--tw-tabs-bg-active);
}

.tw_search_result_logo_placeholder {
  border-radius: 0;
}

.tw_search_result_photo_placeholder {
  border-radius: var(--tw-radius-50percent);
  background-color: var(--tw-surfaces-hover);
}

/* Images inside placeholders */
.tw_search_result_logo_placeholder img,
.tw_search_result_photo_placeholder img {
  width: 40px;
  height: 40px;
}

.tw_search_result_logo_placeholder img {
  object-fit: contain;
  border-radius: 0;
  background-color: var(--tw-tabs-bg-active);
  padding: var(--tw-space-2px);
}

.tw_search_result_photo_placeholder img {
  object-fit: cover;
  border-radius: var(--tw-radius-50percent);
  border: 2px solid var(--tw-border-on-dark);
}

.tw_search_result_logo {
  width: 40px;
  height: 40px;
  margin-right: var(--tw-space-12px);
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 0;
  background-color: var(--tw-tabs-bg-active);
  padding: var(--tw-space-2px);
}

.tw_search_result_photo {
  width: 40px;
  height: 40px;
  margin-right: var(--tw-space-12px);
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--tw-radius-50percent);
  border: 2px solid var(--tw-border-on-dark);
}

/* ===== Result Information ===== */
.tw_search_result_info {
  flex: 1;
  min-width: 0;
}

.tw_search_result_name {
  font-size: var(--tw-font-size-15px);
  font-family: var(--tw-font-heavy);
  color: var(--tw-text-on-dark-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tw_search_result_meta {
  font-size: var(--tw-font-size-13px);
  font-family: var(--tw-font-book);
  color: var(--tw-text-on-dark-meta);
  margin-top: var(--tw-space-2px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== 14.7 No Results Message ========== */
.tw_search_no_results {
  padding: var(--tw-space-20px);
  text-align: center;
  color: var(--tw-text-on-dark-primary);
  font-size: var(--tw-font-size-14px);
  font-family: var(--tw-font-book);
  background-color: var(--tw-surfaces-primary);
}

/* ========== 14.8 Mobile Responsive ========== */
@media (max-width: 768px) {
  .tw_search_container {
    max-width: 100%;
    margin: var(--tw-space-15px) 0;
  }

  .tw_search_input {
    font-size: var(--tw-font-size-16px);
    /* Prevent zoom on iOS */
  }
}

/* ============================================================================
   END OF ORGANIZED CSS
   ============================================================================ */

/* VAL quarter-points widgets: compact dark rows, including narrow embeds. */
.tw-val {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: var(--tw-space-12px) 0;
  color: var(--tw-text-on-dark-primary);
  background: var(--tw-surfaces-primary);
  font-family: var(--tw-font-book);
  font-size: var(--tw-font-size-14px);
}
.tw-val table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
  color: inherit;
}
.tw-val th, .tw-val td {
  padding: var(--tw-space-8px) var(--tw-space-3px);
  border: 0;
  border-bottom: 1px solid var(--tw-border-on-dark);
  text-align: center;
  vertical-align: middle;
}
.tw-val th { background: var(--tw-headers-bg); font-size: var(--tw-font-size-12px); }
.tw-val tr { background: var(--tw-surfaces-primary); }
.tw-val tbody tr:nth-child(even) { background: var(--tw-surfaces-secondary); }
tw_val_standings th:nth-child(2), tw_val_match th:first-child { width: 42%; text-align: left; }
.tw-val .team { text-align: left; overflow-wrap: anywhere; }
.tw-val .team-logo-standings {
  float: none;
  padding: 0;
  box-sizing: border-box;
  display: inline-flex;
  width: 24px;
  height: 24px;
  margin-right: var(--tw-space-3px);
  vertical-align: middle;
  align-items: center;
  justify-content: center;
}
.tw-val .team-logo-standings img { max-width: 24px; max-height: 24px; object-fit: contain; }
.tw-val .team .name { display: inline-block; width: calc(100% - 32px); margin: 0 !important; vertical-align: middle; }
.tw-val td:last-child { font-weight: bold; }
.tw-val .tw-val-progress { background: var(--tw-surfaces-hover); box-shadow: inset 0 -2px var(--tw-text-on-dark-primary); }
.tw-val p { padding: var(--tw-space-8px); margin: 0; font-size: var(--tw-font-size-12px); line-height: 1.5; }
.tw-val h3 { margin: 0; padding: var(--tw-space-8px); color: inherit; font-size: var(--tw-font-size-16px); }
@media (max-width: 420px) {
  .tw-val { font-size: var(--tw-font-size-12px); }
  .tw-val th { font-size: var(--tw-font-size-10px); }
  .tw-val th, .tw-val td { padding: var(--tw-space-7px) var(--tw-space-2px); }
}

/* Golden-goal outcome is separate from the regulation quarter-point total. */
.tw-val .tw-val-winner .team { font-weight: bold; }
.tw-val .tw-val-winner-label { display: block; margin-top: var(--tw-space-4px); font-size: var(--tw-font-size-10px); line-height: 1.3; }

/* Opt-in cross-competition feeds. Themes may override these variables per site,
   widget or .tw-comp-<id>; ordinary shortcode styles are unaffected. */
.tw-feed {
  display: block;
  color: var(--tw-feed-text, #17212b);
  background: var(--tw-feed-background, #ffffff);
}
.tw-feed .tw-feed-list {
  display: grid;
  gap: 0.75rem;
  padding: 0.25rem;
  margin: 0;
  list-style: none;
}
.tw-ticker .tw-feed-list {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.tw-feed .tw-feed-match {
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--tw-feed-text, #17212b);
  background: var(--tw-feed-card-background, #ffffff);
  border: 1px solid var(--tw-feed-border, #ccd3da);
  border-radius: 0.375rem;
}
.tw-ticker .tw-feed-match {
  flex: 0 0 16rem;
  scroll-snap-align: start;
}
.tw-feed .tw-feed-link {
  display: grid;
  gap: 0.375rem;
  padding: 0.75rem;
  color: inherit;
  text-decoration: none;
}
.tw-feed .tw-feed-link:focus-visible {
  outline: 2px solid var(--tw-feed-focus, #175caa);
  outline-offset: 1px;
}
.tw-feed .tw-feed-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.tw-feed .tw_logo { flex: 0 0 28px; width: 28px; height: 28px; }
.tw-feed .tw_logo img { width: 100%; height: 100%; object-fit: contain; }
.tw-feed .tw-feed-team-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tw-feed .tw-feed-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.tw-feed .tw-feed-competition,
.tw-feed .tw-feed-time { color: var(--tw-feed-muted, #52606d); font-size: 0.875em; }
.tw-feed .tw-feed-status { font-size: 0.875em; }
.tw-feed [data-status="live"] .tw-feed-status {
  color: var(--tw-feed-live, #a51d2d);
  font-weight: 700;
}
.tw-feed [data-status="live"] .tw-feed-status::before { content: "● "; }
.tw-feed .tw-feed-day-heading { color: inherit; font-size: 1.1em; margin: 1rem 0 0.5rem; }
.tw-feed .tw-feed-message { color: var(--tw-feed-muted, #52606d); margin: 0; padding: 0.75rem; }
/* Opt-in match sections. Themes can override these variables on any ancestor. */
.tw-match-section {
  color: var(--tw-text, inherit);
  background: var(--tw-surface, transparent);
  border: 1px solid var(--tw-border, currentColor);
  border-radius: var(--tw-radius, .25rem);
  padding: var(--tw-section-padding, 1rem);
  margin-block: var(--tw-section-gap, 1rem);
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  font-family: inherit;
}
.tw-match-section .tw-match-section-title { font-size: 1.25em; margin: 0 0 1rem; color: inherit; }
.tw-match-section .tw-match-hero-content { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.tw-match-section .tw-match-team { flex: 1 1 8rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
.tw-match-section .tw-match-logo { width: 4rem; height: 4rem; object-fit: contain; }
.tw-match-section .tw-match-score { font-size: 2em; }
.tw-match-section .tw-match-status,
.tw-match-section .tw-match-date,
.tw-match-section .tw-match-venue { flex-basis: 100%; margin: 0; text-align: center; }
.tw-match-section .tw-match-table { width: 100%; border-collapse: collapse; color: inherit; margin: 0; }
.tw-match-section .tw-match-table caption { caption-side: top; color: inherit; font-weight: bold; text-align: start; padding-block: .5rem; }
.tw-match-section .tw-match-table th,
.tw-match-section .tw-match-table td { border-bottom: 1px solid var(--tw-border, currentColor); padding: .5rem; text-align: start; overflow-wrap: anywhere; }
.tw-match-section .tw-match-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.tw-match-section .tw-match-facts-list { margin: 0; }
.tw-match-section .tw-match-fact { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding-block: .25rem; }
.tw-match-section .tw-match-fact dt { font-weight: bold; flex: 0 1 8rem; }
.tw-match-section .tw-match-fact dd { margin: 0; flex: 1 1 10rem; }
.tw-match-section .tw-match-events { list-style: none; margin: 0; padding: 0; }
.tw-match-section .tw-match-event { display: flex; flex-wrap: wrap; gap: .5rem; padding-block: .75rem; border-bottom: 1px solid var(--tw-border, currentColor); }
.tw-match-section .tw-match-event-time { flex-basis: 100%; color: var(--tw-muted, inherit); }
.tw-match-section .tw-match-event-details { display: flex; flex-wrap: wrap; gap: .25rem .5rem; flex-basis: 100%; font-size: .875em; margin: 0; }
.tw-match-section .tw-match-event-details dd { margin: 0 1rem 0 0; }
.tw-match-section .tw-match-stat { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; margin-block: 1rem; }
.tw-match-section .tw-match-stat h3 { grid-column: 1 / -1; font-size: 1em; margin: 0; color: inherit; }
.tw-match-section .tw-match-stat-side { display: grid; grid-template-columns: 1fr auto; gap: .25rem; min-width: 0; }
.tw-match-section .tw-match-stat-side meter { grid-column: 1 / -1; width: 100%; height: 1rem; accent-color: var(--tw-home, currentColor); }
.tw-match-section .tw-match-stat-side[data-tw-side="away"] meter { accent-color: var(--tw-away, currentColor); }
.tw-match-section meter::-webkit-meter-bar { background: var(--tw-bar-track, transparent); border-color: var(--tw-border, currentColor); }
.tw-match-section meter::-webkit-meter-optimum-value { background: var(--tw-home, currentColor); }
.tw-match-section [data-tw-side="away"] meter::-webkit-meter-optimum-value { background: var(--tw-away, currentColor); }
.tw-match-section meter::-moz-meter-bar { background: var(--tw-home, currentColor); }
.tw-match-section [data-tw-side="away"] meter::-moz-meter-bar { background: var(--tw-away, currentColor); }
.tw-match-section .tw-match-empty,
.tw-match-section .tw-match-error { color: var(--tw-muted, inherit); margin-block: .5rem; }

.tw-match-section.tw-match-exclusions .tw-match-table th { white-space: nowrap; }
.tw-match-section.tw-match-exclusions .tw-match-table td { overflow-wrap: normal; }
.tw-match-section.tw-match-exclusions .tw-match-table td:last-child { white-space: nowrap; }
@media (max-width: 480px) {
  .tw-match-section.tw-match-exclusions .tw-match-table { font-size: .875em; }
  .tw-match-section.tw-match-exclusions .tw-match-table th,
  .tw-match-section.tw-match-exclusions .tw-match-table td { padding: .35rem; }
}

/* Opt-in competition tables. Skins may override these inherited color tokens. */
.tw-statistics-table {
  --tw-stats-text: #222;
  --tw-stats-background: #fff;
  --tw-stats-heading-background: #f2f4f6;
  --tw-stats-border: #dce1e5;
  --tw-stats-muted: #666;
  --tw-stats-error: #b42318;
  --tw-stats-link: #175b91;
  /* Existing group-table rules (including legacy header rules) use these. */
  --tw-text-on-dark-primary: var(--tw-stats-text);
  --tw-surfaces-primary: var(--tw-stats-background);
  --tw-surfaces-secondary: var(--tw-stats-heading-background);
  --tw-border-on-dark: var(--tw-stats-border);
  --tw-overlay-content-bg: var(--tw-stats-text);
  color: var(--tw-stats-text);
  background: var(--tw-stats-background);
  max-width: 100%;
  min-width: 0;
}
.tw-statistics-table .tw_group_title {
  color: var(--tw-stats-text);
  background: var(--tw-stats-heading-background);
  margin: 0;
  padding: 0.75rem;
  font-size: 1.1rem;
}
.tw-statistics-table .tw-stats-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.tw-statistics-table .tw_group_table {
  width: 100%;
  border-collapse: collapse;
  color: var(--tw-stats-text);
  background: var(--tw-stats-background);
}
.tw-statistics-table .tw_group_table th,
.tw-statistics-table .tw_group_table td {
  padding: 0.65rem;
  border-bottom: 1px solid var(--tw-stats-border);
  text-align: center;
  white-space: nowrap;
}
.tw-statistics-table .tw_group_table th {
  color: var(--tw-stats-text);
  background: var(--tw-stats-heading-background);
}
.tw-statistics-table .tw_group_table .text-left { text-align: left; }
.tw-statistics-table .tw_group_table .value { font-variant-numeric: tabular-nums; }
.tw-statistics-table a { color: var(--tw-stats-link); }
.tw-statistics-table .team-logo-standings {
  float: none;
  display: inline-block;
  width: 2rem;
  margin-right: 0.4rem;
  vertical-align: middle;
}
.tw-statistics-table .team-logo-standings img {
  max-width: 100%;
  max-height: 2rem;
  object-fit: contain;
}
.tw-statistics-table .tw-stats-message { color: var(--tw-stats-muted); }
.tw-statistics-table .tw-stats-error { color: var(--tw-stats-error); }

.tw-statistics-table .loader[hidden],
.tw-statistics-table img[hidden] { display: none; }

/* Opt-in roster and profile cap. Skins can override inherited --tw-* variables. */
.tw-roster {
  color: var(--tw-text, #1f2937);
  background: var(--tw-surface, #fff);
  padding: 1rem;
}
.tw-roster .tw-roster-cards,
.tw-roster .tw-roster-staff-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tw-roster .tw-roster-card,
.tw-roster .tw-roster-staff-member {
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--tw-border, #d1d5db);
  border-radius: 0.5rem;
  background: var(--tw-surface, #fff);
  box-sizing: border-box;
}
.tw-roster .tw-roster-heading,
.tw-roster .tw-roster-name {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}
.tw-roster a.tw-roster-name {
  color: var(--tw-link, #005a9c);
  text-decoration: underline;
}
.tw-roster .tw-roster-photo {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  margin-bottom: 0.75rem;
}
.tw-roster .tw-roster-details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 0.75rem;
  margin: 0;
}
.tw-roster .tw-roster-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.tw-roster .tw-roster-label {
  font-weight: 600;
}
.tw-roster .tw-roster-cap {
  font-weight: 700;
  color: var(--tw-accent, #005a9c);
}
.tw-roster .tw-roster-staff {
  margin-top: 1.5rem;
}
.tw-roster .tw-roster-table-wrap {
  overflow-x: auto;
}
.tw-roster .tw-roster-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  color: var(--tw-text, #1f2937);
  background: var(--tw-surface, #fff);
}
.tw-roster .tw-roster-table .tw-roster-name {
  display: inline-block;
  min-width: 8rem;
}
.tw-roster .tw-roster-table th,
.tw-roster .tw-roster-table td {
  padding: 0.75rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--tw-border, #d1d5db);
}
.tw-roster .tw-roster-table caption {
  text-align: left;
  color: var(--tw-text, #1f2937);
  caption-side: top;
}
.tw-roster .tw-roster-status {
  color: var(--tw-muted, #4b5563);
  margin: 0;
}
.tw-player-cap {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  color: var(--tw-cap-text, #fff);
  background: var(--tw-cap-background, #005a9c);
  border-radius: 0.25rem;
}
.tw-player-cap[hidden] {
  display: none;
}

/* Empty icon links stay usable without the kit; theme icon-font rules win.
   A rendered SVG/text child disables every fallback rule. */
:where(a.match-link:empty),
:where(#twap_matches a.fa-link[href^="/tw_match/"]:empty) {
  display: inline-block;
  min-width: 24px;
  text-align: center;
}

:where(a.match-link:empty)::before,
:where(#twap_matches a.fa-link[href^="/tw_match/"]:empty)::before {
  content: "›";
  font-family: sans-serif;
}

:where(a.match-link:empty:focus-visible),
:where(#twap_matches a.fa-link[href^="/tw_match/"]:empty:focus-visible) {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}


/* ============================================================================
   THEME-INDEPENDENT ICON FALLBACKS
   Existing tw_ containers and the admin matches table own these icons.
   :where() removes all selector weight except ::before (0,0,1), so theme
   .fa-* / .icon-* rules (0,1,1) win in either load order.
   Content only: no sizing, fonts or extra boxes that could change theme icons.
   The header back icon also needs a low-specificity line-height fallback.
   Text glyphs inherit color (including white header chevrons and shot markers).
   SVGs carry their own 16px dimensions and neutral #555 strokes; no requests.
   ============================================================================ */

:where(.tw_match_head .fa-chevron-left) {
  line-height: 1;
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .fa-chevron-left)::before {
  content: "‹";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .fa-chevron-right)::before {
  content: "›";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .fa-chevron-down)::before {
  content: "⌄";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .fa-arrows-alt-v)::before {
  content: "↕";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .fa-times)::before {
  content: "✕";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .fa-crosshairs)::before {
  content: "⊕";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-dot-3)::before {
  content: "⋯";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-plus-circled)::before {
  content: "⊕";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-minus)::before {
  content: "−";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-cd)::before {
  content: "⊙";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-target)::before {
  content: "◎";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-cancel-circled)::before {
  content: "⊗";
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .fa-birthday-cake)::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23555%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2010h18v11H3zM3%2014q3%204%206%200%203%204%206%200%203%204%206%200M7%206v4m5-4v4m5-4v4M7%202v1m5-1v1m5-1v1%22%2F%3E%3C%2Fsvg%3E");
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .fa-hand-paper)::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23555%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%2012V5a1.5%201.5%200%200%201%203%200v6-8a1.5%201.5%200%200%201%203%200v8-7a1.5%201.5%200%200%201%203%200v7-5a1.5%201.5%200%200%201%203%200v9c0%204-2%207-6%207h-1c-3%200-4-2-6-5l-3-5c-1-2%201-3%202-2z%22%2F%3E%3C%2Fsvg%3E");
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .fa-weight)::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23555%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%208h16l2%2013H2z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%225%22%20r%3D%223%22%2F%3E%3C%2Fsvg%3E");
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .fa-link)::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23555%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m9%2015%206-6m-5-3%202-2a5%205%200%200%201%208%208l-2%202m-4%204-2%202a5%205%200%200%201-8-8l2-2%22%2F%3E%3C%2Fsvg%3E");
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-chart-bar)::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23555%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2%202v20h20M6%2018v-5h3v5zm6%200V9h3v9zm6%200V4h3v14z%22%2F%3E%3C%2Fsvg%3E");
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-users)::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23555%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%229%22%20cy%3D%227%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M2%2021v-3a7%207%200%200%201%2014%200v3zm14-17a4%204%200%200%201%200%208m3%202a6%206%200%200%201%203%205v2h-3%22%2F%3E%3C%2Fsvg%3E");
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-doc-text)::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23555%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%202h10l4%204v16H5zm10%200v5h4M8%2011h8m-8%204h8m-8%204h5%22%2F%3E%3C%2Fsvg%3E");
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-location-line)::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23555%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2022S4%2013%204%209a8%208%200%200%201%2016%200c0%204-8%2013-8%2013z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%229%22%20r%3D%223%22%2F%3E%3C%2Fsvg%3E");
}

:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) .icon-calendar)::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23555%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%205h18v17H3zM3%2010h18M7%202v5m10-5v5M7%2014h2m3%200h2m3%200h1M7%2018h2m3%200h2%22%2F%3E%3C%2Fsvg%3E");
}

/* Empty match anchors need visible content and natural clickable width.
   Inherit the row's existing white/24px style; theme chart glyphs still win. */
:where(:is([class^="tw_"], [class*=" tw_"], #twap_matches) a.match-link.icon-chart-bar)::before {
  content: "›";
}

/* The small VAL card keeps its table; the regular match icon sits at the right. */
tw_val_match.tw-val > a.match-link {
  float: right;
  margin: 0 8px;
  line-height: 32px;
}

/* Existing leaderboards gain scrolling only when breakdown columns are requested. */
.tw_group_div[data-tw-breakdown="true"] { max-width: 100%; min-width: 0; }
.tw-leader-scroll { overflow-x: auto; max-width: 100%; }
.tw-leader-scroll .tw_group_table { width: 100%; }
.tw-leader-scroll .tw_group_table td { white-space: nowrap; }
.tw-leader-scroll .tw-leader-column { padding: 0.65rem; font-variant-numeric: tabular-nums; }

/* Opt-in competition team lists. Neutral defaults; site themes own overrides. */
.tw-teams {
  color: var(--tw-teams-text, inherit);
  font: inherit;
}
.tw-teams .tw-teams-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--tw-teams-card-width, 14rem)), 1fr));
  gap: var(--tw-teams-gap, 1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tw-teams.tw-teams--list .tw-teams-items {
  grid-template-columns: minmax(0, 1fr);
}
.tw-teams .tw-teams-card {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--tw-teams-background, transparent);
  border: 1px solid var(--tw-teams-border, #ddd);
  border-radius: var(--tw-teams-radius, 0.25rem);
}
.tw-teams .tw-teams-link {
  display: flex;
  align-items: center;
  gap: var(--tw-teams-gap, 1rem);
  padding: var(--tw-teams-padding, 1rem);
  color: var(--tw-teams-link, inherit);
  text-decoration: none;
  height: 100%;
  box-sizing: border-box;
}
.tw-teams .tw-teams-link:hover .tw-teams-name {
  text-decoration: underline;
}
.tw-teams .tw-teams-link:focus-visible {
  outline: 2px solid var(--tw-teams-focus, currentColor);
  outline-offset: 2px;
}
.tw-teams .tw-teams-logo {
  width: var(--tw-teams-logo-size, 3rem);
  height: var(--tw-teams-logo-size, 3rem);
  flex: 0 0 var(--tw-teams-logo-size, 3rem);
  object-fit: contain;
}
.tw-teams .tw-teams-name {
  overflow-wrap: anywhere;
}
