html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Manrope, Helvetica, Arial, sans-serif;
    font-size: 1.2rem;
    color: #dddddd;
    background-color: #222222;
    text-align: center;
}

table {
    width: 100%;
    height: calc(100vh - 40px); /* vh - navbar size */
    border-collapse: collapse;
    table-layout: fixed;
}

td {
    border: 2px solid #000;
    text-align: center;
    font-size: 1.3rem;
    width: auto;
}
td:first-child {
    width: 18rem;
    text-align: left;
    padding-left: 0.5em;
}
td, td:before {
    text-shadow: 1px 1px 8px #333333;
}
td.happy-5, td.status-ok {
    background-color: #89b38f;
}
td.happy-5:before {
    content: ':D'
}
td.happy-4, td.status-low {
    background-color: #bac791;
}
td.happy-4:before {
    content: ':)'
}
td.happy-3, td.status-medium {
    background-color: #ffcd87;
}
td.happy-3:before {
    content: ':/'
}
td.happy-2, td.status-high {
    background-color: #ff8f75;
}
td.happy-2:before {
    content: ':('
}
td.happy-1, td.status-critical {
    background-color: #f7636a;
}
td.happy-1:before {
    content: ':('
}
td.skipped {
    background-color: #555555;
    color: #aaaaaa;
}
td.skipped:before {
    content: 'n/a'
}

td.error{
    animation-name: error;
    animation-duration: 2000ms;
    animation-timing-function:ease-in;
    animation-iteration-count:Infinite;
}
td.error:before {
    content: 'ERROR'
}
@keyframes error {
    0%{background-color: #dd0000;}
    50%{background-color: #dd0000;}
    51%{background-color: #880000;}
    100%{background-color: #880000;}
}

td.percentage::after {
    content: '%';
}

td.w15 {
    width: 15%;
}
td.w25 {
    width: 25%;
}
form {
    height: 100%;
}
td p {
    display: block;
    font-size: 1rem;
}
td span.groupName {
    color: #666666;
}
input[type=radio] {
    display: none;
}
label {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
input[type=radio]:checked + label {
    background-color: #eeeeee;
}
input[type=submit] {
    font-family: Manrope, Helvetica, Arial, sans-serif;
    font-size: 2rem;
    border: 2px solid black;
    padding: 15px;
    background-color: #eeeeee;
    color: #222222;
}
a {
    color: #dddddd;
    text-decoration: none;
}

/* Navbar */

#nav-toggle { display: none; }
.nav-toggle-icon {
    display: none;
}

nav {
    background-color: #333;
    height: 40px;
    line-height: 40px;
    padding: 0 1rem;
    position: relative;
    text-align: left;
    display: flex;
    align-items: center;
}

nav > img {
    height: 30px;
}

.nav-toggle-icon {
    font-size: 2rem;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    display: none;
    padding: 1rem;
}

nav ul {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #333;
    width: 100%;
}

nav ul li {
    border: none;
}

nav ul li a {
    font-size: 1rem;
    display: block;
    color: white;
    text-decoration: none;
    padding: 0 1rem;
    line-height: 40px;
    transition: background 0.3s;
}

nav ul li a:hover {
    background-color: #555;
}

/* Mobile styles */
@media (max-width: 768px) {

    html, body {
        font-size: 1rem;
    }

    table,
    table thead,
    table tbody,
    table tr,
    table th,
    table td {
        display: block;
        width: 100%;
    }

    table thead {
        display: none;
    }

    table tr {
        margin-bottom: 1.5rem;
    }

    table td {
        padding: 10px;
        border: none;
    }

    td:first-child {
        width: auto;
    }

    /* Group columns into rows of 3, after the first column */
    table td:nth-child(9),
    table td:nth-child(10),
    table td:nth-child(11) {
        display: inline-block;
        width: 32%;
        box-sizing: border-box;
        margin-bottom: 5px;
    }

    table td:nth-child(n+2):nth-child(-n+8) {
        display: none;
    }

    .nav-toggle-icon {
        display: inline-block;
    }

    #nav-toggle:checked ~ nav ul {
        display: flex;
    }

    nav {
        flex-wrap: wrap;
        height: auto;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: static;
        width: 100%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    }

    #nav-toggle:checked ~ nav ul {
        display: flex;
    }

    nav ul li {
        border-bottom: 1px solid #444;
    }

    nav ul li a {
        padding: 1rem;
        line-height: normal;
    }
}
