/*
   summary.css

   Dynamic CSS styling for summary/index page of tournament series in OlimpBase
   Fully customizable via CSS Custom Properties (Variables)
*/

:root {

  /* Non-league table and footer widths. Column widths are listed below. */
  --w-sum-table: 628px;
  --w-sum-footer: 520px;

  --w-sum-no: 30px;
  --w-sum-host-city: 113px;
  --w-sum-host-gap: 16px;
  --w-sum-host-flag: 28px;
  --w-sum-year: 50px;
  --w-sum-winner: 186px;
  --w-sum-winner-flag: 28px;
  --w-sum-system: 50px;
  --w-sum-players: 45px;
  --w-sum-games: 45px;
  --w-sum-pgn: 30px;
  --w-sum-boards: 35px;
  --w-sum-teams: 31px;
  --w-sum-members: 70px;
  --w-sum-remarks: 200px;
  --w-sum-final: 120px;
  --w-sum-place: 33px;
  --w-sum-place-2: 33px;
  --w-sum-place-3: 33px;
  --w-sum-place-4: 33px;
  --w-sum-place-5: 33px;
}

body {
  background-color: #F2F2F2;
}

.section-stats {
  height: 26px;
  background-color: #EEEECC;
}

.layout-table:not(.summary-league) {
  width: var(--w-sum-table);
}

.layout-table {
  margin: 0 auto;
  border-collapse: collapse;
  border-spacing: 0;
}

.layout-table--borderless {
  border: 0;
}

.layout-table--framed {
  border: 1px solid #b9b9b9;
}

.info-cell {
  width: 98%;
  text-align: center;
  vertical-align: bottom;
  font: 11pt Georgia, Arial, sans-serif;
}

.help-cell {
  width: 2%;
}

.summary-header-row {
  height: 30px;
}

.summary-table td {
  border-bottom: 1px solid #b9b9b9;
}

.summary-header-row td {
  border-right: 1px solid #b9b9b9;
}

.summary-header-row td:last-child {
  border-right: 0;
}

.summary-note-row td {
  border-right: 0;
}

.summary-data-row > td:first-child,
.summary-data-row > td.host-city-flag,
.summary-data-row > td.year-col,
.summary-data-row > td.winner-flag,
.summary-data-row > td.system-col,
.summary-data-row > td.boards-col,
.summary-data-row > td.teams-col,
.summary-data-row > td.players-col,
.summary-data-row > td.games-col {
  border-left: 1px solid #b9b9b9;
  border-right: 1px solid #b9b9b9;
}

.summary-data-row > td.winner-name {
  border-right: 0;
}

.note-row {
  border-right: 0;
}

.host-city {
  text-align: left; 
  padding-left: 5px;
  border-right: 0;
}

.host-city-gap {
  text-align: right;
  border-left: 0;
  border-right: 0;
}

.host-city-flag,
.winner-flag {  border-left: 0;
  padding-right: 1px;
}

.system-col {
  text-align: center;
}

.boards-col {
  text-align: center;
}

.teams-col {
  text-align: center;
}

.players-col {
  text-align: center;
}

.games-col {
  text-align: center;
}

.pgn-col {
  vertical-align: middle;
  text-align: center;
}

.winner-name {
  text-align: left; 
  padding-left: 5px;
  border-right: 0;
}

.footer-table {
  width: var(--w-sum-footer);
  margin: 0 auto;
  border-collapse: collapse;
  border-spacing: 0;
}

.footer-cell {
  width: 25%;
}

.plain-image {
  border: 0;
}

.url-note {
  font: 10px Courier New, monospace;
  color: darkgray;
}

/* Team-event summary variant (for example, Chess Olympiads). */
.summary-switch-table {
  height: 20px;
}

.summary-switch-cell {  padding-left: 2mm;
  text-align: left;
  vertical-align: bottom;
  font: 8pt "Bitstream Vera Sans", Arial, sans-serif;
}

.summary-kind-team .host-city-gap,
.summary-kind-team .host-city-flag {
  padding-left: 0;
  padding-right: 0;
  font-size: 0;
  line-height: 0;
  white-space: nowrap;
}

.summary-kind-team .year-col,
.summary-kind-team .place-col {  padding-left: 0;
  padding-right: 0;
  white-space: nowrap;
}

.summary-kind-team .system-col {
  white-space: nowrap;
}

.summary-kind-team .pgn-col {  padding-left: 0;
  padding-right: 0;
  white-space: nowrap;
}

.summary-kind-team .cancellation-note {
  text-align: left;
  padding-left: 5px;
}

.summary-kind-team .summary-data-row > td.place-col,
.summary-kind-team .summary-data-row > td.boards-col,
.summary-kind-team .summary-data-row > td.teams-col {
  border-right: 1px solid #b9b9b9;
}

.summary-kind-club .host-city-gap,
.summary-kind-club .host-city-flag,
.summary-kind-club .winner-flag {
  padding-left: 0;
  padding-right: 0;
  font-size: 0;
  line-height: 0;
  white-space: nowrap;
}

.summary-kind-club .year-col {  padding-left: 0;
  padding-right: 0;
  white-space: nowrap;
}

