/* =========================================================
   DEBEL V2 — pary jedna pod druga, kompaktowo
   Obsługuje zarówno stare .tfp-pair-inline, jak i nowe .tfp-pair-stack.
   Tabela / Mecze / Wyniki — liga + turniej
   ========================================================= */

/* NOWE + STARE renderowanie par */
.tfp-pair-stack,
.tfp-pair-inline {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  vertical-align: middle !important;
  line-height: 1.03 !important;
}

/* slash pomiędzy zawodnikami w starym renderowaniu nie jest już potrzebny */
.tfp-pair-inline > .tfp-pair-separator {
  display: none !important;
}

.tfp-pair-stack > .tfp-pair-member,
.tfp-pair-inline > a,
.tfp-pair-inline > span:not(.tfp-pair-separator) {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.tfp-pair-member + .tfp-pair-member,
.tfp-pair-inline > a + a,
.tfp-pair-inline > span:not(.tfp-pair-separator) + span:not(.tfp-pair-separator) {
  margin-top: 1px !important;
}

/* ---------- TABELA ---------- */
#table .league-standings-table th:nth-child(2),
#table .league-standings-table td:nth-child(2) {
  min-width: 180px !important;
  width: 1% !important;
}

#table .league-player-inline,
#table .league-player-inline > div,
#table .league-player-inline strong {
  min-width: 0 !important;
  max-width: 100% !important;
}

#table .league-player-inline strong {
  display: block !important;
  line-height: 1.03 !important;
}

#table .league-player-inline .tfp-pair-stack,
#table .league-player-inline .tfp-pair-inline {
  width: 100% !important;
}

#table .league-player-inline .tfp-pair-member,
#table .league-player-inline .tfp-pair-inline > a,
#table .league-player-inline .tfp-pair-inline > span:not(.tfp-pair-separator) {
  font-size: 10.5px !important;
  font-weight: 650 !important;
  line-height: 1.04 !important;
  letter-spacing: -0.015em !important;
  color: #203653 !important;
}

/* nie zwiększaj wysokości tabeli bardziej niż potrzeba */
#table .league-standings-table tbody td {
  vertical-align: middle !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

#table .league-player-inline {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* ---------- MECZE ---------- */
#matches .league-match-player strong,
#matches .league-match-played-name {
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

#matches .league-match-player .tfp-pair-stack,
#matches .league-match-player .tfp-pair-inline,
#matches .league-match-played-name .tfp-pair-stack,
#matches .league-match-played-name .tfp-pair-inline {
  width: 100% !important;
  gap: 0 !important;
}

#matches .league-match-player--right .tfp-pair-stack,
#matches .league-match-player--right .tfp-pair-inline {
  align-items: flex-end !important;
  text-align: right !important;
}

#matches .league-match-player .tfp-pair-member,
#matches .league-match-player .tfp-pair-inline > a,
#matches .league-match-player .tfp-pair-inline > span:not(.tfp-pair-separator) {
  font-size: 10.5px !important;
  font-weight: 650 !important;
  line-height: 1.04 !important;
  letter-spacing: -0.012em !important;
}

#matches .league-match-played-name .tfp-pair-member,
#matches .league-match-played-name .tfp-pair-inline > a,
#matches .league-match-played-name .tfp-pair-inline > span:not(.tfp-pair-separator) {
  font-size: 10px !important;
  font-weight: 650 !important;
  line-height: 1.03 !important;
}

/* ---------- WYNIKI ---------- */
#results .tfp-pair-stack,
#results .tfp-pair-inline {
  gap: 0 !important;
}

#results .tfp-pair-member,
#results .tfp-pair-inline > a,
#results .tfp-pair-inline > span:not(.tfp-pair-separator) {
  font-size: 9.75px !important;
  font-weight: 650 !important;
  line-height: 1.03 !important;
  letter-spacing: -0.012em !important;
}

#results .league-results-player .tfp-pair-stack,
#results .league-results-player .tfp-pair-inline {
  align-items: flex-start !important;
  text-align: left !important;
}

#results .league-results-matrix thead .tfp-pair-stack,
#results .league-results-matrix thead .tfp-pair-inline {
  align-items: center !important;
  text-align: center !important;
}

/* ---------- MOBILE ---------- */
@media (max-width: 760px) {
  #table .league-standings-table th:nth-child(2),
  #table .league-standings-table td:nth-child(2) {
    min-width: 150px !important;
  }

  #table .league-player-inline .tfp-pair-member,
  #table .league-player-inline .tfp-pair-inline > a,
  #table .league-player-inline .tfp-pair-inline > span:not(.tfp-pair-separator) {
    font-size: 9.6px !important;
    line-height: 1.02 !important;
  }

  #matches .league-match-player .tfp-pair-member,
  #matches .league-match-player .tfp-pair-inline > a,
  #matches .league-match-player .tfp-pair-inline > span:not(.tfp-pair-separator) {
    font-size: 10px !important;
    line-height: 1.03 !important;
  }

  #results .tfp-pair-member,
  #results .tfp-pair-inline > a,
  #results .tfp-pair-inline > span:not(.tfp-pair-separator) {
    font-size: 9.25px !important;
    line-height: 1.02 !important;
  }
}

/* =========================================================
   DEBEL V3 — jeszcze niższe Wyniki + bez kropek w Meczach
   ========================================================= */

/* Wyniki: zmniejszamy przede wszystkim wysokość WIERSZY po lewej
   i odpowiadających im komórek, bez ściskania nazwisk poziomo. */
#results .league-results-matrix tbody tr {
  height: 42px !important;
  min-height: 42px !important;
}

