html, body {
    font-family: -apple-system, "Helvetica Neue", "Helvetica", "Arial", sans-serif;
    box-sizing: border-box;
    height: 100%;
}

*, *:before, *:after {
    box-sizing: inherit;
}

.navbar {
    margin-bottom: 5px;
}

.date-nav {
    display: flex;
    justify-content: space-between;

    text-align: center;
    font-size: x-large;
}

@media (min-width: 768px) {
    .date-nav {
        margin: 0 135px;
        padding: 0 15px;
    }

    .date-nav__link {
        font-size: xx-large;
        background: rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.2);
        min-width: 45px;
        border-radius: 3px;
    }
}

.date-nav__link,
.date-nav__link:hover {
    text-decoration: none;
}

.date-nav__dates {
    display: flex;
    flex-direction: row;
    align-items: center;

    cursor: pointer;
}

.date-nav__to {
    margin: 0 5px;
    opacity: 0.75;
}

/* DATE PICKER  */

.date-picker {
    display: none;
    text-align: center;
}

.date-picker input {
    line-height: 100%; /* Override weird bootstrap style  */
}

/* HOME AND FORMS*/

.form-labelled--gaps {
    max-width: 600px;
}

.form-lecture .form-inline,
.form-labelled .form-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-lecture .control-label,
.form-labelled .control-label {
    font-weight: normal;
    flex: 0 0 auto;
    padding-right: 15px;
    min-width: 25%;
}

.form-lecture .form-inline .form-control,
.form-labelled .form-inline .form-control {
    flex: 1 1 auto;
}

.teaching-group-info {
    background: #FFDD66;
    color: #886622;
    margin: 10px 20px 0 20px;
    padding: 12px 10px;
}

.teaching-group-info a {
    color: inherit;
    text-decoration: underline;
}

.home {
    display: flex;
    align-items: stretch;

    width: calc(100% - 30px);
    margin: 0 auto;
    min-height: 90vh;
}

.day {
    flex: 1 1 auto;

    display: flex;
    flex-direction: column;

    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    margin: 10px 0 0 5px;
    width: calc(20% - 8px);
    min-width: 180px;
}

.day__header {
    background: rgba(0, 0, 0, 0.05);
}

.day__header__heading {
    font-size: 125%;
    margin: 0;
    padding: 0;
    text-align: center;
}

.period {
    flex: 1 1 25%;
    font-size: small;
    margin-bottom: 5px;
}

.period-header {
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 5px;
}

.period-add {
    float: right;
    margin: 0 5px 0 0;
    padding: 0;
    position: relative;
    top: -4px;
    font-size: large;
}

.period-add:hover {
    text-decoration: none;
}

.lecture {
    position: relative;

    background: white;
    border-radius: 4px;
    border: 1px solid clear;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    margin: 5px;
    padding: 2px;
    cursor: pointer;

    transition: background-color 0.3s ease;
}

.home.readonly .lecture {
    cursor: default;
}

.lecture:hover {
    background: #f0f0f0;
}

.lecture.lecturer-missing {
    border: 1px solid rgba(200, 0, 0, 0.6);
}

.lecture__buttons {
    display: none;
    justify-content: flex-end;
    align-items: stretch;

    height: 16px;
    background: red;
}

.home:not(.readonly) .lecture:hover .lecture__buttons {
    position: absolute;
    bottom: 4px;
    right: 4px;
    display: flex;
}

.lecture__buttons__button {
    border: 1px solid silver;
    background: white;
    color: black;
    font-size: 8px;
    padding: 0 2px;
}

h4 {
    color: grey;
}

.page-container {
    min-height: 100%;
    position: relative;
}

.page-container__content {
    padding-bottom: 60px; /* Minimum is height of footer */
}

footer {
    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    min-height: 50px;
    padding: 10px 135px;

    background-color: #101010;
    background-image: linear-gradient(to top, #3c3c3c 0, #222 100%);
    color: #9D9D9D;
    font-size: x-small;
}

footer a {
    color: #B0B0B0;
    text-decoration: underline;
}

footer a:hover {
    color: #D0D0D0;
}

@media (max-width: 480px) {
    .home {
        overflow-y: scroll;
    }

    .date-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;

        font-size: small;
    }

    .date-nav__dates {
        display: flex;
        flex-direction: column;
    }

    .date-nav__link {
        font-size: 44px;
    }

    .date-nav__date {
        font-size: large;
    }

    .date-nav__to {
        color: rgba(0, 0, 0, 0.2);
    }

    .day {
        margin: 20px 5px;
    }

    .day__header {
        padding: 5px 0;
    }

    .period {
        min-height: 100px;
    }

    .period-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .period-add {
        float: none;
        font-size: 22px;
        margin: 0 10px;
        position: unset;
        top: 0;
    }

    footer {
        padding: 10px 15px;
    }
}
