/* ############ Main Blossom CSS ############ */


html.hidescrollbar{
	overflow-x: hidden;
}

html.hidescrollbar body{
	overflow-x: hidden;
}

div.blossomfeaturebox{ /* style for Blossom UI */
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	position: fixed;
	visibility: hidden;
	opacity: 0;
	z-index: 1000;
	-webkit-perspective: 1000px;
	        perspective: 1000px;
}

div.blossomfeaturebox:before{ /* Blossom overlay */
	content: '';
	display: block;
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background: black;
	opacity: 0.6;
	z-index: -1;
}

div.blossomfeaturebox div.blossominner{
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	margin: auto;
	text-align: center;
	vertical-align: middle;
	-webkit-transform-style: preserve-3d;
	        transform-style: preserve-3d;
	-webkit-transform: translate3D(0,-100%,0);
	        transform: translate3D(0,-100%,0);
}

div.blossomfeaturebox div.blossominner:before{ /* technique to vertical align elements */
	content: '';
	display: inline-block;
	height: 100%;
	vertical-align: middle;
}

div.blossomfeaturebox div.optincontent2wrapper{
	position: relative;
	width: 100%;
	max-width: 800px;
	display: block;
	height: 100%;
	max-height: 400px;
	border: 2px solid black;
	background: #eee;
	overflow: auto;
	text-align: left;
	vertical-align: middle;
	display: inline-block;
	z-index: 1000;
}


div.blossomfeaturebox div.closex{ /* Large x close button inside nav */
	width: 60px;
	height: 60px;
	overflow: hidden;
	display: block;
	position: absolute;
	cursor: pointer;
	text-indent: -1000px;
	z-index: 10000;
	top: 5px;
	right: 5px;
}


div.blossomfeaturebox div.closex::before,
div.blossomfeaturebox div.closex::after{ /* render large cross inside close button */
	content: "";
	display: block;
	position: absolute;
	width: 100%;
	height: 6px;
	background: white;
	top: 50%;
	margin-top: -3px;
	-webkit-transform: rotate(-45deg);
			transform: rotate(-45deg);
}

div.blossomfeaturebox div.closex::after{ /* render large cross inside close button */
	-webkit-transform: rotate(45deg);
			transform: rotate(45deg);
}


div.blossomfeaturebox div.errordiv{
	width: 100px;
	height: 100px;
	border-radius: 10px;
	position: absolute;
	display: none;
	top: 50%;
	left: 50%;
	margin-top: -50px;
	margin-left: -50px;
	opacity: 0.6;
	text-align: center;
	z-index: 1000;
	background: black;
}

div.blossomfeaturebox div.errordiv span{
	vertical-align: middle;
	color: red;
	font-weight: bold;
	font-size: 3em;
	line-height: 90px;
}



/* ############ CSS transitions and Keyframe animations ############ */

div.blossomfeaturebox.openbox{
	visibility: visible;
	opacity: 1;
	-webkit-transition: opacity 0.2s;
	transition: opacity 0.2s;
}


/* slidedown effect */ 
div.blossomfeaturebox.openbox div.blossominner.slidedown{
	-webkit-transform: translate3D(0,0,0);
	        transform: translate3D(0,0,0);
	-webkit-transition: -webkit-transform 1s 0.2s;
	transition: transform 1s 0.2s;
}

/* swing effect */ 

div.blossomfeaturebox.openbox div.blossominner.swing{
	-webkit-transform: translate3D(0,0,0);
	        transform: translate3D(0,0,0);
	-webkit-transition: -webkit-transform 1s 0.2s;
	transition: transform 1s 0.2s;
}

div.blossomfeaturebox.openbox div.blossominner.swing .optincontent2wrapper{
	-webkit-transform-origin: 50% 0;
	        transform-origin: 50% 0;
	-webkit-animation: swing 1.5s 1.2s forwards ease-in-out;
	        animation: swing 1.5s 1.2s forwards ease-in-out;
}