#results .league-results-matrix tbody th.league-results-player,
#results .league-results-matrix tbody td.league-results-cell {
  height: 42px !important;
  min-height: 42px !important;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  vertical-align: middle !important;
}

#results .league-results-matrix tbody th.league-results-player {
  padding-left: 12px !important;
  padding-right: 10px !important;
}

#results .league-results-player .tfp-pair-stack,
#results .league-results-player .tfp-pair-inline {
  justify-content: center !important;
  line-height: 1 !important;
}

#results .league-results-player .tfp-pair-member,
#results .league-results-player .tfp-pair-inline > a,
#results .league-results-player .tfp-pair-inline > span:not(.tfp-pair-separator) {
  font-size: 9.6px !important;
  font-weight: 650 !important;
  line-height: 1.02 !important;
}

#results .league-results-matrix thead th {
  height: 44px !important;
  min-height: 44px !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  vertical-align: middle !important;
}

#results .league-results-matrix thead .tfp-pair-member,
#results .league-results-matrix thead .tfp-pair-inline > a,
#results .league-results-matrix thead .tfp-pair-inline > span:not(.tfp-pair-separator) {
  font-size: 9.3px !important;
  line-height: 1.02 !important;
}

/* Wyniki: kompaktowe znaki i wyniki w środku komórek. */
#results .league-results-cell {
  font-size: 10px !important;
  line-height: 1 !important;
}

#results .league-results-cell--self span {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  font-size: 9px !important;
  line-height: 16px !important;
}

/* Mecze: kolorowe kropki przy parach nic nie wnoszą — chowamy je. */
#matches .league-dot,
#matches .league-dot--alt {
  display: none !important;
}

#matches .league-match-player {
  gap: 0 !important;
}

#matches .league-match-player--left,
#matches .league-match-player--right {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#matches .league-match-player strong {
  width: 100% !important;
}

@media (max-width: 760px) {
  #results .league-results-matrix tbody tr,
  #results .league-results-matrix tbody th.league-results-player,
  #results .league-results-matrix tbody td.league-results-cell {
    height: 38px !important;
    min-height: 38px !important;
  }

  #results .league-results-matrix tbody th.league-results-player,
  #results .league-results-matrix tbody td.league-results-cell {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
  }

  #results .league-results-player .tfp-pair-member,
  #results .league-results-player .tfp-pair-inline > a,
  #results .league-results-player .tfp-pair-inline > span:not(.tfp-pair-separator) {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  #results .league-results-matrix thead th {
    height: 40px !important;
    min-height: 40px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
}

/* =========================================================
   DEBEL V4 — nazwiska w Meczach idealnie wyśrodkowane
   + sekcja sponsorów bez powtórzonego czarnego tytułu
   ========================================================= */

/* Mecz: obie pary są wyśrodkowane w swoich polach. */
#matches .league-match-player,
#matches .league-match-player--left,
#matches .league-match-player--right,
#matches .league-match-player strong,
#matches .league-match-played-name {
  text-align: center !important;
  justify-content: center !important;
}

#matches .league-match-player .tfp-pair-stack,
#matches .league-match-player .tfp-pair-inline,
#matches .league-match-player--left .tfp-pair-stack,
#matches .league-match-player--left .tfp-pair-inline,
#matches .league-match-player--right .tfp-pair-stack,
#matches .league-match-player--right .tfp-pair-inline,
#matches .league-match-played-name .tfp-pair-stack,
#matches .league-match-played-name .tfp-pair-inline {
  align-items: center !important;
  text-align: center !important;
  justify-content: center !important;
}

#matches .league-match-player .tfp-pair-member,
#matches .league-match-player .tfp-pair-inline > a,
#matches .league-match-player .tfp-pair-inline > span:not(.tfp-pair-separator),
#matches .league-match-played-name .tfp-pair-member,
#matches .league-match-played-name .tfp-pair-inline > a,
#matches .league-match-played-name .tfp-pair-inline > span:not(.tfp-pair-separator) {
  width: 100% !important;
  text-align: center !important;
}

/* Sponsorzy: zostawiamy tylko mały niebieski nagłówek typu PARTNERZY TURNIEJU/LIGI.
   Czarny, powtórzony tytuł "Partnerzy i sponsorzy" jest zbędny. */
.tfp-sponsor-board__head h2 {
  display: none !important;
}

.tfp-sponsor-board__head > div {
  display: flex !important;
  align-items: center !important;
}

.tfp-sponsor-board__head > div > span {
  margin-bottom: 0 !important;
}

@media (max-width: 760px) {
  #matches .league-match-player,
  #matches .league-match-player--left,
  #matches .league-match-player--right,
  #matches .league-match-player strong,
  #matches .league-match-played-name {
    text-align: center !important;
  }

  .tfp-sponsor-board__head {
    gap: 10px !important;
  }
}


/* V5 — sekcja sponsorów: bez zbędnego szarego opisu dla gościa i zalogowanych. */
.tfp-sponsor-board__head > p {
  display: none !important;
}

.tfp-sponsor-board__head {
  align-items: center !important;
  min-height: 24px !important;
}

.tfp-sponsor-board__head > div {
  min-height: 24px !important;
}


/* =========================================================
   DEBEL V6 — delikatny odstęp między setami w macierzy Wyniki
   ========================================================= */
#results .league-results-cell.is-win,
#results .league-results-cell.is-loss {
  word-spacing: 4px !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  #results .league-results-cell.is-win,
  #results .league-results-cell.is-loss {
    word-spacing: 3px !important;
  }
}
