﻿/* Main elements */
html {
    font-family: 'byker', sans-serif;
    font-size: 17px;
    height: 100%;
}

body {
    height: 100%;
    display: flex;
    flex-flow: column;
    min-width: 320px;
}

header {
    flex: 0 0 61px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
}

    header h1 {
        font-size: 20px;
        font-weight: bold;
        flex: none;
        display: flex;
        align-items: center;
    }

        header h1 a {
            display: block;
            display: flex;
            align-items: baseline;
        }

            header h1 a img.header__veikkolehti {
                width: 136px;
            }

    header .header__user {
        overflow: hidden;
        display: flex;
        width: 61px;
        flex: 1 1 auto;
        justify-content: flex-end;
    }

        header .header__user .header__user__menubutton {
            background: #0F677C;
            color: #F9F8F8;
            width: 61px;
            height: 61px;
            margin: 0;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            padding: 14px;
        }

            header .header__user .header__user__menubutton span {
                width: 33px;
                height: 4px;
                display: block;
                background: white;
            }

        header .header__user nav {
            display: none;
            font-size: 20px;
            padding-bottom: 0.5em;
            z-index: 100;
            box-sizing: border-box;
        }

            header .header__user nav ul {
                list-style: none;
                padding: 0;
                margin: 0;
            }

                header .header__user nav ul li {
                    display: block;
                }

        header .header__user .header__user__name {
            color: #fff;
            padding: 0.5em;
            display: block;
            text-decoration: underline;
            visibility: hidden;
        }

            header .header__user .header__user__name::before {
                content: 'Käyttäjän tiedot';
                width: 100%;
                display: block;
                position: absolute;
                background: #0F677C;
                left: 0;
                right: 0;
                text-decoration: underline;
                visibility: visible;
            }

        header .header__user .header__user__logout {
            background: #0F677C;
            color: #F9F8F8;
            padding: 0.5em;
            display: block;
            text-decoration: underline;
        }

            header .header__user .header__user__logout::after {
                content: unset;
            }

    header .header__user--open nav {
        display: block;
        position: absolute;
        top: 61px;
        width: 100%;
        background: #0F677C;
        text-align: center;
    }

    header a, header a:visited, header a:active, header a:link {
        color: inherit;
        text-decoration: none;
    }

footer {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    text-align: center;
    line-height: 1.5;
    padding: 40px;
}

    footer > div {
        margin-bottom: 30px;
    }

        footer > div:last-child {
            margin-bottom: 0;
        }

main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* Typography */

h2 {
    font-size: 26px;
    font-weight: 900;
}

a, a:visited, a:active, a:link {
    color: inherit;
    text-decoration: underline;
}

/* Forms */

input, button, select {
    border: none;
}

    input[type=email], input[type=password] {
        display: block;
        margin: 0 auto;
        box-sizing: border-box;
        width: 100%;
        max-width: 350px;
    }

button {
    cursor: pointer;
    font-size: 19px;
}

.validation-summary-errors > ul {
    padding: 0;
    list-style: none;
}

.checkbox {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

    .checkbox > button {
        width: 34px;
        height: 34px;
        display: inline-block;
        background: #EEEEEE;
        cursor: pointer;
    }

    .checkbox > label {
        cursor: pointer;
    }

    .checkbox.checkbox--true > button::after {
        content: 'X'
    }

/* Preview */
.previewbadge {
    position: absolute;
    z-index: 200;
    top: 0;
    right: 0;
    left: 0;
    padding: 0.5em 1em;
    background-color: #ff8d2a;
    opacity: 0.95;
    height: 89px;
    text-align: right;
    box-sizing: border-box;
}

    .previewbadge a {
        font-size: 0.8em;
    }


/* Reports display */

.reportscontroller {
    flex: 0 1 auto;
    position: relative;
}

.reportscontroller__tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

    .reportscontroller__tabs div {
        cursor: pointer;
        margin: 14px;
        text-decoration: underline;
    }

        .reportscontroller__tabs div.active {
            font-weight: bold;
        }

.reportscontroller__buttons {
    display: none;
    text-align: right;
    position: absolute;
    top: 18px;
    right: 18px;
    max-width: 210px;
}

    .reportscontroller__buttons > button {
        width: 100%;
        margin-bottom: 14px;
        font-size: 0.8em;
    }

#reportcontainer {
    flex: 1 1 900px;
}

    #reportcontainer > iframe {
        border: none;
    }

