* {
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    font-size: 16px;
    font-family: Helvetica, sans-serif;
    background-color:rgba(100, 149, 237, 0.25);
}

body {
    height: 100%;
    width: 100%;
    margin: 0;
}

.container {
    display: grid;
    height: 100%;
    width: 100%;
    grid-template-columns: 25% 50% 25%;
    grid-template-rows: 13% 20% 20% 40% 7%;
    grid-template-areas: "headline headline headline"
                         "info-1 game-box info-2"
                         "info-1 game-box info-2"
                         "info-3 match-box info-4"
                         "footer footer footer";
}

.container-charts {
    display: grid;
    height: 100%;
    width: 100%;
    grid-template-columns: 26% 16% 16% 16% 26%;
    grid-template-rows: 13% 20% 20% 40% 7%;
    grid-template-areas: "headline headline headline headline headline"
                         "info-5 game-box game-box game-box info-6"
                         "info-5 game-box game-box game-box info-6"
                         "info-7 match-box match-box match-box info-6"
                         "footer footer footer footer footer";
}

/* hiding views in scoreboard mode */
#info-chart-1,
#info-chart-2,
#info-chart-4,
#info-chart-6 {
    display: none;
}


.headline {
    grid-area: headline;
    display: grid;
    grid-template-columns: 20% 60% 20%;
    grid-template-rows: 100%;
    justify-content: space-between;
    align-items: center;
    background-color: dodgerblue;
    border-bottom-style: solid;
    padding: 1rem;
}

#selection-headline {
    grid-template-columns: 50% 50%;
}

.headline-rt {
    text-align: right;
    font-size: 3rem;
    font-variant: small-caps;
}
.headline-rt a {
    text-decoration: none;
}

#container-setmatch {
    display:block;
}
#match-splashpage {
    margin-left: 1rem;
}

.site-name {
    font-size: 4rem;
    font-style:italic;
    font-weight: 800;
    font-family:'Times New Roman', Times, serif;
    text-align: left;
}


#match-detail,
#match-location {
    font-size: 2rem;
    font-weight: 400;
}

#match-location {
    text-align: right;
}

#event-bar {
    justify-self: center;
}

.event {
    display:flex;
    flex-wrap:nowrap;
    margin-bottom: 2px;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    font-weight: 800;
    font-family:'Times New Roman', Times, serif;
}

.event div {
    align-self: center;
    text-align: center;
    margin: 6px;
    text-align: center;
    flex-basis: auto;
}

#event-name {
    font-size: 4rem;
    font-style:italic;
    flex-shrink: 1;
    text-overflow: clip;
}


.chart-set-1 {
    height: 95%;
    padding: 0.5rem;
}

.info-chart {
    width: auto;
    padding: 0.5rem;
}
.info-chart h2,
.info-scores h2,
.info-scores h3 {
    text-align: center;
}

.info-sponsors-apta {
    text-align: center;
}
.info-sponsors-apta img {
    max-width: 70%;
}

#scores-subtitle {
    display: none;    
}

.info-profile {
    width: auto;
    background-color:rgba(26, 115, 116, 0.3);
}

#player-profile-1a {
    grid-area: info-6;
    border-bottom-style: solid;
}

#info-chart-1 {
    grid-area: info-1;
    border-bottom-style: solid;
}
#info-chart-2,
#player-profile-2a {
    grid-area: info-2;
}
#info-chart-3,
#player-profile-1b {
    grid-area: info-3;
}
#info-chart-4,
#player-profile-2b {
    grid-area: info-4;
}

#info-chart-5 {
    grid-area: info-5;
    border-bottom-style: solid;
}

#info-chart-6 {
    grid-area: info-8;
    border-bottom-style: solid;
}

#info-whoswho {
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-size: 2rem;
  text-align: center;
}
#player-hints-tbl {
    margin: auto;
}
#player-hints-tbl td:nth-child(2) {
    text-align: left;
}
#player-hints-tbl td:first-child {
    text-align: right;
    font-weight: 600;
}
  


#info-qrcode-chartitem {
    display: flex;
    justify-content: space-around;
}

