/* 
    Created on : 15.3.2020, 10:09:08
    Author     : Janne Mustonen
*/

section.mainwrapper{
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

#container {
    margin: 10px;
    border: 1px solid #D0D0D0;
    box-shadow: 0 0 8px #D0D0D0;
}

section.loginwrapper{
    margin-left: auto;
    margin-right: auto;
    padding: 16px;
}

#dialog{
    display: none;
}

#rsstatus_content
{
    display: none;
    border-left: 1px solid lightgrey;
    margin-left: 8px;
    padding-left: 8px;
}

section.header{
    margin-top: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid black;
    font-size: 24px;
}

#maincontent{
    min-height: calc(100vh - 40px);
}

#footer div.guid{
    font-size: 24px;
    text-transform: uppercase;
}

#footer div.guid{
    font-size: 24px;
    text-transform: uppercase;
}

#log{
    height: 36px;
    line-height: 12px;
    font-size: 12px;
    border: 1px solid lightgrey;
    background-color: white;
    overflow-y: auto;
}

#log div.logrow:nth-child(even){
    background: #CCC;
}

/* Target Wrapper */
section.wrapper{
    display: flex;
    flex-wrap: wrap;
}

section.wrapper > a{
    text-decoration: none;
    color: black;
} 

/* ------------- Full target ------------- */
section.target_wrapper{
    border: 1px solid lightgrey;
    width: 250px;
}

/* ------------- Single target ------------- */
section.singletarget_wrapper{
    width: 100%;
}

section.singletarget_wrapper div.grid {
    display: grid;
    grid-template-columns: 20px 1fr 20px;

    .left, .right {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f0f0f0;
        font-size: 1.2em;
    }

    .middle {
        background-color: #fff; /* optional */
        padding: 10px;
    }
}

section.singletarget_wrapper div.target_area{
    width: 100%;
}

section.singletarget_wrapper div.hitarea{
    width: 230px;
    height: 230px;
    border-radius: 230px;
    border: 1px solid black;
    margin: 8px auto;
    background-image: url( '/gfx/targetPistol_230px.png' );
    position: relative;
    text-align: center;
    font-size: 8px;
}

section.singletarget_wrapper div.hitarea span{
    position: absolute;
    margin: 0;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 16px;    
    border: 1px solid black;
    color: white;
    font-weight: bold;
    
}

section.singletarget_wrapper div.hitarea span.wide{
    width: 42px;
    height: 32px;
    line-height: 32px;
    font-size: 1.3em;
    font-weight: bold;
}

section.singletarget_wrapper div.hitarea span.hit{
    background-color: #2bf92b;
    color: #2bf92b;
    z-index: 10;
}

section.singletarget_wrapper div.hitarea span.miss{
    background-color: red;
    color: red;
    z-index: 0;
}

section.singletarget_wrapper div.hitarea span.miss:last-child{
    color: white;
}

section.singletarget_wrapper div.hitarea span.hit:last-child{
    color: black;
}

section.singletarget_wrapper table.results{
    width: 100%;
    font-size: 1.3em;
}

section.singletarget_wrapper table.results tr.hit{
    color: green;
}

section.singletarget_wrapper table.results tr.miss{
    color: red;
}

section.singletarget_wrapper table.results td{
    text-align: center;
    border: 1px solid lightgrey;
    padding: 4px;
}

section.singletarget_wrapper table.results caption{
    font-size: 24px;
    padding: 8px;
}

section.singletarget_wrapper table.results thead th{
    background-color: black;
    color: white;
    padding: 4px;
}

section.singletarget_wrapper div.runningtime{
    font-size: 1.5em;
    width: 100%;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px dotted lightgrey;
}

#runningTime {
    width: 100%;
    text-align: center;
}

section.hitmiss_wrapper{
    
}

#singleTargetResults{
    width: 100%;
    display: table;
    font-size: 24px;
    border-left: 1px solid lightgrey;
    background-color: lightgreen;
    border-radius: 6px;
    margin-top: 12px;
    padding: 12px 8px;
    color: black;
}

