@font-face {
    font-family: "Pangea";
    src: url(../fonts/pangea-regular.woff2);
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Pangea";
    src: url(../fonts/pangea-bold.woff2);
    font-weight: bold;
    font-style: normal;
}

:root {
    --blue: #0073e6;
    --naturalwhite: #fff8ee;
    --darkgray: #2b2d32;

    --white: #ffffff;
    --black: #000000;
}

body {
    background: #ffffff;
    font-family: "Pangea", Helvetica, sans-serif;
    font-size: 100%;
    letter-spacing: 1px;
    color: #000;
    margin: 0;
    padding: 0;
    line-height: 1.2em;
}

/* HEADER */

#header {
    background: var(--blue);
    height: 166px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 3rem;
}

#showlink {
    display: none;
}

.circuit img {
    height: 4.6875rem;
    width: 4.625rem;
    margin-left: 2rem;
}

.kielilippu {
    float: right;
    padding-left: 7px;
    /*box-shadow: 1px 1px 1px #262626;*/
}

.language img {
    box-shadow: 2px 2px 2px #4e4e4e;
    opacity: 0.5;
    filter: alpha(opacity=50);
}

    .language img:hover {
        box-shadow: 1px 1px 1px #262626;
        opacity: 1;
        filter: alpha(opacity=100);
    }

.language a.on img {
    box-shadow: 1px 1px 1px #262626;
    opacity: 1;
    filter: alpha(opacity=100);
}

/* HEADER LOPPU */

/* YLEISTÄ */

h1 {
    font-size: 2rem;
    font-weight: 600;
}

h2 {
    font-size: 1.375rem;
    font-weight: 600;
}

div.relative {
    position: relative;
}

div.flex {
    display: flex;
}

.block {
    display: block;
}

.inline {
    display: inline-block;
}

a:link {
    color: var(--black);
    text-decoration: none;
}

a:visited {
    color: var(--black);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

input[type=checkbox],
input[type=checkbox] + label {
    cursor: pointer;
}

td.right {
    text-align: right;
}

/* VASEN VALIKKO */

#valikko {
    padding: 2rem 0 0 2rem;
}

#Nayttelylista {
   border-collapse: collapse;
   width: 25vw; 

}

.nayttelylista_header {
    display: inline-block;
    background-color: var(--naturalwhite);
    padding: 1rem 3rem 1rem 2rem;
    border-top-right-radius: 1.5rem;
    color: var(--blue);
}

.nayttelylista_header h2 {
    margin: 0;
}

.nayttelylista_content {
    padding: 1rem 3rem 1rem 2rem;
    background-color: var(--naturalwhite);
    border-top-right-radius: 1.5rem;
    border-bottom-left-radius: 1.5rem;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.valiotsikko {
    font-weight: bold;
    border-bottom: 1px solid #d8d3c4;
    margin-bottom: 5px;
}

/* MAIN */

#main {
    display: flex;
}

.roturyhmatvalikko {
    display: flex;
    margin-bottom: 1rem;
}

    .roturyhmatvalikko.paivat.mobiili {
        display:none;
    }

    .roturyhmatvalikko div {
        padding: 0.3rem;
    }

    .roturyhmatvalikko.paivat div.paiva {
        font-weight: bold;
    }

    .roturyhmatvalikko.paivat div.paiva:not(:first-child) {
        margin-left: 1rem;
    }

    .roturyhmatvalikko div.delimiter {
        padding: 0.3rem 0;
    }

.current {
    background: var(--blue);
    border-radius: 0.2rem;
    
}

    .current a {
        color: var(--white);
    }

table tr td {
    padding: 0.5rem;
}

table tr.otsikko td, 
table tr.nayttely td, 
table tr.ropotsikko td, 
table tr.sukupuoli td, 
table tr.luokka td {
    padding: 1rem;
}

table a {
    color: var(--black);
    font-weight: normal;
    background-image: url(../img/chevron-right-black.svg);
    background-position: left center;
    background-repeat: no-repeat;
    padding-left: .9375rem;
}

table tr.tulos a,
table tr.rotuluettelo a,
table.tulostaulukko tr a, 
table tr.nayttely td:last-child a {
    background-image: none;
    padding-left: 0;
}

table tr.tulos td i:hover {
    cursor: pointer;
}

table.rotulistatable,
table.roptulostaulukko {
    border-collapse: collapse;
    margin-bottom: 2rem;
}

