@media (max-width: 575.98px), (max-height: 800px) {
	body {
		padding: 0;
        margin: 0;
        overflow-x:hidden;
        min-height: 100vh;
	}
	/*html {
		font-size: 12px;
	}*/
	h4 {
		margin-top: 0;
	}

    button#menu {
        margin-top: 0;
        position: sticky;
        background-color: var(--background);
        z-index: 999;
        top: 0;
    }

    div#sidebar {
        padding-right: 0px;
        position: fixed;
        overflow-x: hidden;
        overflow-y: auto;
        height: 100%;
        top:0;
    }

    div#sidebar.open {
        background-color: var(--background);
        z-index: 100;
        height: 100%;
        width: auto;
        padding-right: 1rem;
        border-right: 1px solid var(--border);
    }

    div#sidebar.open + #ec::before {
        content: '';
        display: block;
    }

    #title,
    #main_view {
        margin-left: 48px;
    }

    #title {
        margin-right: 15px;
        margin-top: 1rem;
        font-size: 2rem;
    }

    a#info_row, a#info_row:hover {
        bottom: 0;
    }

    a#telegram_row, a#telegram_row:hover {
        bottom: 48px;
    }
}

@media (max-height: 800px) and (min-width: 992px) {
    #title,
    #main_view {
        margin-left: 160px;
    }
}

@media (min-width: 992px) and (min-height: 800px) {
    div#sidebar {
        align-items: flex-start;
        width: auto;
    }

    div#sidebar #menu {
        display: none;
    }

    div#sidebar #event_types {
        width:auto;
        align-items: flex-start;
    }

    div#sidebar .sidebar_row {
        padding-left: 12px;
    }

    div#sidebar:not(.open) .material-icons {
        width: auto;
    }
    
    div#sidebar > * {
        width: 100%;
    }
    
    div#sidebar #event_types .event_type_row {
        justify-content: flex-start;
        padding-left: 14px;
    }
    
    div#sidebar .event_type_name {
        display: inline-block;
    }
}



#title {
    max-width: 850px;
}


#sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;

    width: 48px;
    height: 90vh;

    position: sticky;
    top: 28px;
}

#sidebar.open {
    align-items: flex-start;
    width: auto;
}

#sidebar.open #menu {
    padding-left: 12px;
    text-align: left;
}


#sidebar.open #event_types {
    width:auto;
    align-items: flex-start;
}


#sidebar.open .sidebar_row {
    padding-left: 12px;
}

#sidebar .material-icons {
    cursor: pointer;
    line-height: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

#sidebar:not(.open) .material-icons {
    width: 100%;
}

#sidebar > * {
    width: 48px;
    flex-shrink: 0;
}

#sidebar.open > * {
    width: 100%;
}

#sidebar.open #event_types .event_type_row {
    justify-content: flex-start;
    padding-left: 14px;
}

#sidebar.open .event_type_name {
    display: inline-block;
}

#main_view {
    display: flex;
    width: 100%;
}

@media (max-width: 970px) {
    #main_view {
        flex-direction: column;
    }
}

#menu {
    margin-top: -.3rem;
    font-size: 1.8rem;
    height: 3rem;
    line-height: 2rem;
    width: 100%;
    padding: 0;
}

#menu::after {
    /*content: 'arrow_forward';*/
    content: 'menu';
}

#sidebar.open #menu::after {
    /*content: 'arrow_back';*/
    content: 'menu_open';
}

#menu:hover {
    background-color: var(--hover);
}

#search_row {
    display:none;
}

.row {
	display: flex;
}
.col {
	flex: 1 1 0%;
	min-width: 0;
	max-width: 100%;
}

#tasks_row {
    margin-top: 1rem;
}

#logout_row,
#user_row {
    color:inherit;
    font-weight: inherit;
}



#event_types_toggle_row {
    margin-top: 1rem;
}

#event_types_toggle,
#search,
#new_event,
#favorites {
    padding: 0;
}

#favorites {
    margin-bottom: 0.1rem;
}

#new_event_row {
    margin-top: 1rem;
}

#event_types {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
}


.sidebar_row,
.event_type_row {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    column-gap: 10px;

    overflow: hidden;
    /*padding: 0 5px 0 10px;*/
    border-radius: 5px;
    height: 2.5rem;
    min-width: 2.5rem;
    width: 100%;

    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.sidebar_row:hover,
.event_type_row:hover {
    filter: brightness(85%);
    background-color: var(--background);
}

.event_type_indicator {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 1px solid var(--background);
    flex-shrink: 0;
}

.event_type_name {
    display: none;
    line-height: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    margin-right: 0.5rem;
    width: 100%;
}


#info_row, #info_row:hover,
#telegram_row, #telegram_row:hover,
#organizers_row, #organizers_row:hover {
    height: 48px;
    position: sticky;
    left: 0;
    color:inherit;
    font-weight: normal;
    text-decoration: none;
    background-color: white;
}

#info_row, #info_row:hover {
    bottom: 28px;
}

#telegram_row, #telegram_row:hover {
    margin-top: auto;
    bottom: 76px;
}

#telegram_row svg {
    height: 24px;
    width: 24px;
    flex-shrink: 0;
}

#telegram_row svg path {
    fill: var(--text_normal);
}

#imprint_link {
    position: absolute;
    bottom: 5px;
    margin: 0 auto;
    width: fit-content;
    display: block;
    left:0;
    right:0;
}

#save_favorites {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;

    border-radius: 10px;
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
    line-height: 2rem;

    background-color: var(--background);
    border: 1px solid var(--border);
    z-index: 5;
}

#save_favorites:hover {
    filter: brightness(85%);
}
