/**
 * Sidebar
 * @author	CLARANET
 */

/* sidebar elements */
#logo {
	display		: block;
	width		: 170px;
	height		: 59px;
	height		: 30px; /* logo SIMGES */
	margin		: 0.5em auto;
	background	: no-repeat 0 0 transparent;
}

	#logo > a {
		display	: inline-block;
		height	: 100%;
		width	: 100%;
	}

#profile {
	position: absolute;
	left	: 0;
	right	: 0;
	bottom	: 0;
}

	#profile div.media-body h5,
	#profile div.media-body p {
		width		: 10em;
		padding-left: 0.5em;
	}

	#profile div.media-body p {
		width			: 100%;
		padding-right	: 0.5em;
	}

	#profile div.media-body p.text-right a {
		color: #6c757d;
	}

#sidebar_actions a > i {
	padding	: 0.25em;
	cursor	: pointer;
	color	: #fff;
}

	#sidebar_actions a:hover > i {
		background-color: #3490dc;
	}

/* sidebar itself */
#sidebar {
	min-width		: 15rem;
	width			: 15rem;
	height			: 100vh;
	position		: fixed;
	top				: 0;
	left			: 0;
	padding			: 0.5em;
	text-align		: center;
	color			: #eee;
	background-color: #333;
	box-shadow		: 3px 3px 10px rgba(0, 0, 0, 0.1);
	transition		: all 0.4s;
}

#sidebar + #content {
	width		: calc(100% - 15rem);
	margin-left	: 15rem;
	transition	: all 0.4s;
}

#sidebar.active {
	min-width	: 5.5rem;
	width		: 5.5rem;
}

#sidebar.active + #content {
	width		: calc(100% - 5.5rem);
	margin-left	: 5.5rem;
}

	#sidebar.active #logo {
		/*width				: 60px;
		height				: 25px;
		background-position	: 0 -45px;
		background-size		: 250px auto;*/
		 /* logo SIMGES */
		height: 14px;
		background-size: 45%;
		background-position: left;
	}

	#sidebar.active > p {
		width			: 100%;
		white-space		: nowrap;
		overflow		: hidden;
		text-overflow	: ellipsis;
	}

	#sidebar.active #profile div.media-body {
		display: none;
	}

	#sidebar.active #profile div + span {
		position: absolute;
		top		: 1em;
		right	: 1.25em;
	}

/* main navigation */
#sidebar nav {
	height		: calc(100% - 10rem);
	overflow-y	: auto;
	overflow-x	: hidden;
}

#sidebar nav li {
	text-align: left;
}

	#sidebar nav li.divider {
		width		: 85%;
		margin-right: 7%;
		border-top	: 1px solid #6c757d;
	}

#sidebar nav > ul > li {
	border-left: 0.25rem solid transparent;
}

	#sidebar nav > ul > li:hover {
		border-left: 0.25rem solid #5c7cbc;
	}

	#sidebar.active nav > ul > li {
		border-left: 0;
	}

		#sidebar.active nav > ul > li:hover {
			border-left		: 0;
			background-color: #6c757d;
		}

#sidebar nav > ul > li > ul {
	margin-left		: 1rem;
	margin-bottom	: 0.5rem;
	border-left		: 2px solid #5c7cbc;
}

	#sidebar nav > ul > li > a {
		position: relative;
	}

		#sidebar nav > ul > li > a::after {
			font-family	: 'Material Icons';
			content		: '\e313';
			position	: absolute;
			right		: 0;
		}

		#sidebar nav > ul > li > a.active:not(.collapsed)::after {
			content		: '';
			position	: absolute;
			border-left	: 6px solid transparent;
			border-right: 6px solid transparent;
			border-top	: 6px solid #5c7cbc;
			bottom		: -6px;
			left		: 0.7rem;
			right		: auto;
		}

		#sidebar.small nav > ul > li > a.active::after {
			left	: auto;
			right	: 50%;
		}

	#sidebar nav > ul > li > a.active + ul.show > li > a.active {
		position: relative;
	}

	#sidebar nav > ul > li > a.active + ul.show > li:first-child > a.active {
		margin-top: 0.5em;
	}

	#sidebar nav > ul > li > ul > li {
		width: 100%;
	}

	#sidebar.active nav > ul > li > ul {
		margin-left: auto;
	}

	#sidebar.active nav > ul > li > a.nav-link {
		padding-left: 0.5em;
	}

/* Responsive Menu */
.menu-toggle {
	display: none;
	position: fixed;
	top: 0.7rem;
	right: 0.7rem;
	width: 40px;
	height: 40px;
	border-radius: 10px !important;
	background-color: #333;
	cursor: pointer;
	z-index: 3;
}

.hamburger {
	position: relative;
	top: calc(50% - 2px);
	left: 50%;
	transform: translate(-50%, -50%);
	width: 20px;
}

.hamburger>span,
.hamburger>span::before,
.hamburger>span::after {
	display: block;
	position: absolute;
	width: 100%;
	height: 2px;
	background-color: #eee;
	transition-duration: 0.2s;
}

.hamburger>span::before {
	content: "";
	top: -8px;
}

.hamburger>span::after {
	content: "";
	top: 8px;
}

.menu-toggle.is-active .hamburger>span {
	transform: rotate(45deg);
}

.menu-toggle.is-active .hamburger>span::before {
	top: 0;
	transform: rotate(0deg);
}

.menu-toggle.is-active .hamburger>span::after {
	top: 0;
	transform: rotate(90deg);
}

@media (max-width: 768px) {
	.menu-toggle {
		display: block;
	}

	#sidebar {
		translate: -100%;
		height: 100%;
	}

	#sidebar.is-active {
		translate: 0;
		width: 100%;
		z-index: 2;
	}

	#sidebar + #content,
	#sidebar.active + #content {
		width: 100%;
		margin-left: 0;
		padding-top: 8rem;
	}

	#logo {
		margin-bottom: 2rem;
	}
}