#main-sidenav {
	background: white url('../images/om-logo-sidebar.png') no-repeat 8px 10px;
	background-size: 50px;
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: 65px;
	box-shadow: 0 4px 4px 0 #00000040;
	list-style-type: none;
	padding: 0;
	padding-top: 85px;
	margin: 0;
	color: #666666;
	transition: 0.5s;

	/* Needs to be higher than .sticky and the project data sidebar so that drop shadow lands on them */
	z-index: 22;

	/* Keep the bottom buttons (logout, error report) from overlapping the top buttons when
    the browser window is vertically narrow */
	min-height: 500px;

	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

#main-sidenav::after {
	display: none;
}

#main-sidenav li {
	margin: 5px auto;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	font-size: 25px;
	cursor: pointer;
	border-radius: 9px;
	width: 50px;
	height: auto;
	transition: 0.5s;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0;
}
#main-sidenav li:hover i,
.main-sidenav-active i {
	color: #0084ff;
	background-color: #ecf6ff;
}
.main-sidenav-active i {
	margin-bottom: 10px !important;
}
#main-sidenav li:hover,
.main-sidenav-active {
	color: inherit;
	background-color: transparent;
}
#main-sidenav li.disabled i {
	cursor: default;
	color: #dddddd;
}
#main-sidenav li.disabled:hover i {
	background-color: transparent;
	color: #dddddd;
}
#main-sidenav i {
	position: relative;
	top: 2px;
	font-size: 25px;
	margin-bottom: 3px;
	padding: 8px;
	border-radius: 9px;
	transition: 0.5s;
}

#main-sidenav-admin-site-icon a {
	color: #666666;
}
#main-sidenav-admin-site-icon {
	position: absolute;
	bottom: 110px;
	left: 14px;
}
#main-sidenav li#main-sidenav-qa-table-button {
	color: goldenrod;

	/* We render the button in the nav sidebar because that's where all the other data view buttons are rendered,
       but we position it visibly in the menu header */
	position: fixed;
	/* right: XXXpx; We set this property in JavaScript because it has to adjust depending on what other elements are present on the page */
	font-size: 40px;
}
#main-sidenav li#main-sidenav-qa-table-button.error {
	color: orangered;
}
#main-sidenav li#main-sidenav-qa-table-button:hover,
#main-sidenav li#main-sidenav-qa-table-button.main-sidenav-active {
	background-color: transparent;
}
#qa-table-button-message-count-badge {
	font-size: 12px;
	font-weight: bold;
	display: block;
	height: 20px;
	width: 20px;
	background-color: white;
	border-radius: 100%;
	border: 2px solid lightgrey;
	position: absolute;
	right: 3px;
	opacity: 0.9;
	top: 3px;
}

#main-sidenav li.invalid-controls {
	position: relative;
}

/* Style for the smaller overlay icon on sidenav */
#main-sidenav li i.overlay-icon {
	position: absolute;
	top: -3px;
	right: -3px;
	font-size: 0.75em;
	color: #ff0000;
	background-color: white;
	border-radius: 50%;
	padding: 2px;
}

.nav-label {
	font-size: 11px;
	line-height: 1.2;
	display: block;
	text-align: center;
	overflow-wrap: break-word;
	padding: 0 2px;
	word-break: break-word;
	font-weight: 500;
	color: #313131;
	white-space: nowrap;
}

@media screen and (max-width: 992px) {
	#main-sidenav {
		width: 0;
		top: 56px;
		overflow: hidden;
		background: white;
		padding-top: 0;
	}
	#main-sidenav li#main-sidenav-qa-table-button {
		/* The header menu bar is narrower in mobile mode, so we need to slide the
           QA button just a bit higher up the screen */
		top: 0px;
		right: 12px;
	}

	.show-filter-sidebar{
		visibility: visible !important;
		transition: 0.5s;
		left: 65px !important;
	}
}

#main-sidenav li#main-sidenav-error-report-dialog {
	margin-top: auto;
	margin-bottom: 15px;
}

#main-sidenav li#main-sidenav-logout {
	margin-top: 0;
	margin-bottom: 15px;
}

/* Container for the main menu items */
.main-menu-items {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0; /* Important for proper flexbox behavior */
	overflow-y: auto; /* Allow scrolling if needed */
	align-items: center;
	gap: 3px;
}

/* Scrollbar */
.main-menu-items::-webkit-scrollbar {
	width: 6px;
}

/* Track */
.main-menu-items::-webkit-scrollbar-track {
	background: #ffffff;
}

/* Handle */
.main-menu-items::-webkit-scrollbar-thumb {
	background: #e0e0e0;
	border-radius: 50px;
}

/* Bottom items container */
.bottom-menu-items {
	margin-top: auto;
	padding-bottom: 10px;
}

@media screen and (max-height: 600px) {
	#main-sidenav li:not(.main-sidenav-qa-table-button) {
		min-height: 62px;
		margin: 0;
	}
}

#main-sidenav li:not(.main-sidenav-qa-table-button) {
	min-height: 62px;
}

#main-sidenav li.primary-nav-item {
	width: 60px;
	margin: 5px auto;
}

#main-sidenav li.primary-nav-item i {
	font-size: 25px;
	padding: 8px;
	top: 2px;
	margin-bottom: 3px;
}

@media only screen
  and (min-device-width: 820px)
  and (max-device-width: 1180px)
  and (orientation: landscape)
  and (-webkit-min-device-pixel-ratio: 2) {
	#main-sidenav li {
		margin: auto;
	}
}