#info-qrcode-header-scoreboard {
    display: block;
}
#info-qrcode-header-phone {
    display: none;
}
#score-bracket-return,
#score-link-apta-results {
    display: none;
}

#info-scores {
    grid-area: info-6;
    overflow-y: hidden;
}

#info-sponsors-apta {
    grid-area: info-7;
    overflow-y: hidden;
}

.player-profile-name {
    font-size: 2.5rem;
    text-align: center;
    margin: 0.5rem 0.5rem;
}

.player-profile-img {
    display: block;
    height: 40%;
    width: 70%;
    margin: auto;
}

.player-profile-fullname {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
}

.player-profile-hometown,
.player-profile-homeclub {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 400;
    margin: .3rem auto;
}

.player-profile-pti {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin: .3rem auto;
}




#transition-box {
  text-align: center;
  background-color: rgba(190, 214, 55, 0.5);
}

#transition-box h2 {
  font-size: 5rem;
  font-weight: 800;
  margin: 2rem;
}

#transition-box p {
  font-size: 2.5rem;
  margin: 2rem;
}



.transition-box,
.game-box {
    grid-area: game-box;
    border-style: none solid solid solid;
}

#game-score {
    background-color:bisque;
    display: flex;
    height: 100%;
    align-content:space-around;
    justify-content: center;
}

.point_box {
    display: flex;
    width:50%;
    height: 100%;
    flex-direction: column;
    justify-items: center;
    align-items: center;
    padding-top: 1rem;
}

.point_box h1 {
    padding: 1rem 1rem;
    margin: 0px;
    color:coral;
    font-size: 10rem;
    text-align: center;
    text-justify: center;
}

.point-box-name {
    padding: .2rem .1rem .1rem .1rem;
    margin: 0px;
    font-size: 2.5rem;
}

#pt-t1-name,
#pt-t2-name {
    overflow:hidden;
}




.match-box {
    grid-area: match-box;
    height: 100%;
    border-left-style: solid;
    border-right-style: solid;
}



.score-tbl tr:first-child {
    background-color:rgba(100, 149, 237, 0.5);
}

.score-tbl {
    width: 90%;
    margin: 3rem auto;
    max-height: 100%;
    border-collapse: collapse;
    overflow-y:hidden;
    
}

.score-tbl-extras {
    display: none;
}


.score-row-winner {
    /* background-color: rgba(46, 139, 87, 0.5); */
    background-color: rgba(190, 214, 55, 0.5);
}

.score-name, .score-matchname {
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    padding: .3rem .5rem .3rem .3rem !important;
}

.score-court {
    text-align: right;
    font-size: 1rem;
    font-weight: 600;
    padding: .3rem .5rem .3rem .3rem !important;
}

.score-item-tb {
    padding: 0px 0px 2px 0px;
    vertical-align: top;
    margin-left: 0px;
    width: 1rem;
    height: 1.5rem;
    text-align: left;
    font-size: 1rem;
}

.score-item-set, .score-item-game {
    width: 2.5rem;
    height: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.score-item-game {
    background-color: bisque;
}

.score th {
    padding: 0rem 0.5rem;
    font-size: 1.5rem;
}

#scoreboard-tbl {
    width: 100%;
    max-height: 100%;
    border-collapse: collapse;
    overflow-y:hidden;
}
#scoreboard-tbl td {
    text-align: center;
}

#scoreboard-tbl tr {
    height: 20%;
}

#scoreboard-tbl tr:first-child {
    background-color:rgba(100, 149, 237, 0.5);
}

.scoreboard-name {
    text-align: left;
    font-size: 3rem;
    font-weight: 600;
    padding: .3rem 1.5rem .3rem .3rem !important;
}

.scoreboard th {
    padding: 0rem 0.5rem;
    font-size: 3rem;
}

#scoreboard-tbl th:nth-child(n+2) {
    text-align: center;
}


#scoreboard-tbl th:nth-child(2),
#scoreboard-tbl td:nth-child(2) {
    text-align: left;
}

.scoreboard-ball-td {
    width: 4rem;
}
  
.scoreboard-ball {
    border-radius: 3rem;
    height: 4rem;
    width: 4rem;
    margin: .2rem;
}
  
