//Grab our vars
@import 'vars';
/* ==========================================================================
	 Legecy Theme Styles
	 ========================================================================== */
.envirabox-theme-#{$theme_name} {
	border-radius: 2px;
	padding: 4px !important;
	background: none;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	box-shadow: none;
	.envirabox-close,
	.envirabox-arrow--left span,
	.envirabox-arrow--right span {
		background-image: url('images/envirabox_sprite.png');
	}
	/* Thumbs */
	.envirabox-thumbs {
		display: none;
		position: absolute;
		top: auto;
		width: auto;
		bottom: 10px;
		left: 0;
		right: 0;
		background: transparent;
		-webkit-tap-highlight-color: transparent;
		-webkit-overflow-scrolling: touch;
		-ms-overflow-style: -ms-autohiding-scrollbar;
		box-sizing: border-box;
		z-index: 99995;
		& > ul {
			list-style: none;
			position: absolute;
			position: relative;
			box-sizing: border-box;
			width: 100%;
			height: 100%;
			margin: 0;
			padding: 0;
			overflow-x: hidden;
			overflow-y: auto;
			font-size: 0;
			white-space: nowrap;
			& > li {
				float: left;
				overflow: hidden;
				padding: 0;
				margin: 2px;
				position: relative;
				box-sizing: border-box;
				display: inline-block;
				cursor: pointer;
				outline: none;
				-webkit-tap-highlight-color: transparent;
				-webkit-backface-visibility: hidden;
				backface-visibility: hidden;
				margin: 0px 8px;
				&.envirabox-thumbs-active {
					opacity: 1;
					&.focused img {
						border: 1px solid #000099;
					}
				}
				& > img {
					top: 0;
					left: 0;
					max-width: none;
					max-height: none;
					-webkit-touch-callout: none;
					-webkit-user-select: none;
					-moz-user-select: none;
					-ms-user-select: none;
					user-select: none;
				}
			}
		}
	}

	/**
	 * Actions
	 */
	.envirabox-toolbar {
		position: fixed;
		top: 10px;
		right: 10px;
		z-index: 988061;
		height: 16px;

		& > div {
			display: inline-block;
			margin-left: 9px;
			width: 16px;
			height: 16px;
			text-indent: -9999px;
			position: relative;

			&:before {
				font-size: 16px;
				text-indent: 0;
				position: absolute;
				top: 0;
				right: 0;
			}

			& a {
				display: block;
				width: 16px;
				height: 16px;
				position: relative;
				z-index: 1;
				background: none;
			}
		}

		& a {
			outline: none;
		}
		& .envira-download-button:before {
			content: '\e90d';
		}
		& .envira-printing-button:before {
			content: '\e90e';
		}
		& .envira-thumbs-button:before {
			content: '\e90e';
		}
		& .envira-fullscreen-button:before {
			content: '\e903';
		}
		& .envirabox-slideshow-button {
			&:before {
				content: '\e908';
			}
			&.playing:before {
				content: '\e906';
			}
		}
		& .envira-zoom-button {
			&:before {
				content: '\e90c';
			}
			& a:before {
				content: '';
			}
			&.zoom-on:before {
				content: '\e90b';
			}
		}
	}
	&.envira-supersize .envirabox-outer {
		background-color: rgba(0, 0, 0, 0.85);
		background-image: none;
		overflow: hidden;
		overflow-y: hidden;
	}
	.envirabox-close {
		position: absolute;
		top: -20px;
		right: -20px;
		width: 36px;
		height: 36px;
		cursor: pointer;
		z-index: 999999;
	}
	/**
	 * Navigation
	 */
	.envirabox-navigation {
		position: absolute;
		top: 50%;
		width: 100%;
		z-index: 99999;
		a {
			position: absolute;
			width: 35px;
			height: 35px;
			span {
				visibility: visible;
				width: 35px;
				height: 35px;
				display: block;
			}
		}
		/**
		 * Previous Navigation
		 */
		.envirabox-arrow--left {
			left: 10px;
			span {
				left: 10px;
				background-position: 0 -36px;
				visibility: visible;
			}
		}

		/**
		 * Next Navigation
		 */
		.envirabox-arrow--right {
			right: 10px;
			span {
				background-position: 0 -72px;
				right: 10px;
				visibility: visible;
			}
		}
	}
	/**
	 * Navigation
	 */
	.envirabox-navigation-inside {
		position: absolute;
		top: 50%;
		width: 100%;
		z-index: 99999;
		a {
			position: absolute;
			width: 35px;
			height: 35px;
			span {
				visibility: visible;
				width: 35px;
				height: 35px;
				display: block;
			}
		}
		/**
		 * Previous Navigation
		 */
		.envirabox-arrow--left {
			left: 10px;
			span {
				left: 10px;
				background-position: 0 -36px;
				visibility: visible;
			}
		}

		/**
		 * Next Navigation
		 */
		.envirabox-arrow--right {
			right: 10px;
			span {
				background-position: 0 -72px;
				right: 10px;
				visibility: visible;
			}
		}
	}
	.envirabox-position-overlay {
		opacity: 0;
		visibility: hidden;
		position: absolute;
	}
	.envirabox-image-wrap {
		border-radius: 3px;
		border: 5px solid rgb(255, 255, 255);
		/**
	    * Dynamic Positioning
	    */
		.envirabox-position-overlay {
			opacity: 1;
			visibility: visible;
			box-sizing: border-box;
			position: absolute;
			overflow: visible;
			z-index: 988041; /* Beat the prev/next controls */
			padding: 0;

			/**
	        * Top Left
	        */
			&.envira-gallery-top-left {
				top: 0;
				left: 0;
				text-align: left;
			}

			/**
	        * Top Right
	        */
			&.envira-gallery-top-right {
				top: 0;
				right: 0;
				text-align: right;
			}

			/**
	        * Bottom Left
	        */
			&.envira-gallery-bottom-left {
				bottom: 0;
				left: 0;
				text-align: left;
			}

			/**
	        * Bottom Right
	        */
			&.envira-gallery-bottom-right {
				bottom: 0;
				right: 0;
				text-align: right;
			}
		}
	}
	.envirabox-thumbs > ul > li:before {
		border: none;
	}

	.envirabox-caption-wrap {
		bottom: -85px;
		width: 100%;
		position: absolute;
		z-index: 99;
		// pointer-events: none;
		display: table;
		text-align: center;
		.envirabox-caption,
		.envirabox-title {
			padding-bottom: 220px;
			padding: 30px 0;
			font-size: 14px;
			color: #fff;
			line-height: 20px;
			-webkit-text-size-adjust: none;
			& a,
			& button,
			& select {
				pointer-events: all;
				position: relative;
			}
			a {
				color: #fff;
				text-decoration: underline;
			}
		}
		&.inside {
			bottom: 0;
			background: white;
			.envirabox-caption,
			.envirabox-title {
				padding: 10px 0 0 0;
				text-align: left;
				color: black;
			}
		}
		&.outside {
			bottom: -50px;
			text-align: left;
			.envirabox-caption,
			.envirabox-title {
				text-align: left;
				padding: 0;
			}
		}
		&.over {
			bottom: 0px;
			background: rgba(0, 0, 0, 0.5);
			text-align: left;
			width: auto;
			.envirabox-caption,
			.envirabox-title {
				color: white;
				padding: 10px;
			}
		}
	}
}
//video
.envirabox-slide {
	&.envirabox-slide--video {
		.envirabox-content {
			padding: 0;
			.envirabox-position-overlay {
				&.envira-gallery-top-left {
					top: 0;
					left: 0;
				}
				&.envira-gallery-top-right {
					top: 0;
					right: 0;
				}
				&.envira-gallery-bottom-left {
					bottom: 0;
					left: 0;
				}
				&.envira-gallery-bottom-right {
					bottom: 0;
					right: 0;
				}
			}
		}
	}
}

