/*
*********************** Styling for tournament bracket tree ***********************
 */

.bracket-tree{
    display: flex;
    display: -webkit-box; /* wkhtmltopdf uses this one */
    display: -webkit-flex;
    overflow-y: auto;
    width: 100%;
    padding: 40px;
    overflow-x: auto;
}

.bracket-tree .round{

    display: flex;
    display: -webkit-box; /* wkhtmltopdf uses this one */
    display: -webkit-flex;
    flex-direction: column;
    -webkit-flex-direction: column;
    min-width: max-content;

    /*padding:5px;*/
}

.bracket-tree .round-heading {
    text-align: center;
    display: flex;
    display: -webkit-box; /* wkhtmltopdf uses this one */
    display: -webkit-flex;
    flex-direction: column;
    -webkit-flex-direction: column;

    background-color:#e6e3e3;
    width:80%;
    margin:0 auto;
    border:solid 1px #cdc9c9;
    border-radius: 10px;
    padding:5px;
    margin-bottom:20px;
}

.bracket-tree .round-body {
    display: flex;
    display: -webkit-box; /* wkhtmltopdf uses this one */
    display: -webkit-flex;
    flex-grow: 1;
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
    flex-direction: column;
    -webkit-flex-direction: column;

    /*padding:5px;*/
}
.bracket-tree table td{
    border:none;
}

.bracket-tree .round-game-container,
.bracket-tree .game-players-container,
.bracket-tree .game-simple-players-container
{
    width: 100%;
    position: relative;
    /*padding:5px;*/


    border-collapse: collapse;
    display: flex;
    display: -webkit-box; /* wkhtmltopdf uses this one */
    display: -webkit-flex;
    flex-direction: column;
    -webkit-flex-direction: column;
    flex-grow: 1;
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
    justify-content: center;
    -webkit-justify-content:center;
}

.bracket-tree .round-game-container{
    height: 70px;
    width: 200px;
    margin: 0 0 20px 30px;
    /*border: solid thin red*/
}

.bracket-tree .game-simple-players-container{
    width: auto;
    min-width: 120px;
    margin-bottom: 20px;
    font-size: 15px;
}



.bracket-tree .game-players-container{
    /*height: 140px;*/
    width: 250px;
    margin-bottom: 20px;
    font-size: 15px;
    /*border: solid thin green;*/
}


.bracket-tree .game-simple-players-container:last-child,
.bracket-tree .game-players-container:last-child,
.bracket-tree .round-game-container:last-child{
    margin-bottom: 0px;
}

.bracket-tree .round-game-container:first-child{
    /*margin-top:35px;*/
}

.bracket-tree .match{
    /*padding:5px;*/
    /*border: 1px solid black;*/
    height: 120px;
}

.bracket-tree .player-info{
    border: 2px solid #c0c0c0;
    background-color: #f5f5f5;
    border-radius: 10px;
    height: 120px;
    box-sizing: content-box;
}

.bracket-tree .player-info-simple{
    border:solid 2px black;
    box-sizing: content-box;
    /*border-radius: 10px;*/
}
/*
*Data tables
*/

.bracket-tree table.players-data-table,
.bracket-tree table.match-data-table{
    width: 100%;
    height: 100%;
}

/*
*Game data table
*/

.bracket-tree table.match-data-table td{

    border-collapse: collapse;
}

.bracket-tree table.match-data-table tr
{
    border-bottom: 2px solid black;
    height: 50%;
}

.bracket-tree table.match-data-table tr:last-child
{
    border-bottom: none;
}

.bracket-tree table.match-data-table td.player{
    text-align: center;
    vertical-align: bottom;
    padding: 5px;


    /*white-space: nowrap;*/
    /*overflow: hidden;*/
    /*overflow-x: scroll;*/

    /*-ms-overflow-style: none;  !* Internet Explorer 10+ *!*/
    /*scrollbar-width: none;  !* Firefox *!*/
}

.bracket-tree table.match-data-table td.player span.winner-data-wrapper
{
    width:fit-content;
    max-width:180px;
    white-space: nowrap;
    overflow: hidden;
    overflow-x: scroll;

    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
    display: block;
}

.bracket-tree table.match-data-table td.player span.winner-data-wrapper::-webkit-scrollbar {
    display: none;  /* Safari and Chrome */
}

.bracket-tree table.match-data-table td.player div.game-winner{
    width: fit-content;
    padding: 2px 5px;
    margin: auto;
    font-size: 14px;
}

.bracket-tree table.match-data-table td.player div.operation{
    margin:0;
    margin-right: 5px;
    height: 15px;
    text-align: right;
}

.bracket-tree table.match-data-table td.score{
    text-align: center;
    vertical-align: top;
    padding-top: 5px;

}

.bracket-tree table.match-data-table td.score span{
    font-size: 15px;
    display: inline-block;
}

/*
*Players data
 */
.bracket-tree table.players-data-table tr {
    height: 60px;
}

.bracket-tree table.players-data-table tr.info {

    border-collapse:collapse ;
    border-spacing: 0;
    height: 60px;
}

.bracket-tree table.players-data-table tr.info:not(:last-child){
    border-bottom: 2px solid black;
}

.bracket-tree table.players-data-table tr.info td {
    /*padding-left: 20px;*/
    padding-right: 10px;
}

.bracket-tree table.players-data-table tr.info td.player-data span.ratings-rank {
    font-weight:bold;
    color: #C62244;
    font-size: 11px;
    margin-right:3px;
}

.bracket-tree table.players-data-table tr.info td.player-data span.player-club {
    color: #666666;
}


.bracket-tree table.players-data-table tr.info td.entry-data{
    text-align: center;
    vert-align: middle;
    font-weight:bold;
    font-size: 18px;
    width: 50px;
    margin-left: 10px;

}

/*.bracket-tree .round:not(:last-child) .game-players-container::after*/
/*{*/
/*content: "";*/
/*display: block;*/
/*border: 2px solid transparent;*/
/*border-right-color: blue;*/
/*height: calc(100%);*/
/*position: absolute;*/
/*width: 100%;*/
/*top: calc(0px);*/
/*z-index: 10;*/
/*}*/

.bracket-tree .round:not(:last-child) .round-game-container:nth-of-type(odd)::after {
    content: "";
    display: block;
    border: 2px solid transparent;
    border-right-color: blue;
    height: calc(50% + 10px);
    position: absolute;
    /*width: 100%;*/
    top: calc(50%);
    right: 0;
    z-index: 10;
}

.bracket-tree .round:not(:last-child) .round-game-container:nth-of-type(even)::after {
    content: "";
    display: block;
    border: 2px solid transparent;
    border-right-color: green;
    height: calc(50% + 11px);
    position: absolute;
    /*width: 100%;*/
    bottom: calc(50%);
    right: 0;
    z-index: 10;
}

.bracket-tree .round .round-game-container::before {
    content: "";
    display: block;
    border: 2px solid transparent;
    /*box-shadow: 0 0 0 1px black;*/
    border-bottom-color: red;
    position: absolute;
    width: 35px;
    left: -30px;
    bottom: calc(50% - 1px);
    z-index: 1;
}

@supports (-moz-appearance:none) {
    .bracket-tree .round .round-game-container::before
    {
        bottom: calc(50%);
    }
}

/*
specific position formatting
*/
/*.match-bottom{*/
    /*justify-content: flex-end !important;*/
/*}*/

/*.match-top{*/
    /*justify-content: flex-start !important;*/
/*}*/

/*.match-padding-mid{*/
    /*padding-top:107px !important;*/
/*}*/

/*
popover styling
 */

.popover-lg{
    max-width: 500px;
}
