@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 {
    --white: #ffffff;
    --black: #000000;
    --brown: #907f58;
    --lightbrown: #d8d3c4;
    --lightgreen: #3aaa35;
    --darkgreen: #31912d;
    --lightgray: #e5e5e5;
    --darkgray: #666;
    --blue: #008dc4;
}

body {
    background: #ffffff;
    font-family: "Pangea", sans-serif;
    font-size: 100%;
    letter-spacing: 1px;
    color: #000;
    margin: 0;
    padding: 0;
    line-height: 1.2em;
}

/* HEADER */

#header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem;
    width: 100%;
    margin: auto;
    border-bottom: 1px solid var(--lightgray);
}

#wds, #circuit, #showlink {
    display: none;
}

.koiramessut_otsikko {
    width: 40%;
    margin: auto;
    padding: 30px 0;
}

.koiramessut_valikko {
    position: relative;
    width: 100%;
    height: 50px;
    background: var(--lightgreen);
    border-bottom: 8px solid var(--darkgreen);
}

.valikko_container {
    width: 1200px;
    margin: auto;
}

.koiramessut_valikko .logo {
    position: absolute;
    bottom: 25px;
    z-index: 5;
    width: auto;
    margin-left: 1rem;
}

.menu {
    border: none;
    list-style: none;
    text-align: left;
    padding: 0 0 0 20px !important;
    margin: 0 0 0 115px !important;
}

.menu li {
    list-style-type: none;
    list-style-image: none;
    display: inline-block;
    float: left;
    margin: 0;
    padding: 0;
    position: relative;
}

.menu li a {
    display: block;
    height: 50px;
    line-height: 50px;
    color: #fff;
    padding: 0 15px;
    text-decoration: none;
    font-family: "Pangea", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    border-right: 1px solid var(--darkgreen);
    letter-spacing: 0;
}

.menu li {
    background: var(--lightgreen);
}

.menu li.current {
    background: var(--darkgreen);
}

.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: 1.625rem;
    color: var(--darkgray);
}

h2 {
    font-size: 1.375rem;
}

h3 {
    font-weight: 300;
    font-style: italic;
    font-size: 24px;
    margin: 0;
    color: var(--darkgray);
}

h4 {
    font-weight: 700;
    font-style: normal;
    text-transform: uppercase;
    font-size: 28px;
    margin: 0;
    color: var(--darkgray);
}

div.relative {
    position: relative;
}

div.flex {
    display: flex;
}

.block {
    display: block;
}

.inline {
    display: inline-block;
}

.nowrap {
    white-space: nowrap;
}

td.right {
    text-align: right;
}

a:link {
    color: var(--blue);
    text-decoration: none;
}

a:visited {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    color: var(--blue);
}

input[type=checkbox],
input[type=checkbox] + label {
    cursor: pointer;
}

/* VASEN VALIKKO */

#valikko {
    display: none;
    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.paivat.mobiili {
        display: none;
    }

    .roturyhmatvalikko div {
        white-space: nowrap;
        padding: 4px;
    }

    .roturyhmatvalikko.paivat div.paiva {
        font-weight: bold;
    }

        .roturyhmatvalikko.paivat div.paiva:not(:first-child) {
            margin-left: 1rem;
        }

    .roturyhmatvalikko div.delimiter {
        padding: 4px 0;
    }

table tr td {
    padding: 4px;
}

.current {
    background: var(--lightgreen);
    color: var(--white);
}

    .current a {
        color: var(--white);
    }

table a {
    color: var(--black);
    font-weight: normal;
}

table.rotulistatable,
table.roptulostaulukko {
    border-collapse: collapse;
}

.rotuluettelo {
    font-size: 100%;
    border-bottom: 1px dotted var(--lightgray);
    padding: 20px 0 0 20px;
}

    .rotuluettelo td:last-child {
        text-align: right;
    }

    .rotulistatable tr.otsikko td:nth-last-child(2) {
        padding-right: 4px;
    }

    .rotulistatable tr:not(.otsikko) td:last-child {
        width: 15px;
    }

table.roptulostaulukko,
table.roduntulokset,
table.tulostaulukko,
table.rotulistatable {
    margin-bottom: 2rem;
    width: 100%;
}

table.roptulostaulukko tr.ropotsikko {
    background-color: var(--lightgreen);
    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(--lightgreen);
    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(--lightgray);
}

    table.roduntulokset tr.luokka td:first-child {
        padding-left: 40px;
    }

    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;
        text-transform: none;
    }

    table tr td span.tuomariotsikko {
        font-size: calc(100% - 5px);
        font-weight: normal;
        text-transform: none;
    }


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: 0 auto 0 auto;
    padding: 20px;
    width: 100%;
}