.table {
    display: table;
}

    .table > div {
        display: table-row;
    }

        .table > div div {
            display: table-cell;
        }

@media only screen and (min-width : 380px) {
    header h1 a img.header__veikkolehti {
        width: 188px;
    }

    header h1 a span.header__raportit {
        font-size: 1em;
    }
}

@media only screen and (min-width : 768px) {

    h2 {
        font-size: 33px;
    }

    header {
        flex-basis: 89px;
    }

        header h1 {
            font-size: 26px;
        }

            header h1 a img.header__veikkolehti {
                width: unset;
            }

        header .header__user {
            width: unset;
            height: unset;
        }

            header .header__user .header__user__menubutton {
                display: none;
            }

            header .header__user nav, header .header__user--open nav {
                display: block;
                position: unset;
                padding: 0;
                background: unset;
                top: unset;
                width: unset;
                text-align: unset;
            }

                header .header__user nav ul {
                    display: flex;
                    flex-wrap: nowrap;
                    height: 100%;
                    align-items: stretch;
                }

                    header .header__user nav ul li {
                        flex: 1 1 auto;
                    }

                        header .header__user nav ul li .header__user__name {
                            padding-right: 32px;
                            padding-left: 32px;
                            height: 100%;
                            display: flex;
                            flex-direction: column;
                            justify-content: center;
                            padding-top: 0;
                            padding-bottom: 0;
                            text-decoration: none;
                            font-size: 17px;
                            visibility: visible;
                        }

                            header .header__user nav ul li .header__user__name::before {
                                content: unset;
                            }

                        header .header__user nav ul li .header__user__logout {
                            padding: 0 18px;
                            height: 100%;
                            display: flex;
                            flex-direction: column;
                            justify-content: center;
                            text-align: center;
                            text-decoration: none;
                            font-size: 17px;
                        }

    .reportscontroller__buttons {
        display: block;
    }

    footer {
        font-size: 18px;
        padding: 70px;
    }

        footer > div {
            margin-bottom: 40px;
        }

        footer img {
            width: 200px;
        }
}

/* Utilities */

/*
    1 = 14
    2 = 21
    3 = 30
    4 = 40
*/

.m-0 {
    margin: 0;
}

.m-1 {
    margin: 14px;
}

.ml-1 {
    margin-left: 14px;
}

.mr-1 {
    margin-right: 14px;
}

.mr-2 {
    margin-right: 18px;
}

.mb-1 {
    margin-bottom: 14px;
}

.mb-2 {
    margin-bottom: 18px;
}

.mb-3 {
    margin-bottom: 26px;
}

.mb-4 {
    margin-bottom: 40px;
}

.p-1 {
    padding: 14px;
}

.p-2 {
    padding: 18px;
}

.p-3 {
    padding: 26px;
}

.p-4 {
    padding: 40px;
}

.pr-1 {
    padding-right: 14px;
}

.bg-blue {
    background: #132633;
}

.bg-lightblue {
    background: #0F677C;
}

.bg-yellow {
    background: #F9E506;
}

.bg-gray {
    background: #EEEEEE;
}

.text-white {
    color: #F9F8F8;
}

.text-yellow {
    color: #F9E506;
}

.text-black {
    color: #132633;
}

.text-red {
    color: red;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-bold {
    font-weight: bold;
}

.text-uppercase {
    text-transform: uppercase;
}

.arrow-right::after {
    content: "❯";
    margin-left: 14px;
}

.arrow-left::before {
    content: "❮";
    margin-right: 14px;
}

.inline-block {
    display: inline-block;
}

.no-underline {
    text-decoration: none !important;
}

.leading-2 {
    line-height: 1.5rem;
}
