
form summary {
    background-color: rgba(135, 135, 135, 0.53);
    font-family: sans-serif;
    font-size: 16px;
    font-weight: normal;
    padding: 10px 20px;
}

form details {
    background-color: rgba(135, 135, 135, 0.25);
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
}

.task-result-cell input {
    width: 20px;
    margin: 5px 2px;
    align-content: center;
}

.task-result-cell {
    text-align: center;
}

/*Remove spin-button from number inputs*/
input[type='number'] {
    -moz-appearance: textfield;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

th {
    font-size: 16px;
}

table {
    border-spacing: 3px 0;
}

.table {
    border-spacing: 3px 3px;
}

.showme {
    display: none;
}

.showhim:hover .showme {
    display: block;
}

.showhim:hover .hideme {
    display: none
}

.horizontal > * {
    display: inline-block;
}


.expandable-button {
    display: flex;
    align-items: center;
    padding: 5px;

    & .button-text {
        max-width: 0;
        visibility: hidden;
        overflow: hidden;
        white-space: nowrap;
        margin-left: 0;
        padding-left: 0;
        transition: max-width 1s, visibility 1s, margin-left 1s, padding-left 1s;
    }

    &:hover .button-text {
        visibility: visible;
        max-width: 200px;
        width: auto;
        margin-left: 5px;
        padding-left: 5px;
        padding-right: 5px;
        transition: max-width 1s, visibility 1s, margin-left 1s, padding-left 1s;
    }
}


div.alert, div.alert-danger {
    display: flex;
    justify-content: space-between;
    border-radius: 10px;
    padding: 10px;
    margin: 10px;

    button {
        background: transparent;
        border: none;
        cursor: pointer;
        border-radius: 10px;

        &:hover {
            background: #fff4;
        }
    }
}

div.alert {
    background-color: lightgreen;
}

div.alert-danger {
    background-color: lightcoral;
}

.mobw-table {
    display: grid;
    width: max-content;
    align-items: baseline;
    font-size: 14px;


    > * {
        margin: 5px;
    }

    input {
        margin: 0;
    }

    p {
        padding-bottom: 2px;
    }

    .header {
        font-weight: bold;
        font-size: 16px;
    }
}

.student-table {
    grid-template-columns: auto auto auto auto auto;

    .header-row{
        grid-column-start: 1;
        grid-column-end: 6;
    }
}

.student-table-selectable {
    grid-template-columns: auto auto auto auto auto auto;

    .header-row{
        grid-column-start: 1;
        grid-column-end: 7;
    }
}



body {
    background-color: #c6c4cc;
}

.website-body {
    display: grid;
    grid-template-columns: min-content 1fr 200px;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    max-width: 1280px;
    background-color: white;
    margin: 0 auto;

    > .header {
        grid-column: 1 / -1;
        max-width: 100vw;
        overflow: hidden;

        img {
            /*max-width: 100%;/* This makes aligning difficult*/
            min-width: 700px;
        }

        object-fit: contain;
    }

    .sidebar {
        grid-column: 1;
        width: 343px;

        #sidebar {
            padding-left: 40px;
            padding-right: 55px;
        }

        p {
            line-height: 1.0em;
            margin: 8px 0;

            a {
                --hover-amount: 10px;

                color: #000;
                text-decoration: none;
                padding-right: var(--hover-amount);
                display: block;

                transition: all 0.3s ease;

                &:hover {
                    padding-left: var(--hover-amount);
                    padding-right: 0;
                    text-underline: #282e39;
                    text-decoration: underline;
                }
            }
        }

        hr {
            display: block;
            height: 2px;
            border: 0;
            border-top: 2px solid #505868;
            padding: 0;
        }

        h1 {
            font-size: 14px;
            color: #505868;
            margin: 0 0;
        }

        h1 a {
            color: #505868;
        }

        h1 a:hover {
            color: #fff;
        }

        .highlighted a {
            color: #ffffff;
            font-weight: bold;
        }
    }

    .main {
        grid-column: 2;
    }

    .info-box {
        grid-column: 3;
    }

    .footer {
        grid-column: 1 / -1;
        position: relative;
        bottom: 0;
        left: 0;
        right: 0;

        display: flex;
        justify-content: flex-end;
        align-items: center;

        /*background: rgba(38, 43, 49, 0.53);*/
        background: #464e5b;

        a {
            color: #ffffff;
            text-decoration: none;
        }

        a:hover {
            color: #e9ca1a;
            text-decoration: none;
        }
    }
}

