/* OlimpBase Swiss. Szerokosci sa niezalezne dla kazdego typu tabeli.
   Zmieniaj wartosci w odpowiedniej sekcji A-F. Szerokosc calej tabeli
   jest suma widocznych kolumn. Powtarzane rundy korzystaja z jednej zmiennej. */
:root {
  --sw-grid: #A9A9A9;
  --sw-header: #EEEECC;
  --sw-cell: #F2F2F2;
  --sw-white: #FFFFFF;
  --sw-black: #CCCCCC;
  --sw-text: #000000;
  --sw-link: #0000FF;
  --sw-font: Georgia, "Times New Roman", serif;
  --sw-font-size: 10pt;
  --sw-row-height: 22px;
  --sw-header-height: 24px;
  --sw-padding-y: 1px;
  --sw-padding-x: 4px;
  --sw-sort-arrow: #bbb;
}

/* A. STATYSTYKI INDYWIDUALNE */
:root {
  --sw-ind-w-number: 55px; /* numer wiersza */
  --sw-ind-w-title: 45px; /* tytul */
  --sw-ind-w-name: 250px; /* nazwisko zawodnika */
  --sw-ind-w-elo: 55px; /* Elo */
  --sw-ind-w-flag: 35px; /* flaga */
  --sw-ind-w-code: 65px; /* kod federacji */
  --sw-ind-w-board: 45px; /* szachownica */
  --sw-ind-w-points: 55px; /* punkty */
  --sw-ind-w-games: 55px; /* liczba gier / meczow */
  --sw-ind-w-wins: 40px; /* wygrane */
  --sw-ind-w-draws: 40px; /* remisy */
  --sw-ind-w-losses: 40px; /* porazki */
  --sw-ind-w-percent: 55px; /* procent */
  --sw-ind-w-average-elo: 70px; /* srednie Elo */
  --sw-ind-w-performance: 60px; /* performance Elo */
  --sw-ind-w-team-position: 55px; /* miejsce druzyny */
  --sw-ind-w-individual-position: 55px; /* miejsce indywidualne */
  --sw-ind-w-other: 45px; /* dodatkowa kolumna pomocnicza */
}

/* B. STATYSTYKI DRUZYNOWE */
:root {
  --sw-tea-w-number: 55px; /* numer wiersza */
  --sw-tea-w-team: 250px; /* nazwa druzyny */
  --sw-tea-w-code: 65px; /* kod federacji */
  --sw-tea-w-flag: 35px; /* flaga */
  --sw-tea-w-position: 55px; /* miejsce */
  --sw-tea-w-final: 50px; /* final / grupa */
  --sw-tea-w-points: 55px; /* punkty */
  --sw-tea-w-match-points: 55px; /* punkty meczowe */
  --sw-tea-w-games: 55px; /* liczba gier / meczow */
  --sw-tea-w-match-wins: 40px; /* mecze: wins */
  --sw-tea-w-match-draws: 40px; /* mecze: draws */
  --sw-tea-w-match-losses: 40px; /* mecze: losses */
  --sw-tea-w-game-wins: 40px; /* partie: wins */
  --sw-tea-w-game-draws: 40px; /* partie: draws */
  --sw-tea-w-game-losses: 40px; /* partie: losses */
  --sw-tea-w-percent: 55px; /* procent */
  --sw-tea-w-medals: 90px; /* medale */
  --sw-tea-w-other: 45px; /* dodatkowa kolumna pomocnicza */
}

/* C. KARTY ZESPOLOW - cala tabela, lewa i prawa czesc */
:root {
  --sw-card-w-board: 50px; /* szachownica */
  --sw-card-w-name: 270px; /* nazwisko zawodnika */
  --sw-card-w-player-elo: 45px; /* Elo zawodnika */
  --sw-card-w-flag: 35px; /* flaga */
  --sw-card-w-code: 55px; /* kod federacji */
  --sw-card-w-round: 50px; /* wynik rundy */
  --sw-card-w-points: 50px; /* punkty */
  --sw-card-w-games: 40px; /* liczba gier / meczow */
  --sw-card-w-wins: 35px; /* wygrane */
  --sw-card-w-draws: 35px; /* remisy */
  --sw-card-w-losses: 35px; /* porazki */
  --sw-card-w-percent: 50px; /* procent */
  --sw-card-w-average-elo: 45px; /* srednie Elo */
  --sw-card-w-performance: 50px; /* performance Elo */
  --sw-card-w-position: 55px; /* miejsce */
  --sw-card-w-other: 45px; /* dodatkowa kolumna pomocnicza */
}

