
/* ---------------------- */
/* Global Page Attributes */
/* ---------------------- */

/* Make 2 columns for a nice side bar */
.row {
	/* display: flex; */
	margin: 0;
	padding: 0;
}

.column-body {
	margin: 0;
	padding: 0;
	margin-right: var(--sidebar-margin-right);
}

.column-sidebar {
	max-width: var(--sidebar-width);
	padding: 0;
}


/* ---------------------- */
/* Wide Screen Sidebar    */
/* ---------------------- */

.sidenav {
	height: 100%;           /* Full-height: remove this if you want "auto" height */
	min-width: var(--sidebar-width);	/* Set the width of the sidebar */
	position: fixed;        /* Fixed Sidebar (stay in place on scroll) */
	z-index: 1;             /* Stay on top */
	top: 0;                 /* Stay at the top */
	right: 0;               /* fix it on the right side. use left for left side. */
	overflow-x: hidden;     /* Disable horizontal scroll */
	display: block;
	padding-top: 5em;       /* TODO: How is this determined?? */
	padding-right: 30px;
	margin-right: 0px;
	text-align: center;
}



.buttonbox-vertical{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	text-align: center;
	margin: 2px;
	margin-left: 0;
	width: var(--sidebar-button-width);
}


#sidebar-button, #sidebar-button:link, #sidebar-button:active, #sidebar-button:visited {
	display: flex;
	width: var(--sidebar-button-width);
	min-height: 2em;
	justify-content: center;
	align-items: center;
	/* height: auto; */
	margin-bottom: 2px;
	margin-left: 0;
	color: #4d4d4d;
	background-color: #cccccc;
}

#sidebar-button:hover {
	text-decoration: none;
	color: #141414;
        background-color: #bfbfbf;
	cursor: pointer;
}

.toc_title {
	display: flex;
	min-height: 2em;
	justify-content: center;
	align-items: center;
	font-size: 16pt;
	width: var(--sidebar-button-width);
	text-align: center;
	font-weight: bold;
	margin: 0;
}





/* ---------------------- */
/* Mobile Screen Sidebar  */
/* ---------------------- */

/* Outer wrapper for sidebar visible for mobile */
.column-sidebar-mobile {
	display: none;
	margin-left: 2px;
	margin-right: 2px;
}

/* Wrapper around actual navigation bar */
.sidenav-mobile-grid {
	display: grid;
	/* background-color: blue; */
	justify-content: end;
	margin-left: 0;
}

.sidenav-mobile {
	grid-row: 2;
	grid-column: 1;
	margin-left: 0;
	/* background-color: green; */
}



/* Wrapper around table of contents "button" */
/* Should have same margins etc as .buttonbox-vertical */
.toc_button_wrap {
	grid-column: 1;
	grid-row: 1;
	overflow: hidden;
	margin-left: 0px;
	margin-right: 0px;
	width: var(--sidebar-button-width);
	/* background-color: red; */
	margin-top: 0px;
	margin-bottom: 0px;
	float: right;
	align-items: right;
}

.toc_button, .toc_button:link, .toc_button:active, .toc_button:visited {
	float: right;
	display: flex;
	color: #4d4d4d;
        background-color: #b3b3b3;
	text-align: center;
	align-items: center;
	justify-content: center;
	margin-top: 10px;
	margin-bottom: 0px;
	margin-right: 0px;
	margin-left: 0px;
	width: var(--sidebar-button-width);
	min-height: 2em;
	text-decoration: none;
	padding-top: 3px;
	padding-bottom: 3px;
}

.toc_button:hover {
	text-decoration: none;
	color: #141414;
        background-color: #bfbfbf;
	cursor: pointer;
}




/* Max width: max-width body + 2*sidebar (same width on left and right side) */
@media all and (max-width: 1400px) {

	.column-body {
		margin: 0;
		padding: 0;
	}

	.buttonbox-vertical {
		display: none;
		justify-content: start;
		align-items: start;
	}

	.column-sidebar {
		display: none; /* make it disappearing */
	}

	.column-sidebar-mobile {
		display: block;
	}

	/* Make contents button appear left until the menu icon appears as well */
	.toc_button {
		float: left;
		margin-left: 0px;
	}

	.sidenav-mobile-grid {
		display: grid;
		justify-content: end;
		margin-left: 0;
	}

}


/* Just the main text body width for mobile */
@media (pointer: coarse){

	.buttonbox-vertical {
		display: none;
		float: right;
		margin-left: 0;
		justify-content: flex-end;
		align-items: end;
	}

	.column-sidebar {
		display: none; /* make it disappearing */
	}

	.column-sidebar-mobile {
		display: block;
	}

	.toc_button {
		float: right;
		/* margin-left: 4px; */
	}

	.sidenav-mobile-grid {
		display: grid;
		justify-content: end;
		margin-left: 0;
	}

}
