/* cyrillic-ext */
@font-face {
    font-family: 'PT Sans Narrow';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/ptsansnarrow/v18/BngRUXNadjH0qYEzV7ab-oWlsbCLwR26eg.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
    font-family: 'PT Sans Narrow';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/ptsansnarrow/v18/BngRUXNadjH0qYEzV7ab-oWlsbCCwR26eg.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
    font-family: 'PT Sans Narrow';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/ptsansnarrow/v18/BngRUXNadjH0qYEzV7ab-oWlsbCIwR26eg.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'PT Sans Narrow';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/ptsansnarrow/v18/BngRUXNadjH0qYEzV7ab-oWlsbCGwR0.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --white: #ffffff;
    --black: #000000;
    --brown: #907f58;
    --lightbrown: #d8d3c4;
}

body {
    background: #ffffff;
    font-family: "PT Sans Narrow", Helvetica, sans-serif;
    font-size: 100%;
    letter-spacing: 1px;
    color: #000;
    margin: 0;
    padding: 0;
    line-height: 1.2em;
    border-top: 10px solid var(--brown);
}

/* HEADER */

#header {
    height: 166px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 3rem;
    width: 1200px;
    margin: auto;
}

#wds, #circuit {
    display: none;
}

.language {
    position: absolute;
    top: 10px;
    right: 20px;
}

.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;
}

.nowrap {
    white-space: nowrap;
}

a:link {
    color: #655633;
    text-decoration: none;
}

a:visited {
    color: #655633;
    text-decoration: none;
}

a:hover {
    color: #a89a7b;
}

input[type=checkbox],
input[type=checkbox] + label {
    cursor: pointer;
}

/* VASEN VALIKKO */

#valikko {
    padding: 20px;
}

.valikko {
    border: 1px solid var(--lightbrown);
    padding: 10px;
    font-size: 12px;
}

#Nayttelylista {
   border-collapse: collapse;
   width: 100%; 
}

.nayttelylista_header {
    border-bottom: 1px solid var(--lightbrown);
}

.nayttelylista_header h2 {
    margin: 0;
}

.nayttelylista_content {
    margin-bottom: 2rem;
}

td.valiotsikko {
    font-weight: bold;
    border-bottom: 1px solid var(--lightbrown);
    padding-top: 5px;
}

/* MAIN */

#main {
    display: flex;
    width: 1200px;
    margin: auto;
}

.roturyhmatvalikko {
    display: flex;
    margin-bottom: 1rem;
}

.roturyhmatvalikko div {
    white-space: nowrap;
    padding: 4px;
}

    .roturyhmatvalikko div.paiva {
        font-weight: bold;
    }

        .roturyhmatvalikko div.paiva:not(:first-child) {
            margin-left: 1rem;
        }

    .roturyhmatvalikko div.delimiter {
        padding: 4px 0;
    }

table tr td {
    padding: 4px;
}

.current {
    background: var(--lightbrown);
}

table a {
    color: var(--black);
    font-weight: normal;
}

table.rotulistatable,
table.roptulostaulukko {
    border-collapse: collapse;
}

.rotuluettelo {
    font-size: 100%;
    border-bottom: 1px dotted var(--lightbrown);
    padding: 20px 0px 0px 20px;
}

    .rotuluettelo td:last-child, 
    .rotulistatable td:last-child {
        text-align: right;
    }

    .rotulistatable i {
        margin-left: 1rem;
    }

    .rotulistatable tr:not(.otsikko) td:last-child:not(:has(i)) {
        padding-right: calc(0.5rem + 24px);
    }

table.roptulostaulukko,
table.roduntulokset,
table.tulostaulukko,
table.rotulistatable {
    margin-bottom: 2rem;
    width: 100%;
}

table.roptulostaulukko tr.ropotsikko {
    background-color: var(--brown);
    color: var(--white);
    font-weight: bold;
    font-size: 140%;
}

    table.roptulostaulukko tr.ropotsikko td {
        padding: 12px;
    }

    table.roptulostaulukko tr:not(.ropotsikko) {
        border-bottom: 1px dotted #d8d3c4;
    }

    table.roptulostaulukko tr:not(.ropotsikko) td:first-child {
        font-weight: bold;
    }

table.roduntulokset tr.sukupuoli {
    background: var(--brown);
    font-weight: bold;
    color: var(--white);
}

    table.roduntulokset tr.sukupuoli td:first-child {
        padding-left: 20px;
    }