/* D. ROUND BY ROUND - wyniki meczow i partii */
:root {
  --sw-rbr-w-left-code: 55px; /* lewa strona: code */
  --sw-rbr-w-left-flag: 35px; /* lewa strona: flag */
  --sw-rbr-w-left-name: 250px; /* lewa strona: name */
  --sw-rbr-w-left-elo: 45px; /* lewa strona: elo */
  --sw-rbr-w-score: 80px; /* wynik meczu / partii */
  --sw-rbr-w-right-elo: 45px; /* prawa strona: elo */
  --sw-rbr-w-right-name: 250px; /* prawa strona: name */
  --sw-rbr-w-right-flag: 35px; /* prawa strona: flag */
  --sw-rbr-w-right-code: 55px; /* prawa strona: code */
  --sw-rbr-w-other: 45px; /* dodatkowa kolumna pomocnicza */
  --sw-rbr-round-score-bg: var(--sw-header); /* tlo wynikow poszczegolnych tur */
  --sw-rbr-board-separator-bg: var(--sw-header); /* tlo separatora szachownic */
  --sw-rbr-board-separator-height: 4px; /* grubosc separatora jak w tmatch */
}

/* E. TABELA SZWAJCARSKA - klasyfikacja */
:root {
  --sw-standings-w-position: 55px; /* miejsce */
  --sw-standings-w-team: 250px; /* nazwa druzyny */
  --sw-standings-w-seed: 30px; /* numer startowy */
  --sw-standings-w-code: 55px; /* kod federacji */
  --sw-standings-w-flag: 35px; /* flaga */
  --sw-standings-w-match-points: 50px; /* punkty meczowe */
  --sw-standings-w-tiebreak: 55px; /* kryterium pomocnicze */
  --sw-standings-w-points: 50px; /* punkty */
  --sw-standings-w-games: 40px; /* liczba gier / meczow */
  --sw-standings-w-wins: 35px; /* wygrane */
  --sw-standings-w-draws: 35px; /* remisy */
  --sw-standings-w-losses: 35px; /* porazki */
  --sw-standings-w-percent: 50px; /* procent */
  --sw-standings-w-elo: 45px; /* Elo */
  --sw-standings-w-performance: 50px; /* performance Elo */
  --sw-standings-w-round: 50px; /* wynik rundy */
  --sw-standings-w-final: 40px; /* final / grupa */
  --sw-standings-w-medals: 85px; /* medale */
  --sw-standings-w-board: 40px; /* szachownica */
  --sw-standings-w-title: 40px; /* tytul */
  --sw-standings-w-other: 55px; /* dodatkowa kolumna pomocnicza */
}

/* F. CROSSTABLE - wyniki z przeciwnikami */
:root {
  --sw-cross-w-position: 55px; /* miejsce */
  --sw-cross-w-team: 250px; /* nazwa druzyny */
  --sw-cross-w-seed: 30px; /* numer startowy */
  --sw-cross-w-code: 55px; /* kod federacji */
  --sw-cross-w-flag: 35px; /* flaga */
  --sw-cross-w-match-points: 50px; /* punkty meczowe */
  --sw-cross-w-tiebreak: 55px; /* kryterium pomocnicze */
  --sw-cross-w-points: 50px; /* punkty */
  --sw-cross-w-games: 40px; /* liczba gier / meczow */
  --sw-cross-w-wins: 35px; /* wygrane */
  --sw-cross-w-draws: 35px; /* remisy */
  --sw-cross-w-losses: 35px; /* porazki */
  --sw-cross-w-percent: 50px; /* procent */
  --sw-cross-w-elo: 45px; /* Elo */
  --sw-cross-w-performance: 50px; /* performance Elo */
  --sw-cross-w-opponent: 50px; /* wynik z przeciwnikiem */
  --sw-cross-w-final: 40px; /* final / grupa */
  --sw-cross-w-medals: 85px; /* medale */
  --sw-cross-w-board: 40px; /* szachownica */
  --sw-cross-w-title: 40px; /* tytul */
  --sw-cross-w-other: 55px; /* dodatkowa kolumna pomocnicza */
}