table.rotulistatable,
table.tulostaulukko,
table.roptulostaulukko {
    min-width: 500px;
}

    table.rotulistatable td:first-child,
    table.roptulostaulukko td:first-child {
        padding-left: 3rem;
    }

    table.rotulistatable td:last-child,
    table.roptulostaulukko td:last-child {
        padding-right: 3rem;
    }

        table.rotulistatable tr.otsikko {
            background-color: var(--blue);
            color: var(--white);
            font-weight: 600;
        }

        table.rotulistatable tr.otsikko td:last-child {
            padding-right: 3.5rem;
        }

    table.rotulistatable tr.otsikko td:first-child {
        border-top-left-radius: 1.625rem;
        border-bottom-left-radius: 1.625rem;
    }

    table.rotulistatable tr.otsikko td:last-child {
        border-top-right-radius: 1.625rem;
        border-bottom-right-radius: 1.625rem;
    }

    table.rotulistatable tr:not(.otsikko):nth-child(odd) {
        background-color: var(--naturalwhite);
    }

    table.rotulistatable tr:not(.otsikko):nth-child(odd) td:first-child {
        border-top-left-radius: 1.625rem;
        border-bottom-left-radius: 1.625rem;
    }

    table.rotulistatable tr:not(.otsikko):nth-child(odd) td:last-child {
        border-top-right-radius: 1.625rem;
        border-bottom-right-radius: 1.625rem;
    }

    .rotulistatable tr.otsikko td:nth-last-child(2) {
        padding-right: 0.5rem;
    }

    .rotulistatable tr:not(.otsikko) td:last-child {
        width: 15px;
    }

table.roptulostaulukko tr.ropotsikko {
    background-color: var(--blue);
    color: var(--white);
    font-weight: 600;
}

table.roptulostaulukko tr.ropotsikko td:first-child {
    border-top-left-radius: 1.625rem;
    border-bottom-left-radius: 1.625rem;
}

table.roptulostaulukko tr.ropotsikko td:last-child {
    border-top-right-radius: 1.625rem;
    border-bottom-right-radius: 1.625rem;
}

    table.roptulostaulukko tr:not(.ropotsikko):nth-child(odd) {
        background-color: var(--naturalwhite);
    }

        table.roptulostaulukko tr:not(.ropotsikko):nth-child(odd) td:first-child {
            border-top-left-radius: 1.625rem;
            border-bottom-left-radius: 1.625rem;
        }

        table.roptulostaulukko tr:not(.ropotsikko):nth-child(odd) td:last-child {
            border-top-right-radius: 1.625rem;
            border-bottom-right-radius: 1.625rem;
        }

table.roduntulokset tr.sukupuoli {
    text-transform: uppercase;
    background-color: var(--blue);
    color: var(--white);
}

    table.roduntulokset tr.sukupuoli td:first-child,
    table.roduntulokset tr.luokka td:first-child,
    table.roduntulokset tr.tulos td:first-child,
    table.roduntulokset tr.arvostelu td:first-child {
        padding-left: 3rem;
    }

    table.roduntulokset tr.sukupuoli td:last-child,
    table.roduntulokset tr.luokka td:last-child,
    table.roduntulokset tr.tulos td:last-child,
    table.roduntulokset tr.arvostelu td:last-child {
        padding-right: 3rem;
    }

table.roduntulokset tr.luokka {
    background-color: var(--naturalwhite);
}

    table.roduntulokset tr.luokka td {
        color: var(--blue);
    }

        table.roduntulokset tr.luokka td span.left {
            float: left;
        }

        table.roduntulokset tr.luokka td span.tuomari {
            float: right;
            color: var(--black);
        }

        table.roduntulokset tr.luokka td span.tuomariotsikko {
            font-size: calc(100% - 3px);
            font-weight: normal;
        }

table.roptulostaulukko tr.ropotsikko td span.tuomariotsikko {
    font-size: calc(100% - 3px);
    font-weight: normal;
}


table.roduntulokset tr td:first-child {
    border-top-left-radius: 1.625rem;
    border-bottom-left-radius: 1.625rem;
    font-weight: 600;
}

table.roduntulokset tr td:last-child {
    border-top-right-radius: 1.625rem;
    border-bottom-right-radius: 1.625rem;
}

table.roduntulokset tr.arvostelut_valinta td:last-child {
    text-align: right;
    font-weight: normal;
}

table.roduntulokset tr.arvostelu td {
    font-size: 0.875rem;
}