.envirabox-theme-base .envirabox-slide--iframe .envirabox-content,
.envirabox-slide--genericDiv .fb_iframe_widget {
	background: transparent;
	border-radius: 3px;
	border: 5px solid white;
	padding: 0;
}
.envirabox-slide--genericDiv .fb_iframe_widget {
	// background: black;
	border: 0;
	display: inline;
	// display: block;
}

.envirabox-theme-base {
	.envirabox-slide--genericDiv,
	.envirabox-slide--video .envirabox-content.video {
		.envirabox-video-container {
			border-top: 5px solid #fff;
			border-left: 5px solid #fff;
			border-right: 5px solid #fff;
			border-bottom: 0px solid #fff;
			background-color: #fff;
			video {
				margin: auto;
				display: block;
			}
		}
		.envirabox-navigation-inside .envirabox-arrow--left {
			left: 25px;
		}
		.envirabox-navigation-inside .envirabox-arrow--right {
			right: 25px;
		}
	}
	.envirabox-slide--video .envirabox-content.video {
		background-color: #fff;
		a.envirabox-close {
			top: -15px;
			right: -15px;
		}
	}
	.envirabox-thumbs {
		width: auto;
		bottom: 10px;
		left: 0;
		right: 0;
		overflow: hidden;
		background: transparent;
		& > ul {
			overflow: hidden;
		}
		ul li a {
			border: none;
		}
		ul li {
			margin: 0 10px;
		}
		ul li.active {
			opacity: 1;
		}
		&.bottom {
			bottom: 0;
		}
		& ul.mobile li {
			margin: 10px 5px;
		}
	}

	.envirabox-thumbs > ul > li {
		border-color: transparent;
	}

	.envirabox-container--thumbs .envirabox-caption-wrap,
	.envirabox-container--thumbs .envirabox-controls,
	.envirabox-container--thumbs .envirabox-slider-wrap {
		right: 0;
		top: 10px;
	}
}

.envirabox-show-thumbs .envirabox-thumbs {
	display: block;
}
.envirabox-container.envirabox-social.envirabox-show-thumbs .envirabox-thumbs {
	pointer-events: none;
}
.envirabox-container.envirabox-social.envirabox-show-thumbs .envirabox-thumbs > ul > li {
	pointer-events: auto;
}
.envirabox-slide--iframe .envirabox-content {
	padding: 0;
}
//Fix WordPress things
.admin-bar .envirabox-theme-#{$theme_name} {
	.envirabox-thumbs {
		&.envirabox-thumbs-top {
			top: 42px;
			pointer-events: auto !important;
			background-color: transparent;
		}
	}
}
.envirabox-theme-#{$theme_name} {
	.envirabox-thumbs {
		&.envirabox-thumbs-top {
			z-index: 9999;
			pointer-events: none;
			background-color: transparent;
		}
	}
}
@media all and (max-width: 800px) {
	.envirabox-theme-base_dark {
		.envirabox-thumbs {
			display: none !important;
		}
		.envirabox-container--thumbs .envirabox-controls,
		.envirabox-container--thumbs .envirabox-slider-wrap,
		.envirabox-container--thumbs .envirabox-caption-wrap {
			bottom: 0;
		}
	}
}