/* Informacje i uwagi poza tabelami A-F. */
:root {
  --sw-info-w-info-label: 220px;
  --sw-info-w-info-value: 400px;
  --sw-info-w-flag: 35px;
  --sw-info-w-other: 45px;
  --sw-note-w-note: min(720px, 90vw);
  --sw-note-w-other: 45px;
}

body.ob-swiss {
  color: var(--sw-text);
  background-color: var(--sw-cell);
  font-family: var(--sw-font);
}
.ob-sw-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 16px auto;
}
.ob-sw-wrap:focus-visible { outline: 2px solid navy; outline-offset: 2px; }
.ob-swiss table.ob-sw-table {
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  border: 1px solid var(--sw-grid);
  margin: 0 auto;
  max-width: none;
  background: var(--sw-cell);
  color: var(--sw-text);
  font: var(--sw-font-size) var(--sw-font);
}
.ob-swiss .ob-sw-table td,
.ob-swiss .ob-sw-table th {
  box-sizing: border-box;
  height: var(--sw-row-height);
  padding: var(--sw-padding-y) var(--sw-padding-x);
  border: 1px solid var(--sw-grid);
  background-color: var(--sw-cell);
  color: var(--sw-text);
  font-family: var(--sw-font);
  font-size: var(--sw-font-size);
  vertical-align: middle;
  text-align: center;
}
.ob-swiss .ob-sw-table th,
.ob-swiss .ob-sw-table .bog {
  background-color: var(--sw-header);
  height: var(--sw-header-height);
  font-weight: bold;
}
.ob-swiss .ob-sw-table .sw-text,
.ob-swiss .ob-sw-table .let { text-align: left; }
.ob-swiss .ob-sw-table .rit { text-align: right; }
.ob-swiss .ob-sw-table a { color: var(--sw-link); font: inherit; }
.ob-swiss .ob-sw-table img { vertical-align: middle; }
.ob-swiss .ob-sw-table caption { text-align: right; padding-bottom: 4px; }
.ob-swiss .ob-sw-table .whi { background-color: var(--sw-white); }
.ob-swiss .ob-sw-table .bla { background-color: var(--sw-black); }
.ob-swiss .ob-sw-info td,
.ob-swiss .ob-sw-note td { white-space: normal; overflow-wrap: anywhere; }
.ob-swiss .ob-sw-players td,
.ob-swiss .ob-sw-teams td { white-space: nowrap; }
.ob-swiss .ob-sw-players .sw-text,
.ob-swiss .ob-sw-teams .sw-text { white-space: normal; }

.ob-swiss .ob-sw-table td.bog > span { font: inherit !important; color: inherit !important; }
.ob-swiss .ob-sw-match td[colspan="3"]:first-child { text-align: right; }

/* Czarny wynik meczu; odnosnik i jego dzialanie pozostaja bez zmian. */
.ob-swiss .ob-sw-match .sw-match-score,
.ob-swiss .ob-sw-match .sw-match-score a { color: #000; }

.ob-swiss .ob-sw-match .sw-match-round-score {
  background-color: var(--sw-rbr-round-score-bg) !important;
}

.ob-swiss .ob-sw-match .sw-match-board-separator {
  height: var(--sw-rbr-board-separator-height);
  min-height: var(--sw-rbr-board-separator-height);
  padding: 0 !important;
  background-color: var(--sw-rbr-board-separator-bg) !important;
  line-height: 0;
  font-size: 0;
}

/* Wskazniki sortowania - wzor ob-alltimestats.css. */
.ob-swiss .sw-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.ob-swiss .sw-hlbl { display: inline-block; }
.ob-swiss .sw-arr {
  display: inline-block;
  color: var(--sw-sort-arrow);
  font-size: 8px;
  line-height: 1;
  vertical-align: middle;
}
.ob-swiss .sw-up { margin-right: 6px; }
.ob-swiss .sw-down { margin-left: 6px; }
.ob-swiss .sw-hidden { visibility: hidden; }