/* 
#ball-t1a,
#ball-t1b,
#ball-t2a,
#ball-t2b {
    border-radius: 3rem;
    font-size: 3rem;
    width: 4rem;
    text-align: center;
    font-weight: 600;
} */

.scoreboard-tb {
    padding: 0px 0px 2px 0px;
    vertical-align: top;
    margin-left: 0px;
    width: 20px;
    height: 20px;
    text-align: left;
    font-size: 2rem;
}

.scoreboard-s, .scoreboard-g {
    width: 30px;
    height: 30px;
    text-align: center;
    font-size: 3.5rem;
}

.scoreboard-g {
    background-color: bisque;
}


#sponsor {
    background-color:rgba(26, 116, 69, 0.5);
    font-family:'Times New Roman', Times, serif;
    font-variant-caps: petite-caps;
    font-size: 1rem;
    height: 100%;
    width: 100%;
}

#sponsor h1 {
    margin-top:0;
}

#sponsor p {
    text-align: center;
    font-size: 2rem;
    transform: rotate(-20deg);
}

#match-list-img {
    position: fixed;
    right: 3rem;
    width: 20%;
    max-width: 200px;
}

#match-list-tbl {
    font-size: 1.5rem;
    table-layout: auto;
    border-spacing: 0px 2px;
}

#match-list-tbl th {
    text-align: left;
    font-size: 1.5rem;
}

#match-list-tbl tr:nth-child(even) {
    background-color: bisque;
}

#match-list-tbl td:first-child {
    font-weight: 600;
    text-align: center;
    background-color: rgb(184, 247, 221);
    font-size: 2rem;
    border-style: solid;
    border-width: 2px;
    border-radius: 2.5rem;
    height: 5rem;
    width: 5rem;
}

#match-list-tbl td:nth-child(2),
#match-list-tbl td:nth-child(3) {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    background-color: rgb(240, 183, 177);
    border-style: solid;
    border-width: 2px;
    border-radius: 2.5rem;
}

#match-list-tbl td:nth-child(7) {
    text-align: center;
}

#admin-mode-toggle {
    font-size: 3rem;
    position:fixed;
    bottom: 3rem;
    right: 3rem;    
}

.footer {
    grid-area: footer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0rem 1rem;
    font-size: 2rem;
    border-top-style: solid;
}


#selection-container {
    text-align: center;
}

#selection-container h2 {
    font-size: 4rem;
}

#selection-container h4 {
    font-size: 3rem;
}
  
#selection-container table {
    margin-left: auto;
    margin-right: auto;
    border-spacing: 2rem;
}
  
#selection-server-matches-clear-filter {
    font-size: 3rem;
}
  
#selection-server-events-div table td {
    padding: 1rem;
    background-color: bisque;
    border-style: solid;
    border-radius: .5rem;
    font-size: 3rem;
}
  
#selection-server-events-div table td:nth-child(2) {
    text-align: left;
    border-style: none;
}


.server-matches-tbl {
    margin-top: 2rem;
    width: 90%;
}
.server-matches-tbl td {
    vertical-align: middle;
}

.server-matches-tbl td:nth-child(1) {
    width: 4rem;
    height: 4rem;
    background-color: grey;
    border-radius: 4rem;
    font-size: 4rem;
    font-weight: 600;
    text-align: center;
}
.server-matches-tbl td:nth-child(1n+2) {
    font-size: 3rem;
}
.server-matches-tbl td:nth-child(2) {
    text-align: center;
}
.server-matches-tbl td:nth-child(3) {
    text-align: left;
}
.server-matches-tbl td:nth-child(2) {
    font-weight: 600;
    background-color: cornflowerblue;
    border-radius: 0.8rem;
    padding: 1rem;
}
  

.footer a:link,
.footer a:visited {
    font-weight: 600;
    color:rgb(80, 79, 79);
    text-decoration: none;
}