table.roduntulokset tr.luokka {
    text-transform: uppercase;
    font-weight: bold;
    background: var(--lightbrown);
}

    table.roduntulokset tr.luokka td:first-child {
        padding-left: 40px;
    }

table.roduntulokset tr.tulos td:first-child {
    padding-left: 60px;
}

table.roduntulokset tr.tulos td:not(:nth-child(2)) {
    font-weight: bold;
}

table tr.tulos td {
    font-size: 14px;
}

table tr.tulos td i:hover {
    cursor: pointer;
}

table.roduntulokset tr.arvostelut_valinta td:last-child {
    text-align: right;
}

table.roduntulokset tr.arvostelu td {
    font-size: 14px;
}

table.tulostaulukko tr.otsikko td:last-child {
    text-align: right;
}

table.tulostaulukko tr.JHTulos {
    border-bottom: 1px dotted var(--lightbrown);
}

table.tulostaulukko tr.JHTulos td:first-child {
    width: 25px;
    padding-left: 20px;
}

tr.spacer td {
    background-color: var(--white);
    padding: 20px;
}

#content {
    background-color: var(--white);
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    padding: 20px;
    width: 100%;
}

.otsikko {
    /*font-size: 140%;
    font-weight: bold;
    border-bottom: 1px solid var(--lightbrown);
    margin-bottom: 5px;*/

    font-size: 140%;
    font-weight: bold;
    background-color: var(--brown);
    color: #ffffff;
    margin: 0;
}

tr.otsikko td {
    padding: 12px 12px 12px 12px;
}

table.tulostaulukko tr td:has(.kuvaRivi) {
    padding: 0;
}

    table.tulostaulukko tr td:has(.kuvaRivi):first-child {
        padding-top: 6px;
    }

.kuvaRivi {
    /*clear: both;*/
    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: 425px;
}

    .kuvaDiv.single {
        width: 700px;
    }

.kuvaLeft {
    /*float: left;*/
    margin: 0px 0px 19px 0px;
}

.kuvaRight {
    /*float: left;*/
    margin: 0px 0px 19px 19px;
}

.pikkukuva {
    max-height: 425px;
    max-width: 425px;
    display: block;
    margin: auto;
}

    .pikkukuva.single {
        max-height: 700px;
        max-width: 700px;
    }

.kuvaTeksti {
    display: block;
    width: 425px;
    /*height: 75px;*/
    padding: 5px 5px 5px 5px;
    font-size: 100%;
    line-height: 1.2em;
    background-color: var(--lightbrown);
}
    .kuvaTeksti.single {
        text-align: center;
        width: 700px;
    }

    .kuvaTeksti a {
        background-image: none;
        padding: 0;
    }

.kuvaajaDiv {
    margin-bottom: 19px;
}

.lista {
    display: none;
}

/* FOOTER */

#footer {
    position: relative;
    display: block;
    font-size: 9px;
    padding: 1rem;
    color: gray;
}

#footer span {
    position: absolute;
    top: 5px;
    right: 20px;
}

/* FOOTER LOPPU */

@media (max-width: 1500px) {
    #main {
        width: 100%;
    }

    #header {
        width: 100%;
    }

    #valikko {
        padding: 2rem 0 0 1rem;
    }

    #content {
        padding: 2rem 2rem;
    }

    .nayttelylista_content {
        font-size: 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;
    }

    .nayttelylista_content {
        padding: 1rem;
        font-size: .875rem;
    }

    table tr.nayttely td {
        padding: 0.4rem;
    }
}

@media (max-width: 968px) {
    h1 {
        max-width: 93%;
    }

    #main {
        display: block;
    }

    #header {
        padding: 2rem;
        height: 126px;
    }

    #showlink img {
        max-width: 250px;
    }

    #valikko {
        padding: 1rem;
        display: none;
    }

    #content {
        padding: 1rem;
    }

    #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;*/
    }

    #Nayttelylista {
        position: relative;
        display: inline-block;
        display: none;
    }

        #Nayttelylista tbody {
            position: absolute;
            background-color: #f9f9f9;
            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.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: 1rem;
    }

    table.roduntulokset tr td {
        font-size: .875rem;
    }

    .nowrap {
        white-space: unset;
    }
}

@media (max-width: 768px) {
    .roturyhmatvalikko {
        display: block;
    }

        .roturyhmatvalikko > div {
            display: inline-block;
        }
}

@media (max-width: 500px) {
    #header {
        padding: 1rem;
    }

    #showlink img {
        max-width: 180px;
    }

    .ropotsikko td div {
        float: none;
    }

    .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;
        }
}