/* 
    Created on : 26.8.2023
    Author     : Janne Mustonen
*/

div.target-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 38vw;
}

canvas.target{
    background-image: url(gfx/target.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    width: 90%;
    height: 90%;
}

div.shotDirectionWrapper{
    justify-content: center;
    align-items: center;
    height: 2vw;
}

div.shotDirectionWrapper canvas{
    height: 100%;
}

ul.target5{
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    border: 1px solid black;
    border-radius: 4px;
    width: max-content;
    list-style: none;
    margin-left: auto;
    margin-right: auto;
    padding: 1vw;
}

ul.target5 li{
    border-radius: 50%;
    width: 4vw;
    height: 4vw;
    background-color: black;
    margin-right: 1vw;
    cursor: pointer;
}

ul.target5 li.open{
    background-color: black;
    border: 2px solid black;
}

ul.target5 li.closed{
    background-color: white;
    border: 2px solid black;
}

div.results_table{
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    width: 100%;
}

/* Table styles */
div.results_table table{
    width: 100%;
    border-collapse: collapse;
    font-size: 3vh;
}

/* Header & Row styles */
div.results_table th, div.results_table td {
    padding: 0.5vh 0.8vw;
    border: 1px solid #dcdcdc;
    text-align: center;
}

div.results_table th {
    background-color: black;
    color: white;
}

/* Stripe rows for better readability */
div.results_table tbody tr:nth-child(even) {
    background-color: #E7E7E7;
}

div.results_table tbody tr:nth-child(odd) {
    background-color: white;
}

div.results_table tbody tr.miss{
    color: red;
}

div.results_table tfoot{
    font-weight: bold;
    border-top: 2px solid black;
}

/* Flaps */
#target5flaps tbody{
    background-color: white;
}

#target5flaps div.flap{
    border-radius: 50%;
    width: 6vw;
    height: 6vw;
    background-color: black;
    margin: 1vh 1vw;
    cursor: pointer;
}

#target5flaps div.open{
    background-color: black;
    border: 2px solid black;
}

#target5flaps div.closed{
    background-color: white;
    border: 2px solid black;
}

#target5flaps tbody td{
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    text-align: center;
}

#target5flaps tbody td:first-child{
    border-left: 1px solid black;
}

#target5flaps tbody td:last-child{
    border-right: 1px solid black;
}

#target5flaps tfoot td{
    text-align: center;
    padding: 2vh;
}

#settings img:hover{
    width: 50%;
    cursor: pointer;
}

#settings img:hover{
    background-color: #FFCB25;
}

div.setup{
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2196F3;
    width: 13vw;
    height: 13vw;
}

div.setup img{
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Tracknumber & Trackselector */
div.tracknumber {
    background-color: #FFCB25;
    width: 13vw;
    height: 13vw;
    text-align: center;
    font-size: 10vw;
    cursor: pointer;
    position: relative;
}

div.tracknumber svg{
    vertical-align: top;
    width: 100%;
}

ul.trackSelector{
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 5vh;
    padding: 0;
    justify-content: center;
}

ul.trackSelector li{
    margin-right: 2vw;
    margin-bottom: 2vh;
    padding: 1vh 1vw;
    width: 10vw;
    font-size: 5vh;
    background-color: #E1E1E1;
    text-align: center;
    cursor: pointer;
}

ul.trackSelector li:hover{
    background-color: #FFCB25;
}

#settings-table div.row{
    display: grid;
    grid-template-columns: 49% 49%;
    font-size: 1.5vw;
    justify-content: center;
    align-items: center;
}

#settings-table > div.row > div{
    padding: 1vh;
}

#settings-table > div.row > div:first-child{
    text-align: right;
}

#settings-table > div.row > div:last-child{
    text-align: left;
    display: flex;
    align-items: center;
}

/*
* -------------- Views2 --------------
*/
section.views2{
    display: grid;
    grid-template-columns: 50% 50%;
    height: 100vh;
}

/* Views2: Tracknumber & Trackselector */
section.views2 div.tracknumber{
    width: 8vw;
    height: 8vw;
    font-size: 7vw;
}

section.views2 div.setup{
    width: 8vw;
    height: 8vw;
}

section.views2 ul.target5 li{
    width: 2.5vw;
    height: 2.5vw;
    margin-right: 0.5vw;
}

section.views2 div.target-wrapper{
    height: 25vw;
}

section.views2 canvas.target{
    width: 100%;
    height: 100%;
}

section.views2 div.results_table{

}

section.views2 div.results_table table{
    font-size: 2.1vh;
    height: auto;
}

section.views2 div.results_table .distance{
    display: none;
}

section.views2 div.results_table th, div.results_table td {
    padding: 0.8vh 0.5vw;
}


section.views2 div.shotDirectionWrapper{
    height: 1.5vw;
}

section.views2 div.shotDirectionWrapper canvas{
    height: auto;
}

section.views2 table.results_table td[data-content='dir']{
    padding: 0;
}