@media screen and (orientation: landscape) and (max-width: 500px) {

    html {
        font-size: 5px;
    }
    .container,
    .container-charts {
        display: grid;
        height: 90%;
        width: 100%;
        grid-template-columns: 100%;
        grid-template-rows: 15% auto 45%;
        grid-template-areas: "headline"
                             "game-box"
                             "match-box";
    }

    .game-box,
    #game-score {
        height: auto;
    }
    .point_box {
        height: auto;
    }
    .point_box h1 {
        font-size: 8rem;
    }
    #match-location {
        display: none;
    }
    
    #match-detail,
    #match-location,
    .info-profile,
    #info-1,
    #info-3,
    #info-2,
    #info-4,
    #info-5,
    #info-6,
    #info-chart-5,
    .footer {
        display: none;
    }
}


@media only screen and (max-width: 600px) {
    html {
        font-size: 6px;
    }
}

@media only screen and (min-width: 600px) {
    html {
        font-size: 7px;
    }
}

@media only screen and (min-width: 768px) {
    html {
        font-size: 9px;
    }
}

@media only screen and (min-width: 992px) {
    html {
        font-size: 12px;
    }
}

@media only screen and (min-width: 1200px) {
    html {
        font-size: 14px;
    }
}

@media screen and (orientation: portrait) {

    .container,
    .container-charts {
        display: grid;
        height: auto;
        width: 100%;
        grid-template-columns: 100%;
        grid-template-rows: auto;
        grid-template-areas: "headline"
                             "game-box"
                             "match-box"
                             "info-6"
                             "info-8"
                             "info-7"
                             "info-1"
                             "info-2"
                             "info-3"
                             "info-4"
                             "info-5"
                             "footer";
    }

    .info-chart {
        min-height: 30vh;
        border-left-style: none;
        border-right-style: none;
        border-bottom-style: solid;
    }

    .info-chart h2,
    .info-scores h2,
    .info-sponsors-apta {
        font-size: 3rem;
    }
    .info-scores h3,
    .info-sponsors-apta {
        font-size: 2rem;
        font-weight: 400;
    }

    .chart-set-1 {
        height: 100%;
        padding: 0.5rem;
    }
    
    #info-chart-1,
    #player-profile-1a,
    #info-chart-2,
    #player-profile-2a,
    #info-chart-3,
    #player-profile-1b,
    #info-chart-4,
    #player-profile-2b,
    #info-chart-5,
    #info-chart-6,
    #info-scores,
    #info-sponsors-apta {
        border-left-style: none;
        border-right-style: none;
        border-top-style: solid;
        border-bottom-style: none;
        display: block;
    }

    #scores-subtitle {
        display: block;
    }
    
    #info-qrcode-header-scoreboard {
        display: none;
    }
    #info-qrcode-header-phone {
        display: block;
    }
    #score-bracket-return,
    #score-link-apta-results {
        display: block;
    }

    .game-box,
    .transition-box {   
        min-height: 20vh;
    }

    .point_box h2 {
        font-size: 3rem;
    }
    
    .player-profile-name {
        font-size: 4rem;
    }
    
    .player-profile-img {
        height: 55%;
    }

    .player-profile-fullname {
        font-size: 3rem;
    }
    
    .player-profile-hometown,
    .player-profile-homeclub {
        font-size: 2.5rem;
    }
    
    .player-profile-pti {
        font-size: 3rem;
    }

    
    .score-tbl {
        margin: 6rem auto;
        max-height: 100%;
        border-collapse: collapse;
        overflow-y:hidden;
    }

    .score-tbl-extras {
        display: table;
    }
    
        
    .score-name, .score-matchname {
        font-size: 3rem;
        padding: .3rem .5rem .3rem .3rem !important;
    }
    
    .score-court {
        font-size: 2rem;
        padding: .3rem .5rem .3rem .3rem !important;
        text-wrap: nowrap;
    }
    
    .score-item-tb {
        padding: 0px 0px 2px 0px;
        width: 2rem;
        height: 3rem;
        font-size: 2.5rem;
    }
    
    .score-item-set, .score-item-game {
        width: 5rem;
        height: 3rem;
        font-size: 4rem;
    }
    
    .score th {
        padding: 0rem 0.5rem;
        font-size: 3rem;
    }
    

    .footer {
        min-height: 6vh;
        border-top-style: solid;
    }

}