.otsikko {
    font-size: 140%;
    font-weight: bold;
    background-color: var(--lightgreen);
    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: 0 0 0 0;
    width: 425px;
}

    .kuvaDiv.single {
        width: 700px;
    }

.kuvaLeft {
    /*float: left;*/
    margin: 0 0 19px 0;
}

.kuvaRight {
    /*float: left;*/
    margin: 0 0 19px 19px;
}

.pikkukuva {
    max-height: 600px;
    max-width: 600px;
    display: block;
    margin: auto;
}

    .pikkukuva.single {
        max-height: 700px;
        max-width: 700px;
    }

.kuvaTeksti {
    display: block;
    width: 600px;
    padding: 5px 8px;
    font-size: 100%;
    line-height: 1.2em;
    background-color: var(--lightgray);
}
    .kuvaTeksti.single {
        text-align: center;
        width: 700px;
    }

    .kuvaTeksti a {
        background-image: none;
        padding: 0;
    }

.kuvaajaDiv {
    margin-bottom: 19px;
}

div.floatleft {
    float: left;
    padding-right: 1.3rem;
}

div.floatright {
    float: right;
}

.lista {
    display: none;
}

/* FOOTER */

#footer {
    position: relative;
    display: block;
    font-size: 9px;
    padding: 1rem;
    color: var(--white);
}

#footer span {
    color: var(--darkgray);
}

#footer_koiramessut {
    width: 100%;
    background: var(--lightgreen);
    height: 210px;
}

#footer_koiramessut_first, #footer_koiramessut_second, #footer_koiramessut_third {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--lightgray);
}

#footer .content {
    width: fit-content;
    margin: auto;
}

#footer .content img {
    margin: 12px 20px;
}

.footer-bottom-text {
    color: #fff;
    position: absolute;
    bottom: 2rem;
    font-size: .8125rem;
    line-height: 1.375rem;
}

.footer-wds-graphic {
    position: absolute;
    right: 25px;
    bottom: 316px;
}

    .footer-wds-graphic img {
        height: 200px;
    }

/* 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;
        padding: 1rem;
    }

    table tr.nayttely td {
        padding: 0.8rem;
    }
}*/

@media (max-width: 1450px) {
    /*.kuvaDiv, .pikkukuva, .kuvaTeksti {
        width: 450px;
    }*/

    .pikkukuva.single {
        width: 100%;
    }

    
}

@media (max-width: 1400px) {
    .kuvaRivi {
        display: block;
    }

    .kuvaDiv, .kuvaTeksti, .pikkukuva {
        width: 100%;
        margin: auto;
    }

    .pikkukuva {
        max-height: none;
        max-width: none;
    }

    .kuvaRight {
        margin: 0 0 19px 0;
    }
}

@media (max-width: 1260px) {
    .pikkukuva.single {
        max-width: none;
        max-height: none;
    }

    .kuvaDiv, .kuvaDiv.single, .kuvaTeksti, .kuvaTeksti.single, .pikkukuva, .pikkukuva.single {
        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: 1260px) {
    #main {
        width: 100%;
    }

    .koiramessut_otsikko {
        width: 60%;
    }

    .valikko_container  {
        width: 100%;
    }
}

@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;
    }

    #showlink img {
        max-width: 250px;
    }

    #valikko {
        padding: 1rem;
        display: none;
    }

    #content {
        padding: 1rem;
    }

    #footer {
        margin-top: 2rem;
    }

    #divOtsikko {
        position: relative;
    }

    .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: var(--lightbrown);
            min-width: 160px;
            box-shadow: 0 8px 16px 0 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;
    }

    .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;
                }

    .nowrap {
        white-space: unset;
    }
}

@media (max-width: 780px) {
    .valikko {
        display: none;
    }

    #valikko {
        padding: 0 !important;
    }

    .menu {
        padding: 0 !important;
        margin: 0 0 0 1rem !important;
        position: absolute;
        z-index: 9999;
        background: var(--lightgreen);
        box-shadow: 3px 3px 15px -5px rgba(0, 0, 0, 0.75);
    }

    .menu li {
        display: block;
        width: fit-content;
        float: none;
        width: 100%;
    }

    .lista {
        display: inline-block;
        position: absolute;
        right: 0;
        top: 0.5rem;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

@media (max-width: 768px) {
    .roturyhmatvalikko {
        display: block;
    }

        .roturyhmatvalikko > div {
            display: inline-block;
        }
}

@media (max-width: 500px) {
    #header {
        padding: 1rem;
    }

    #showlink img {
        max-width: 180px;
    }

    table.roptulostaulukko tr.ropotsikko td div,
    table.tulostaulukko tr.otsikko td div {
        float: none !important;
    }

    table.roptulostaulukko tr.ropotsikko td div:first-child,
    table.tulostaulukko tr.otsikko 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;
        }
}