tr.spacer td {
    background-color: var(--white);
    padding: 1.5rem;
}

#content {
    background-color: #FFFFFF;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    padding: 2rem 3rem;
    width: 100%;
}

    table.tulostaulukko tr.otsikko {
        background-color: var(--blue);
        color: var(--white);
        font-weight: 600;
    }

    table.tulostaulukko tr.otsikko td:first-child {
        border-top-left-radius: 1.625rem;
        border-bottom-left-radius: 1.625rem;
        padding-left: 3rem;
    }

    table.tulostaulukko tr.otsikko td:last-child {
        border-top-right-radius: 1.625rem;
        border-bottom-right-radius: 1.625rem;
        text-align: right;
        padding-right: 3rem;
    }

    table.tulostaulukko tr:not(.otsikko) td:first-child {
        padding-left: 3rem;
    }

    table.tulostaulukko tr:not(.otsikko) td:last-child {
        padding-right: 3rem;
    }

    table.tulostaulukko tr:not(.otsikko):nth-child(odd) {
        background-color: var(--naturalwhite);
    }

        table.tulostaulukko tr:not(.otsikko):nth-child(odd) td:first-child {
            border-top-left-radius: 1.625rem;
            border-bottom-left-radius: 1.625rem;
            
        }

        table.tulostaulukko tr:not(.otsikko):nth-child(odd) td:last-child {
            border-top-right-radius: 1.625rem;
            border-bottom-right-radius: 1.625rem;
        }

    table.tulostaulukko tr.ropotsikko {
        background-color: var(--blue);
        color: var(--white);
        font-weight: 600;
    }

table.tulostaulukko tr.JHTulos td:first-child {
    width: 25px;
    padding-left: 3rem;
}

table.tulostaulukko tr.JHTulos td:last-child {
    padding-right: 3rem;
}

table.tulostaulukko tr td:has(.kuvaRivi) {
    padding: 0;
}

    table.tulostaulukko tr td:has(.kuvaRivi):first-child {
        padding-top: 6px;
    }

.kuvaRivi {
    display: flex;
    justify-content: space-between;
    background-color: var(--white) !important;
}

    .kuvaRivi.single {
        justify-content: center;
    }

.kuvaDiv {
    display: block;
    padding: 0px 0px 0px 0px;
    width: 400px;
    /* height: 375px; */
}

    .kuvaDiv.single {
        width: 700px;
    }

.kuvaLeft {
    /*float: left;*/
    margin: 0 0 1.5rem 0;
}
.kuvaRight {
    /*float: left;*/
    margin: 0 0 1.5rem 1.5rem;
}
.pikkukuva {
    max-height: 400px;
    max-width: 400px;
    display: block;
    margin: auto;
    border-top-right-radius: 1.625rem;
}

    .pikkukuva.single {
        max-height: 700px;
        max-width: 700px;
    }

.kuvaTeksti {
    display: block;
    width: 400px;
    /*height: 75px;*/
    padding: 0.5rem 1rem 1.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.2em;
    background-color: var(--naturalwhite);
    border-bottom-left-radius: 1.625rem;
}

    .kuvaTeksti.single {
        text-align: center;
        width: 700px;
    }

    .kuvaTeksti a {
        background-image: none;
        padding: 0;
    }

.kuvaajaDiv {
    margin-bottom: 1rem;
}

.lista {
    display: none;
}

/* FOOTER */

#footer {
    position: relative;
    display: block;
    color: var(--white);
    font-size: 9px;
    padding: 2rem;
    background: var(--blue);
}

    #footer:before {
        content: "";
        position: absolute;
        top: -2.625rem;
        right: .9375rem;
        width: 2rem;
        height: 2.625rem;
        -webkit-mask-image: url(../img/wds-text-highlight-graphic.svg);
        mask-image: url(../img/wds-text-highlight-graphic.svg);
        background-color: var(--blue);
    }

/* FOOTER LOPPU */

@media (max-width: 1500px) {
    #valikko {
        padding: 2rem 0 0 1rem;
    }

    #content {
        padding: 2rem 2rem;
    }

    .nayttelylista_content {
        font-size: 1rem;
        padding: 1rem;
    }

    table tr.nayttely td {
        padding: 0.8rem;
    }
}

@media (max-width: 1450px) {
    .kuvaDiv, .pikkukuva, .kuvaTeksti {
        width: 375px;
    }

    .pikkukuva {
        max-height: none;
        max-width: none;
    }
}