.summary-kind-club .system-col {
  white-space: nowrap;
}

.summary-kind-club .pgn-col {  padding-left: 0;
  padding-right: 0;
  white-space: nowrap;
}

.summary-kind-club .cancellation-note {
  text-align: left;
  padding-left: 5px;
}

/* Remove the text baseline gap below PGN icons. */
.summary-table .pgn-col img {
  display: block;
  margin: 0 auto;
}

.summary-kind-qualification .host-city {
  line-height: 15px;
}

.summary-kind-qualification .host-city-flag img {
  display: block;
  margin: 1.5px auto;
}

.summary-kind-qualification .host-city-flag br {
  display: none;
}

/* Width ownership: this file = non-league; ob-league-other.css = leagues. */
.summary-table.summary-css-grid { table-layout: fixed; }
.summary-table.summary-css-grid:not(.summary-league) {
  min-width: var(--w-sum-table);
}
.summary-css-grid .year-col { white-space: nowrap; }
.summary-css-grid .winner-name { white-space: normal; overflow-wrap: break-word; }

.summary-kind-league .summary-data-row:nth-child(odd) { background-color: #f8f8f5; }
.summary-kind-league .summary-data-row:hover { background-color: #eef3e7; }

.summary-css-grid:not(.summary-league) .sum-col-no { width: var(--w-sum-no); }
.summary-css-grid:not(.summary-league) .sum-col-host-city { width: var(--w-sum-host-city); }
.summary-css-grid:not(.summary-league) .sum-col-host-gap { width: var(--w-sum-host-gap); }
.summary-css-grid:not(.summary-league) .sum-col-host-flag { width: var(--w-sum-host-flag); }
.summary-css-grid:not(.summary-league) .sum-col-year { width: var(--w-sum-year); }
.summary-css-grid:not(.summary-league) .sum-col-winner { width: var(--w-sum-winner); }
.summary-css-grid:not(.summary-league) .sum-col-winner-flag { width: var(--w-sum-winner-flag); }
.summary-css-grid:not(.summary-league) .sum-col-system { width: var(--w-sum-system); }
.summary-css-grid:not(.summary-league) .sum-col-players { width: var(--w-sum-players); }
.summary-css-grid:not(.summary-league) .sum-col-games { width: var(--w-sum-games); }
.summary-css-grid:not(.summary-league) .sum-col-pgn { width: var(--w-sum-pgn); }
.summary-css-grid:not(.summary-league) .sum-col-boards { width: var(--w-sum-boards); }
.summary-css-grid:not(.summary-league) .sum-col-teams { width: var(--w-sum-teams); }
.summary-css-grid:not(.summary-league) .sum-col-members { width: var(--w-sum-members); }
.summary-css-grid:not(.summary-league) .sum-col-remarks { width: var(--w-sum-remarks); }
.summary-css-grid:not(.summary-league) .sum-col-final { width: var(--w-sum-final); }
.summary-css-grid:not(.summary-league) .sum-col-place { width: var(--w-sum-place); }
.summary-css-grid:not(.summary-league) .sum-col-place-2 { width: var(--w-sum-place-2); }
.summary-css-grid:not(.summary-league) .sum-col-place-3 { width: var(--w-sum-place-3); }
.summary-css-grid:not(.summary-league) .sum-col-place-4 { width: var(--w-sum-place-4); }
.summary-css-grid:not(.summary-league) .sum-col-place-5 { width: var(--w-sum-place-5); }

/* summary-layout-club: column total 583px. */
.summary-layout-club {
  --w-sum-no: 25px;
  --w-sum-host-city: 89px;
  --w-sum-year: 28px;
  --w-sum-winner: 158px;
  --w-sum-system: 55px;
  --w-sum-players: 31px;
  --w-sum-games: 31px;
  --w-sum-pgn: 28px;
}

/* summary-layout-individual: column total 621px. */

/* summary-layout-organization: column total 507px. */

/* summary-layout-world-championship: column total 681px. */
.summary-layout-world-championship {
  --w-sum-no: 60px;
  --w-sum-system: 80px;
}

/* summary-layout-team: column total 571px. */
.summary-layout-team {
  --w-sum-no: 20px;
  --w-sum-host-city: 115px;
  --w-sum-host-flag: 26px;
  --w-sum-year: 30px;
  --w-sum-system: 55px;
  --w-sum-boards: 45px;
  --w-sum-teams: 45px;
}

/* summary-layout-qualification: column total 567px. */
.summary-layout-qualification {
  --w-sum-host-city: 115px;
  --w-sum-host-flag: 26px;
  --w-sum-year: 34px;
  --w-sum-system: 37px;
  --w-sum-boards: 36px;
  --w-sum-teams: 36px;
  --w-sum-players: 36px;
  --w-sum-games: 36px;
}

.summary-size-01 { width: 520px; }
.summary-size-02 { width: 25%; }
.summary-size-03 { width: 596px; }
.summary-size-04 { width: 55px; }
.summary-size-05 { width: 135px; }
.summary-size-06 { width: 120px; }
.summary-size-07 { width: 628px; }
.summary-size-08 { width: 98%; }
.summary-size-09 { width: 2%; }