#singleTargetResults h2{
    text-align: center;
}

#singleTargetResults div{
    display: table-row;
}

#singleTargetResults div > span{
    display: table-cell;
    padding: 12px;
    border-bottom: 1px solid palegreen;
    width: 50vw;
}

#singleTargetResults div:last-child > span{
    border-bottom: none;
}

#singleTargetResults div > span.header{
    font-weight: bold;
}

#singleTargetResults div > span[data-content]{
    text-align: right;
}

table.resultBoard_header{
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid black;
    font-size: 24px;
}

table.resultBoard_header a{
    text-decoration: none;
}


table.resultBoard{
    font-size: 18px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 400px;
}

table.resultBoard thead tr{
    background-color: #70ad47;
    font-weight: bold;
    color: white;
}

table.resultBoard thead tr th{
    padding: 8px 4px;
}

table.resultBoard tbody tr td{
    border-bottom: 1px solid #70ad47;
    padding: 2px;
}

/* Mobile resultBoard flex header with sponsors */
.mobile_resultboard_header {
    display: flex;
    flex-direction: column;
    padding: 8px 12px 6px 12px;
    gap: 6px;
    box-sizing: border-box;
    width: 100%;
}

.mobile_resultboard_header .competition_title {
    font-size: 16px;
    font-weight: bold;
    color: #222;
    line-height: 1.3;
    text-align: left;
    width: 100%;
    word-wrap: break-word;
    white-space: normal;
}

.mobile_resultboard_header .header_row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.mobile_resultboard_header .header_info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 1 1 0;
    min-width: 0;
    gap: 2px;
}

.mobile_resultboard_header .competition_meta {
    font-size: 12px;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mobile_resultboard_header .competition_mode {
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.mobile_resultboard_header .meta_mode {
    background: #e2e8f0;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 11px;
}

.mobile_resultboard_header .header_brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.mobile_resultboard_header .header_brand img {
    max-height: 36px;
    max-width: 160px;
    width: auto;
    display: block;
}

.mobile_resultboard_header .header_loading {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    color: #555;
    white-space: nowrap;
    min-width: 0;
}

.mobile_resultboard_header .header_loading img {
    height: 18px;
    width: auto;
    display: block;
}

.mobile_resultboard_header .header_sponsors .sponsor_logo_item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile_resultboard_header .header_sponsors .sponsor_logo_item img {
    max-height: 40px;
    max-width: 90px;
    object-fit: contain;
    display: block;
}

.resultboard_sponsors {
    width: 95%;
    margin: 6px auto 10px auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.resultboard_sponsors .sponsor_logo_item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.resultboard_sponsors .sponsor_logo_item img {
    max-height: 44px;
    max-width: 120px;
    object-fit: contain;
    display: block;
}

/* Mobile singletarget top: competitor info on top line, mode & sponsors below */
.singletarget_top_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 98%;
    margin: 8px auto;
    box-sizing: border-box;
    gap: 8px;
}

.singletarget_competitor_info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    font-size: 20px;
    gap: 8px;
    text-align: center;
    box-sizing: border-box;
}

.singletarget_sub_container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
}

.singletarget_top_container.no_sponsors,
.singletarget_sub_container.no_sponsors {
    justify-content: center;
}

.singletarget_top_container.no_sponsors .singletarget_top_left,
.singletarget_sub_container.no_sponsors .singletarget_top_left {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
}

.singletarget_top_container.no_sponsors .singletarget_top_right,
.singletarget_sub_container.no_sponsors .singletarget_top_right {
    display: none;
}

.singletarget_top_left {
    flex: 1 1 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.singletarget_top_left table {
    margin: 0 auto;
    max-width: 100%;
}

.singletarget_top_right {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.singletarget_top_right .singletarget_sponsors {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
}

.singletarget_top_right .sponsor_logo_item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.singletarget_top_right .sponsor_logo_item img {
    max-height: 40px;
    max-width: 95px;
    object-fit: contain;
    display: block;
}