/* ==========================================================================
  Sidebar
  Style the sidebar here.
 ========================================================================== */

/* Sidebar default styling, to make sure it slides in and out, and is flexy
 ========================================================================== */

.sidebar {
	border-right: 1px solid $blue-gray-lighter;
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	transition: all 300ms;
}

.js-accordion--open .accordion__content {
  max-height: 10000vh;
}


	/* Sidebar content styling
	 ========================================================================== */

	.sidebar__header {
		border-bottom: 1px solid $blue-gray-lighter;
		padding: 0.5em 1em;

		.h1,
		.h2,
		.h3,
		.h4,
		.h5,
		.h6 {
			margin-bottom: 0;
		}
	}

	.sidebar__content {
		display: flex;
		flex: 1;
		flex-direction: column;
		overflow-y: auto;
		overflow-x: hidden;
	}

	.sidebar__content.side-navigation--blankstate {
		padding: 1em;
		display: block;
	}

	.sidebar__footer {
		border-top: 1px solid $blue-gray-lighter;
		padding: 1rem 1rem 3rem;
	}

.sidebar .side-navigation:last-child .side-navigation__content {
	border: none;
}




/* Slide behaviour
 ========================================================================== */

.sidebar--slide {
	overflow: hidden;
	position: absolute;
	z-index: 100;
	left: 0;
	width: 31rem !important;
	max-width: 31rem;
	bottom: 0;
	top: 0;
	overflow-x: hidden;
	overflow-y: auto;
	background-color: $white;
	opacity: 1;

	.vi-cross {
		top: 0.5rem;
		position: relative;
	}
}

	.sidebar--slide.sidebar--slide--right {
		left: auto;
		right: 0;
		border-right: none;
		border-left: 1px solid $blue-gray-lighter;
	}

	.sidebar--slide.sidebar--slide--wide {
		width: 50vw !important;
		max-width: 80rem;

		@include for-phone-only {
			width: 100vw !important;
		}

		@include for-tablet-portrait-up  {
			width: 80vw !important;
		}

		@include for-desktop-up  {
			width: 50vw !important;
		}
	}

nav.sidebar--slide.sidebar--slide--in {
	display: block;
	left: -31rem;
	opacity: 0;
	transition: all 200ms;
	pointer-events: none;

	.side-navigation {
		display: initial;
		padding: 0;
		min-height: none;
	}

	.side-navigation__group {
		padding-top: 0;
	}
}

	nav.sidebar--slide.sidebar--slide--in.sidebar--slide--right {
		right: -31rem;
		left: auto;
	}

section.drilldown__subcolumn.drilldown__subcolumn--active {
	left: 0;
}

/* Grid issues
 ========================================================================== */

.sidebar__toggle-wrapper {
	display: inline-block;
	position: relative;
	cursor: pointer;

	.sidebar__toggle-value {
		display: inline-block;
		position: relative;

		&:after {
			content: "\E014";
			font-family: vlaanderen_iconfont!important;
			color: $primary-blue;
			padding-left: 1rem;
			display: inline-block;
			font-size: 60%;
		}
	}
}

.sidebar__toggle-menu {
	cursor: pointer;
	color: $primary-blue;
	padding: 0.6rem 0;

	.sidebar__toggle-value {
		font-family: flanders-sans, sans-serif;
		font-size: 1.6rem;
		margin-bottom: 0.5rem;

		&:before {
			content:"\E008 ";
			font-family: vlaanderen_iconfont!important;
			font-size: 1rem;
			margin-right: 0.6rem;
		}
	}
}


/* Side navigation for
 ========================================================================== */

.sidebar .side-navigation {
	max-height: none;
	overflow: initial;
	border: none;
}

.sidebar__content {
	display: flex;
	flex: 1;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;

	.side-navigation__content {
		border-bottom: 0;
	}

	.side-navigation:not(:last-child) .side-navigation__content {
		padding-bottom: 0.5rem;
	}
}


.sidebar .side-navigation__group {
	padding-top: 1rem;
	border: none;
}

.side-navigation__item {
	padding: 0;
}

.side-navigation__item a {
	padding: 0.4rem 0.4rem 0.35rem 1rem;
	line-height: 1.2;
}

.side-navigation__item a.active:not(.link--icon) {
	background-color: $blue-gray-lightest;
	color: $black;
	font-weight: 500;
	box-shadow: inset 3px 0 0 $primary-blue;
}

.side-navigation__item a.message {
	position: relative;

	&:after {
		content:"";
		display: inline-block;
		position: absolute;
		z-index: 100;
		width: 0.6rem;
		height: 0.6rem;
		border-radius: 1rem;
		background-color: $primary-blue;
		left: 0.8rem;
	}
}

.side-navigation--large li.side-navigation__item a {
	font-size: 1.8rem;

	&.active {
		box-shadow: inset 5px 0 0 $primary-blue;
	}
}