@media (max-width: 1400px) {
    .kuvaRivi {
        display: block;
    }

    .kuvaDiv, .kuvaTeksti, .pikkukuva {
        width: 600px;
    }
}

@media (max-width: 1260px) {
    .kuvaDiv, .kuvaTeksti, .pikkukuva {
        width: 100%;
    }

    table.roduntulokset tr.sukupuoli td:first-child,
    table.roduntulokset tr.luokka td:first-child,
    table.roduntulokset tr.tulos td:first-child,
    table.roduntulokset tr.arvostelu td:first-child {
        padding-left: 1rem;
    }
}

@media (max-width: 1150px) {
    #valikko {
        padding: 1rem;
    }

    #content {
        padding: 1rem;
    }

    .roturyhmatvalikko.paivat {
        font-size: .875rem;
    }

    .nayttelylista_content {
        padding: 0.8rem;
        font-size: .875rem;
    }

    table tr.nayttely td {
        padding: 0.4rem 0.2rem;
    }
}

@media (max-width: 968px) {
    h1 {
        max-width: 93%;
    }

    #main {
        display: block;
    }

    #header {
        padding: 2rem;
        height: 126px;
    }

    #valikko {
        padding: 1rem;
        display:none;
    }

    #content {
        padding: 1rem;
    }

    #footer {
        margin-top: 2rem;
    }

    #divOtsikko {
        position: relative;
    }

    .lista {
        display: inline-block;
        position: absolute;
        right: 0;
        top: 0.5rem;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .nayttelylista_content {
        padding: 1rem;
        margin-bottom: 1rem;
        /*max-height: 280px;
        overflow-y: scroll;*/
        background-color: var(--white);
    }

    #Nayttelylista {
        position: relative;
        display: inline-block;
        display: none;
        width: 100%;
    }

    #Nayttelylista tbody {
        position: absolute;
        background-color: var(--naturalwhite);
        min-width: 160px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        padding: 12px 16px;
        z-index: 1;
    }

    table.rotulistatable, 
    table.tulostaulukko, 
    table.roptulostaulukko,
    table.roduntulokset {
        min-width: unset;
        width: 100%;
    }

    table.rotulistatable td:first-child, 
    table.roptulostaulukko td:first-child {
        padding-left: 1rem;
    }

    table.roptulostaulukko td:last-child,
    table.roduntulokset tr.sukupuoli td:last-child, 
    table.roduntulokset tr.luokka td:last-child, 
    table.roduntulokset tr.tulos td:last-child, 
    table.roduntulokset tr.arvostelu td:last-child,
    table.rotulistatable td:last-child,
    table.rotulistatable tr.otsikko td:last-child {
        padding-right: 1rem;
    }

    table.roduntulokset tr td {
        font-size: .875rem;
    }

    .roturyhmatvalikko.paivat {
        display: none;
        font-size: 1rem;
    }

        .roturyhmatvalikko.paivat.mobiili {
            display: block;
        }

            .roturyhmatvalikko.paivat.mobiili div.paiva {
                display: block;
            }

                .roturyhmatvalikko.paivat.mobiili div.paiva > div {
                    display: inline-block;
                    font-weight: normal;
                }

                .roturyhmatvalikko.paivat.mobiili div.paiva > div:last-child {
                    display: none;
                }

                .roturyhmatvalikko.paivat.mobiili div.paiva:not(:first-child) {
                    margin-left: 0;
                }
}

/*@media (max-width: 768px) {
    .roturyhmatvalikko {
        display: block;
    }

    .roturyhmatvalikko > div {
        display: inline-block;
    }

}*/

@media (max-width: 500px) {
    #header {
        padding: 1rem;
    }

    #wds img {
        max-width: 180px;
    }

    .circuit img {
        margin-left: 1rem;
    }

    table.roptulostaulukko tr.ropotsikko td div {
        float: none !important;
    }

    table.roptulostaulukko tr.ropotsikko td div:first-child {
        margin-bottom: 1rem;
    }

    table.roduntulokset tr:not(.sukupuoli):not(.luokka) td {
        padding: 0.2rem;
        font-size: .775rem;
    }

    table.roduntulokset tr:not(.sukupuoli):not(.luokka) td:first-child {
        padding-left: 0.5rem;
    }

    table.roduntulokset tr:not(.sukupuoli):not(.luokka) td:last-child {
        padding-right: 0.5rem;
    }
}