@-webkit-keyframes swing{
	0%{-webkit-transform:rotate(0deg);}
	20%{-webkit-transform:rotate(-15deg)}
	40%{-webkit-transform:rotate(10deg)}
	60%{-webkit-transform:rotate(-7deg)}
	80%{-webkit-transform:rotate(5deg)}
	100%{-webkit-transform:rotate(0deg)}
}

@keyframes swing{
	0%{transform:rotate(0deg)}
	20%{transform:rotate(-15deg)}
	40%{transform:rotate(10deg)}
	60%{transform:rotate(-7deg)}
	80%{transform:rotate(5deg)}
	100%{transform:rotate(0deg)}
}

/* starwars effect */

div.blossomfeaturebox.openbox div.blossominner.starwars{
	-webkit-perspective: 1000px;
					perspective: 1000px; /* this required for perspective to work in IE11 and below */
	-webkit-transform: translate3D(0,0,0);
	        transform: translate3D(0,0,0);
}

div.blossomfeaturebox div.blossominner.starwars .optincontent2wrapper{
	-webkit-transform: rotateX(50deg) scale(.7) translate3d(0,500px,90px);
	        transform: rotateX(50deg) scale(.7) translate3d(0,500px,90px);
}

div.blossomfeaturebox.openbox div.blossominner.starwars .optincontent2wrapper{
	-webkit-animation: starwars 1s forwards ease-in;
	        animation: starwars 1s forwards ease-in;
}

@-webkit-keyframes starwars{
	90%{-webkit-transform: rotateX(50deg) scale(.8) translate3d(0,0,0)}
	100%{-webkit-transform: rotateX(0) scale(1) translate3d(0,0,0)}
}

@keyframes starwars{
	80%{transform: rotateX(50deg) scale(.8) translate3d(0,0,0);}
	100%{transform: rotateX(0) scale(1) translate3d(0,0,0);}
}

/* Newspaper effect */

div.blossomfeaturebox.openbox div.blossominner.newspaper{
	-webkit-transform: translate3D(0,0,0);
	        transform: translate3D(0,0,0);
}

div.blossomfeaturebox div.blossominner.newspaper .optincontent2wrapper{
	opacity: 0;
}

div.blossomfeaturebox.openbox div.blossominner.newspaper .optincontent2wrapper{
	opacity: 1;
	-webkit-transition: opacity 1.5s;
					transition: opacity 1.5s;
	-webkit-animation: newspaper 1.5s forwards ease-in-out;
	        animation: newspaper 1.5s forwards ease-in-out;
}

@-webkit-keyframes newspaper{
	0%{-webkit-transform: rotate(0deg) scale(0)}
	100%{-webkit-transform: rotate(1080deg) scale(1);}
}

@keyframes newspaper{
	0%{transform: rotate(0deg) scale(0);}
	100%{transform: rotate(1080deg) scale(1);}
}

/* wiggle effect */

div.blossomfeaturebox div.blossominner.wiggle{
	-webkit-perspective: 1000px;
					perspective: 1000px; /* this required for perspective to work in IE11 and below */
	-webkit-transform: translate3D(0,100%,0);
	        transform: translate3D(0,100%,0);
}

div.blossomfeaturebox.openbox div.blossominner.wiggle{
	-webkit-transform: translate3D(0,0,0);
	        transform: translate3D(0,0,0);
}

div.blossomfeaturebox.openbox div.blossominner.wiggle .optincontent2wrapper{
	-webkit-animation: wiggle 1.5s forwards ease-in-out;
					animation: wiggle 1.5s forwards ease-in-out;
}

@-webkit-keyframes wiggle{
	0%{-webkit-transform: rotateY(30deg)}
	25%{-webkit-transform: rotateY(-30deg)}
	50%{-webkit-transform: rotateY(0deg)}
	65%{-webkit-transform: rotateX(30deg)}
	80%{-webkit-transform: rotateX(-30deg)}
	100%{-webkit-transform: rotateX(0deg)}
}

@keyframes wiggle{
	0%{transform: rotateY(30deg)}
	25%{transform: rotateY(-30deg)}
	50%{transform: rotateY(0deg)}
	65%{transform: rotateX(30deg)}
	80%{transform: rotateX(-30deg)}
	100%{transform: rotateX(0deg)}
}
