.timetable {
    width: 907.33px;
    margin: 0 auto 100px;
}

#calendar_wrapper, #calendar {
    display: flex;
    justify-content: center;
    align-items: start;
} 

#calendar {
    align-items: stretch;
}

.calendar_wrapper {
    display: flex;
    justify-content: center;
    align-items: start;
    background-color: var(--trans-white);
    border: 2px solid var(--white);
    width: max-content;
    padding: 20px;
    border-radius: 10px;
    margin: 30px auto 20px;
}

.calendar {
    position: relative;
    height: 100%;
    padding: 20px;
    padding-bottom: 0;
    box-sizing: border-box;
    border: none;
    outline: none;
}

.calendar:first-of-type {
    padding-left: 0;
}

.calendar:last-of-type {
    padding-right: 0;
}

.calendar_border {
    border: 2px solid var(--white);
    border-radius: 5px;
    padding: 10px 20px 20px;
    box-sizing: border-box;
    margin-top: 20px;
}

.calendar .month_header {
    margin: -25px 0 0;
    width: max-content;
    font-size: 32px;
    margin-left: auto;
    color: var(--white);
    font-style: normal;
    display: block;
    font-family: 'Brockmann' !important;
    font-weight: 400;
    margin-right: 0;
}

.calendar:last-of-type .month_header {
    margin-left: 7px;
    margin-right: 0;
}

.calendar:first-of-type {
    border-right: 2px solid var(--white);
}

.calendar .week_header {
    margin: 0;
    display: flex;
    justify-content: center;
    width: 100%;
    color: var(--white);
}

.week_header h3 {
    text-align: center;
    width: calc(100% / 7);
    color: var(--white);
    font-family: 'Roboto', sans-serif !important;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 16px;
}

.calendar_week {
    display: flex;
    align-items: center;
}

.calendar_day,
.non_calendar_day {
    position: relative;
    width: calc(100% / 7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 3px;
    box-sizing: border-box;
}

.calendar_day h4 {
    margin: 0;
    width: 46px;
    height: 46px;
    color: var(--white);
    font-family: 'Roboto', sans-serif !important;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    cursor: pointer;
}

.calendar_day input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    margin: 0;
}

.calendar_day h4:hover,
.calendar_day h4:focus,
.calendar_day h4:active {
    background-color: var(--brown);
    color: var(--white);
    border-radius: 5px;
}

.calendar_day .selected + label h4 {
    background-color: var(--beaver);
    color: var(--black);
    border-radius: 5px;
}

.calendar_day .in_between + label h4 {
    background-color: var(--black);
    color: var(--white);
    border-radius: 5px;
}

.crossed label h4 {
    background: 
        linear-gradient(to top left,
            rgba(255,255,255,0.2) 0%,
            rgba(255,255,255,0.2) calc(50% - 2px),
            rgba(255,255,255,0.9) 50%,
            rgba(255,255,255,0.2) calc(50% + 2px),
            rgba(255,255,255,0.2) 100%);
    border-radius: 5px;
}

.calendar_navigation {
    width: 46px;
    height: 46px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    cursor: pointer;
    background-color: var(--brown);
    color: var(--white);
    border-radius: 5px;
    z-index: 10;
}

#prev_button {
    margin-right: -46px;
}

#next_button {
    margin-left: -46px;
}

.calendar input[type="radio"][disabled],
.calendar input[type="radio"][disabled] + label {
    opacity: 0.5;
    cursor: auto;
    pointer-events: none;
}

#clash_error_message {
    display: none;
    text-align: center;
    justify-content: center;
    font-weight: 700;
    color: var(--red);
    margin: 40px auto;
}

@media (max-width: 1000px) {
    .timetable {
        width: 100%;
    }

    .calendar_day h4 {
        width: 36px;
        height: 36px;
    }

    .details_wrapper {
        flex-wrap: wrap;
        width: 791.3px;
        margin: 0 auto 80px;
    }

    .details_wrapper .input {
        width: calc((100% - 20px) / 2);
    }

    .details_wrapper .input:nth-of-type(3),
    .details_wrapper .input:nth-of-type(4) {
        margin-top: 20px;
    }

    .details_wrapper .button {
        margin-top: 20px;
        width: 100%;
    }
}

@media (max-width: 850px) {
    .calendar:nth-of-type(2) {
        display: none;
    }

    .calendar:nth-of-type(1) {
        border-right: 0;
        padding: 0;
    }

    .calendar_border {
        margin-top: 30px;
    }

    .calendar .month_header {
        margin: 0 auto;
        text-align: center;
        width: 100%;
        font-size: 24px;
    }

    .calendar_day {
        padding: 5px;
    }

    .calendar_day h4 {
        width: 46px;
        height: 46px;
    }

    .details_wrapper {
        width: calc(100% - 40px);
        margin-bottom: 40px;
    }
}

@media (max-width: 600px) {
    .calendar_wrapper {
        width: calc(100% - 80px);
    }

    .details_wrapper .input {
        width: 100%;
    }

    .details_wrapper .input:nth-of-type(2) {
        margin-top: 20px;
    }

    .details_wrapper {
        margin-bottom: 20px;
    }

    .details_wrapper .button {
        margin-top: 25px;
    }

    .timetable {
        margin-bottom: 0;
    }
}

@media (max-width: 520px) {
    .calendar_day h4,
    .calendar_navigation {
        width: 36px;
        height: 36px;
    }

    .calendar_border {
        border: none;
        margin-top: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 425px) {
    .calendar_navigation {
        width: 25px;
        height: 25px;
        border: none;
    }

    .calendar {
        background-color: transparent;
    }

    .calendar_opening h1 {
        margin-top: 20px;
        font-size: 30px;
    }

    .calendar .month_header {
        margin-top: -5px;
    }
}