$mobile-navbar-height: 2.4rem;
$narrow-navbar-width: 3.2rem;
.navbar {
	flex: 0 0 $navbar-width;
	background-color: $primary-600;
	bottom: 0;
	left: 0;
	top: 0;
	position: relative;
	z-index: $zindex-1;
	min-height: 100vh;
	&--narrow {
		flex: 0 0 $narrow-navbar-width;
	}
}

.navbar-wrapper {
	padding: $unit-6;
	position: fixed;
	width: $navbar-width;
	display: flex;
	height: 100%;
	flex-wrap: nowrap;
	flex-direction: column;
	&--narrow {
		flex: 0 0 $narrow-navbar-width;
		width: $narrow-navbar-width;
		padding: 1.2rem 0.2rem;
	}
}

.navbar-toggle {
	height: $mobile-navbar-height;
	display: none;
	color: #fff;
	flex: 0 0 2.4rem;
	justify-content: center;
	text-align: center;
	align-items: center;
	width: 2.4rem;
	&:hover {
		cursor: pointer;
		background: rgba(0, 0, 0, 0.24);
	}
	&--active {
		background: $primary-700;
	}
}

.navbar-header {
	flex: 1 1 auto;
}

.navbar-body {
	flex: 1 1 100%;
	overflow-y: auto;
}

.navbar-footer {
	flex: 0 0 auto;
	&--narrow {
		display: flex;
		justify-content: center;
	}
}

.navbar-logo {
	margin: 1.2rem auto;
	align-items: center;
	.navbar-logo-img {
		width: 100%;
		&--mobile {
			display: none;
		}
	}
}

.navbar-dropdown {
	background: $primary-700;
	position: absolute;
	top: $mobile-navbar-height;
	width: 100%;
	display: none;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.26);
}

.navbar-menu {
	text-align: left;
	box-sizing: border-box;
	font-size: 0.8rem;
	ul {
		width: 100%;
		margin: 0;
	}
	li {
		color: #fff;
		font-size: 1em;
		margin: 0.8rem 0;
		padding: 0.4rem 0.8rem;
		list-style: none;
		i {
			margin-right: 1em;
		}
		&:hover {
			border-radius: 0.1rem;
			background: rgba(0, 0, 0, 0.2);
			cursor: pointer;
		}
	}
	a {
		text-decoration: none;
	}
	&--narrow li {
		padding: 0.8rem;
		i {
			margin-right: 0;
		}
	}
	.router-link-active li {
		border-radius: 0.1rem;
		font-weight: 600;
		background: rgba(0, 0, 0, 0.2);
	}
}

.navbar-narrow-toggle {
	width: 1.2rem;
	height: 100vh;
	background: transparent;
	display: block;
	position: absolute;
	right: -1.2rem;
	top: 0;
	&:hover {
		border-left: 0.2rem solid $primary-300;
		cursor: pointer;
		&::after {
			content: '';
			width: 0.2rem;
			height: 1.6rem;
			display: block;
			position: relative;
			top: 50%;
			left: 0.2rem;
			border-radius: 0.2rem;
			background: $primary-300;
		}
	}
	@media (max-width: $size-md) {
		display: none;
	}
}

@media (max-width: $size-md) {
	.navbar {
		height: 2.4rem;
		min-height: auto;
		z-index: $zindex-4;
		flex: 0 0 $mobile-navbar-height;
	}
	.navbar-wrapper {
		width: 100%;
		padding: 0;
		position: relative;
		flex-direction: row;
		flex: 0 0 $mobile-navbar-height;
		height: $mobile-navbar-height;
	}
	.navbar-header {
		width: 100%;
		flex: 1 1 auto;
		display: flex;
		align-items: center;
	}
	.navbar-logo {
		margin: 0;
		height: 2rem;
		display: flex;
		flex: 1;
		justify-content: center;
		.navbar-logo-img {
			display: none;
			&--mobile {
				display: block;
				width: auto;
				max-height: 100%;
			}
		}
	}
	.navbar-body {
		display: none;
	}
	.navbar-dropdown {
		display: block;
	}
	.navbar--narrow .navbar-wrapper {
		padding: 0;
	}
	.navbar-toggle {
		display: flex;
	}
	.navbar-footer {
		display: flex;
		flex: 0 0 2.4rem;
		justify-content: center;
		align-items: center;
	}
}
