@import "../variables";

.side-tabs {
	height:100%;


	&-container {
		height:100%;
		width:$sidebar-w;
	}

	&-headers {
		position: relative;
		width:70px;
		height: 100%;
		float:left;

		box-shadow: inset -3px 0px 5px 0px darken($dark-grey, 2%);

		display: flex;
		flex-flow: column nowrap;
		justify-content: space-between;
	}

	&-icon-headers {
		flex:0 0 72px;
		padding-top:19px;
		padding-left:22px;
		background-color: $white;

		&-top {
			flex: 1 1 100%;
			display: flex;
			flex-flow: column nowrap;
			justify-content: flex-start;
		}

		&-bottom {
			flex: 1 1 100%;
			display: flex;
			flex-flow: column nowrap;
			justify-content: flex-end;
		}
	}

	&-legend {
		position: absolute;
		left: 0;
		right: 0;
		font-size: 10px;
		letter-spacing: 0.05em;
		text-align: center;
		color: $medium-grey;
		margin-top: -2px;
	}

	&-icon {
		height:73px;
		width: 100%;
		padding-left:20px;
		padding-top:22px;
		cursor:pointer;

		&.is-active, &:hover {
			//TODO(franz): integrate in themified css
			background-color: #4a4a4a;
			.side-tabs-legend {
				display: none;
			}
		}

		&.is-disabled {
			opacity: 0.2;
			cursor: default;
		}

		&.has-news {
			background-color: $red;

			-webkit-animation-name: example;
			animation-name: example;
		    -webkit-animation-duration: 2s;
		    animation-duration: 2s;
			-webkit-animation-iteration-count: infinite;
			animation-iteration-count: infinite;

			/* Chrome, Safari, Opera */
			@-webkit-keyframes example {
			    0% {background-color: lighten($red, 2%);}
			    30% {background-color: mix($dark-red, $red);}
				100% {background-color: lighten($red, 2%);}
			}

			/* Standard syntax */
			@keyframes example {
			    0% {background-color: lighten($red, 2%);}
			    30% {background-color: mix($dark-red, $red);}
				100% {background-color: lighten($red, 2%);}
			}
		}
	}
}

.has-news {
	.side-tabs-legend {
		color: $white !important;
	}
}

.side-tab {
	margin-left: 70px;
	background-color: $dark-grey;
	height:100%;
	display:none;
	transition:width .2s ease;
	position:relative;
	z-index:2;
	width:270px;

	&.is-active {
		display:block;
	}

	&-big {
		width:800px;
		z-index:6;
		box-shadow: none;
		padding: 2em;
		&-backdrop {
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			z-index: -1;
			width: 300%;
			height: 100%;
			background-color: $dark-grey;
			opacity: .9;
			transition: opacity 800ms ease;
			&:hover {
				opacity: .6;
			}
		}
		&.no-padding {
			padding: 0;
			h1 {
				padding: 1.25em;
				padding-bottom: 0;
			}
		}
	}

	h2 {
		font-size: 18px;
		padding-top: 1em;
		margin-bottom: 1.2em;
		color: $white;
	}

	p {
		color: $white;
	}

	&-white {
		background-color: $white;
		h1, h2,
		p {
			color: $dark-grey;
		}
		.side-tab-big-backdrop {
			background-color: $green;
			opacity: 1;
			left: 100%;
			transition: opacity 800ms ease;
			&:hover {
				opacity: .9;
			}
		}
	}

}