button, input[type=submit] {
    /*background-color: #e9ca1a;*/
    background-color: #c2c5cc;
    border-radius: 5px;
    font-family: sans-serif;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
    /*color: white;*/
    border: none;
    padding: 10px;

    &:hover {
        background-color: #a7a9b0;
    }
}

div:has(> input) {
    input {
        width: 100%;
        padding: 10px;
        margin: 5px 0 20px;
        border-radius: 5px;
        background: #f0f0f0;
        border: none;
    }
}

label {
    font-family: sans-serif;
    font-size: 16px;
    font-weight: normal;
    margin: 1.5em 0 0.8em;
}

ul.errorlist {
    padding-left: 20px;
    padding-top: 6px;
    background-color: rgba(255, 0, 0, 0.32);
    border-radius: 5px;
    margin: 5px;
}

div.text-field {
    margin-bottom: 20px;

    .text-input-with-error {
        margin-top: 5px;
        border-radius: 5px;

        &:has(>.errorlist) {
            background-color: rgba(255, 0, 0, 0.32);
        }

        input {
            margin: 0;
            box-sizing: border-box;
        }

        ul {
            padding-top: 5px;
            padding-bottom: 5px;
        }
    }

    ul {
        padding-left: 20px;

        li {
            padding: 0;
        }
    }
}

div.checkbox-field {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: max-content auto;

    input {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 1.4em;
        height: 1.4em;
        margin: 0.2em 10px 0;

    }

    div {
        grid-column: 2;
        padding-bottom: 0.8em;

        label > p {
            font-family: "Verdana", "Arial", "Sans", serif;
            font-size: 14px;
            line-height: 1.6em;
            color: #353a44;
            padding-bottom: 0;
        }
    }

    .errorlist {
        background-color: rgba(255, 0, 0, 0.32);
        border-radius: 5px;
    }
}

div.select-field {
    display: flex;
    align-items: baseline;
    margin-top: 1.5em;
    margin-bottom: 1.5em;

    label {
        margin-right: 10px;
        margin-top: 0;
        margin-bottom: 0;
    }

    select {
        /* Reset */
        font: inherit;

        height: max-content;
        width: max-content;
        border: none;
        border-radius: 5px;
        padding: 0.5em;
        cursor: pointer;


        /* Personalize */

        option {
            color: inherit;
            outline: none;
            background-color: white
        }

        :hover {
            background-color: #f0f0f0;
        }
    }

    .helptext {
        margin-left: 10px;
    }
}

form li, form ul {
    padding: 0;
}

.num_tasks_to_solve {
    display: flex;
    align-items: baseline;
    gap: 10px;

    input {
        width: unset;
        flex-basis: 0;
        flex-shrink: 1;
        min-width: 1.5em;
    }

    > div {
        margin-bottom: 10px;
    }

    p {
        flex: 1;
        padding-bottom: 0;
    }

    ul {
        margin-left: 0;

    }
}


.result-table {
    font-size: 12px;
    border-spacing: 4px 0;

    td {
        margin: 10px;
        width: max-content;

    }

    th {
        text-align: start;
        font-size: 14px;
    }

    .results {
        text-align: center;
    }

    td.results {
        width: 1.5em;
        height: 2em;
    }

    input {
        font-size: inherit;
        padding: 5px;
        margin: -5px;
    }
}

.highlight-button {

    &:hover {
        box-sizing: content-box;
        border-radius: 5px;
        padding: 3px;
        margin: -3px;
        background-color: #c2c5cc;
    }
}

.small-button {
    box-sizing: content-box;
    border-radius: 5px;
    padding: 3px;
    margin: -3px;

    &:hover {
        padding: 4px;
        margin: -4px;
        background-color: #c2c5cc;
    }
}

.add-result-cell {
    width: 100%;
    border-radius: 5px;
    margin: -1px 2px;
    padding: 1px;
    background-color: #f0f0f0;
    font-size: inherit;

    &:hover {
        padding: 3px;
        margin: -4px -1px;
        background-color: #c2c5cc;
    }
}

.content {
    .warning-box {
        background-color: rgba(173, 167, 45, 0.78);
        border-radius: 5px;
        padding: 5px 10px;
        margin: 5px;
    }
}

.my-students {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px 0;

    h1 {
        font-weight: bold;
        margin: auto 0;
    }
}

@media screen and (max-width: 1150px) {
    .my-students {
        display: flex;
        flex-direction: column;
    }
}

.competition-title{
    display: flex;
    align-items: center;
    padding-top: 1.5em;
    h2 {
        margin: 0;
        padding-right: 10px;
    }
}
