@sidebar-width: 240px;

.sidebar {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: @sidebar-width;
	display: flex;
	flex-direction: column;

	@media @small-down {
		.translateX(-@sidebar-width);
	}
}

.sidebar-header {
	flex: none;

	a {
		display: flex;
		align-items: center;
		margin: 0;
		padding: @padding-small @padding-medium;
		.semibold-font();
		.font-size(@h3-font-size);
		transition: all @transition-fast ease-in-out;

		&:hover,
		&:focus {
			color: @primary !important;
		}
	}
}

.sidebar-title {
	margin: 0;
	margin-top: @margin-large;
	padding: @padding-xsmall @padding-medium;
	.medium-font();
	.font-size(1);
	.uppercase();
}

.sidebar-action {
	margin: @margin-medium;

	.button-group {
		display: flex;

		.button {
			flex: 1 0 auto;
		}

		.dropdown {
			flex: 0 0 auto;
		}
	}
}

.sidebar-content {
	flex: auto;
	overflow: auto;
	padding-bottom: 5rem;
}

.sidebar-navigation {
	ul {
		margin: 0;
		list-style: none;
	}

	li {
		margin: 0;
		padding: 0;
	}

	a {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: @padding-small @padding-medium;
		.semibold-font();
		.font-size(1.3);
		line-height: 1;
		transition: all @transition-fast ease-in-out;

		svg {
			transition: all @transition-fast ease-in-out;
		}
	}

	li ul {
		li {
			border-bottom: none;
		}

		a {
			padding-left: @padding-medium;
			.font-size(1.2);
		}
	}
}

.sidebar-footer {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: @padding-small @padding-medium;
}

.sidebar-footer-title {
	margin: 0;
}

.sidebar-footer-text {
	margin: 0;
	margin-top: 0.4rem;
	.medium-font();
	.font-size(@font-size-xsmall);
}

.sidebar-light {
	background: @grey-200;

	@media @medium-up {
		border-right: 1px solid @light-grey;
	}

	@media @small-down {
		border-left: 1px solid @light-grey;
	}

	.sidebar-header {
		border-bottom: 1px solid @light-grey;

		a {
			color: @grey;
		}
	}

	.sidebar-title {
		color: @grey-500;
	}

	.sidebar-navigation {
		a {
			color: @grey;

			&:hover,
			&:focus {
				color: @primary;
			}

			&.active {
				color: @primary;
			}
		}
	}

	.sidebar-footer {
		border-top: 1px solid @light-grey;
	}

	.sidebar-footer-title {
		color: @dark-grey;
	}

	.sidebar-footer-text {
		color: @mid-grey;
	}
}

.sidebar-dark {
	background: @dark-grey;

	.sidebar-header {
		border-bottom: 1px solid lighten(@dark-grey, 2%);

		a {
			color: @grey-400;
		}
	}

	.sidebar-title {
		color: @grey-500;
	}

	.sidebar-navigation {
		a {
			color: @grey-400;

			&:hover,
			&:focus {
				color: @white;
			}

			&.active {
				color: @primary;
			}
		}
	}

	.sidebar-footer {
		border-top: 1px solid lighten(@dark-grey, 2%);
	}

	.sidebar-footer-title {
		color: @grey-400;
	}

	.sidebar-footer-text {
		color: @mid-grey;
	}
}
