﻿body {
	overflow-y: scroll;
	-ms-overflow-y: scroll;
}

.popup {
	position: fixed;
	top: 50%;
	left: 50%;
	
	-webkit-transform: translate(-50%, -50%);
	-moz-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	-o-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);

	opacity: 0.0;
	display: none;

	z-index: 99999;

	-webkit-transition: opacity 200ms ease-in-out;
	-moz-transition: opacity 200ms ease-in-out;
	-ms-transition: opacity 200ms ease-in-out;
	-o-transition: opacity 200ms ease-in-out;
	transition: opacity 200ms ease-in-out;

	font-family: Roboto, sans-serif;
	font-weight: normal;
	font-size: 15px;
	color: #767676;

	width: 590px;

	background-color: #fff;
	padding: 40px;

	-webkit-box-shadow: 5px 5px 25px rgba(0, 0, 0, 0.3333);
	-moz-box-shadow: 5px 5px 25px rgba(0, 0, 0, 0.3333);
	box-shadow: 5px 5px 25px rgba(0, 0, 0, 0.3333);
}

.popup::after {
	content: '';
	display: block;
	clear: both;
}

.popup.open { display: block; }
.popup.visible { opacity: 1.0; }

.popup label
, .popup strong { font-weight: bold; }

.popup h1 { font-size: 20px; }

.popup p, .popup .info { margin-top: 20px; }

.popup .nutrition_label > span
, .popup .recipe > .splash > span {
	position: relative;
	display: inline-block;
	width: 245px;

	background-color: #fff;
	height: 0px;
	font-size: 0px;
}

.popup .recipe.no_image .splash {
	font-size: 0;
	margin: 0;
}

.popup .recipe.no_image .splash span { padding-bottom: 0; }

.popup span > img {
	position: absolute;
	z-index: 1;
	top: 50%;
	left: 50%;

	max-width: 100%;
	max-height: 100%;

	-webkit-transform: translate(-50%, -50%);
	-moz-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	-o-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);

	background-color: #fff;
}

.popup .nutrition_label img { width: 100%; }

.popup .nutrition_label > span { padding-bottom: 185.3061%; }
.popup .splash > span { padding-bottom: 75.8197%; }

.popup .recipe { padding-right: 20px; }
.popup .recipe > .splash {
	margin-bottom: 10px;

	overflow: hidden;
}

.popup .text { margin-bottom: 60px; }

.popup .smart_choices {
	position: absolute;
	bottom: 40px;
	max-width: 245px;
	font-size: 0px;
}

.popup .smart_choices div {
	display: inline-block;
	width: 50px;
	height: 47px;

	margin: 10px 0px 0px 10px;
}

.popup .smart_choices > div:nth-child(4n + 1) {
	margin-left: 0px;
}

.popup .nutrition_label div {
	position: absolute;
	right: 80px;
	bottom: 45px;

	text-transform: uppercase;
	font-size: 14px;
}

.popup .recipe {
	float: left;
	padding-bottom: 57px;
	width: 264px;
}

.popup .nutrition_label {
	float: right;
	padding-bottom: 30px;
	width: 245px;
}

.popup .close {
	width: 40px;
	height: 40px;

	text-align: center;
	line-height: 40px;

	position: absolute;
	top: 0px;
	right: 0px;
	z-index: 999;

	font-family: Roboto, sans-serif;
	font-weight: bold;
	font-size: 35px;
	color: #fff;

	-webkit-text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.75);
	-moz-text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.75);
	text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.75);

	/* Not having this rendered by GPU is making it freak out for some reason. */
	-webkit-transform: translateZ(0);
	-moz-transform: translateZ(0);
	-ms-transform: translateZ(0);
	-o-transform: translateZ(0);
	transform: translateZ(0);

	-webkit-touch-action: manipulation;
	-moz-touch-action: manipulation;
	-ms-touch-action: manipulation;
	-o-touch-action: manipulation;
	touch-action: manipulation;
}

.popup .close > span { display: none; }

.popup .close:hover
, .popup .close:focus
, .popup .close:focus-within
, .popup .close:focus-visible {
	-webkit-text-shadow: 3px 6px 10px rgba(0, 0, 0, 0.75);
	-moz-text-shadow: 3px 6px 10px rgba(0, 0, 0, 0.75);
	text-shadow: 3px 6px 10px rgba(0, 0, 0, 0.75);
}

.popup .close:active {
	margin-top: 2px;
	margin-right: -2px;

	-webkit-text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.5);
	-moz-text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.5);
	text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.5);
}

.popup .print {
	position: absolute;
	bottom: 40px;
	right: 40px;

	display: inline-block;
	background: url('/Content/icon_print.png') no-repeat center center;
	
	-webkit-background-size: contain;
	-moz-background-size: contain;
	-ms-background-size: contain;
	-o-background-size: contain;
	background-size: contain;
	
	width: 32px;
	height: 32px;
	opacity: 0.25;
	
	-webkit-transition: opacity 200ms ease-in-out;
	-moz-transition: opacity 200ms ease-in-out;
	-ms-transition: opacity 200ms ease-in-out;
	-o-transition: opacity 200ms ease-in-out;
	transition: opacity 200ms ease-in-out;
}

.popup .print:hover { opacity: 1; }

.popup .print_image { display: none; }

.popup .spinner {
	top: 50%;
	left: 50%;
	bottom: auto;
	right: auto;
	z-index: 1 !important;
	
	-webkit-transform: translate(-50%, -50%);
	-moz-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	-o-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
	
	opacity: 1;
	display: block;
} 

.ie9 .popup .close > span {
	position: absolute;
	top: 1px;
	left: 1px;
	z-index: -1;

	display: inline-block;
	width: 40px;
	height: 40px;

	text-align: center;
	line-height: 40px;
	color: #000;

	filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '3');
	opacity: 0.75;
}

.ie9 .popup .close:hover > span
, .ie9 .popup .close:focus > span
, .ie9 .popup .close:focus-within > span
, .ie9 .popup .close:focus-visible > span {
	top: 2px;
	left: 2px;
	filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '4');
}

.ie9 .popup .close:active > span
, .ie9 .popup .close:active > span {
	top: 0px;
	left: 0px;
	filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '2');
}

@media only screen and (max-width: 768px) {
	.popup {
		position: fixed;
		top: 25px;
		left: 25px;
		right: 25px;
		bottom: 25px;

		padding: 0px;

		-webkit-transform: none;
		-moz-transform: none;
		-ms-transform: none;
		-o-transform: none;
		transform: none;

		overflow: scroll;
		overflow-y: scroll;
		-ms-overflow-y: scroll;
		overflow-x: hidden;
		-ms-overflow-x: hidden;

		-webkit-box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.5);
		-moz-box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.5);
		box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.5);

		width: auto;

		font-weight: 300;
		font-size: 24px;
	}

	.popup label, .popup strong { font-weight: normal; }
	.popup .close {
		position: fixed;

		top: 55px;
		right: 65px;

		font-size: 50px;
	}

	.popup .recipe
	, .popup .nutrition_label {
		float: none;
		width: auto;
	}

	.popup .text { position: relative; }
	.popup .recipe {
		padding-right: 0px;
		padding-top: 515px;
	}

	.popup .recipe.no_image { padding-top: 80px; }
	.popup .recipe.no_image .text { margin-top: 50px; }
	.popup .recipe.no_image .splash { background-color: #333333; }

	.popup .recipe > *:not(.splash) {
		margin-left: 50px;
		margin-right: 50px;
	}

	.popup .splash img {
		min-width: 100%;
		min-height: 100%;
		max-width: none;
		max-height: none;
	}

	.popup .smart_choices { max-width: 310px; }

	.popup .recipe > .splash {
		width: auto;
		position: fixed;
		top: 25px;
		left: 25px;
		right: 25px;

		z-index: 99;

		height: 430px;

		-webkit-transition: -webkit-box-shadow 300ms ease-in-out;
		-moz-transition: -moz-box-shadow 300ms ease-in-out;
		-ms-transition: box-shadow 300ms ease-in-out;
		-o-transition: box-shadow 300ms ease-in-out;
		transition: box-shadow 300ms ease-in-out;

		pointer-events: none;
	}

	.popup .recipe > .splash span {
		width: 100%;
	
		-o-object-fit: cover;
		object-fit: cover;

		top: 50%;
		left: 50%;

		-webkit-transform: translate3d(-50%, -50%, 0px);
		-moz-transform: translate3d(-50%, -50%, 0px);
		-ms-transform: translate3d(-50%, -50%, 0px);
		-o-transform: translate3d(-50%, -50%, 0px);
		transform: translate3d(-50%, -50%, 0px);
	}

	.ie9 .popup .recipe > .splash span {
		-webkit-transform: translate(-50%, -50%);
		-moz-transform: translate(-50%, -50%);
		-ms-transform: translate(-50%, -50%);
		-o-transform: translate(-50%, -50%);
		transform: translate(-50%, -50%);
	}

	.popup h1 {
		font-weight: normal;
		font-size: 24px;
		margin-right: 160px;

		position: absolute;
		top: -100px;
		z-index: 999;

		line-height: 100px;

		-webkit-transition: color 150ms ease-in-out, -webkit-text-shadow 150ms ease-in-out;
		-moz-transition: color 150ms ease-in-out, -moz-text-shadow 150ms ease-in-out;
		-ms-transition: color 150ms ease-in-out, text-shadow 150ms ease-in-out;
		-o-transition: color 150ms ease-in-out, text-shadow 150ms ease-in-out;
		transition: color 150ms ease-in-out, text-shadow 150ms ease-in-out;
	}

	.popup h1 span {
		display: inline-block;
		line-height: normal;
		vertical-align: middle;
	}

	.popup .calories {
		position: absolute;
		top: -70px;
		right: 0px;

		font-size: 36px;
		color: #b3282d;
	}

	.popup .calories span { display: none; }
	.popup .calories label::after { content: '.'; }
	.popup .calories label
	, .popup .calories strong { font-weight: normal; }

	.popup .smart_choices div {
		width: 70px;
		height: 65px;
	}

	.popup .smart_choices { position: static; }
	.popup .smart_choice { background-image: url('/Content/smart.png?v=1'); }
	.popup .vegetarian { background-position:  -70px    0px; }
	.popup .vegan      { background-position: -140px    0px; }
	.popup .heart      { background-position:    0px  -65px; }
	.popup .carb       { background-position:  -70px  -65px; }
	.popup .fiber      { background-position: -140px  -65px; }
	.popup .sodium     { background-position:    0px -130px; }
	.popup .gluten     { background-position:  -70px -130px; }
	.popup .bcbs       { background-position: -140px -130px; }
	
	.popup .nutrition_label {
		margin-left: 40px;
		margin-right: 40px;
		position: relative;
	}

	.popup .nutrition_label::after {
		content: '';
		display: block;
		position: absolute;
		top: 0px;
		left: 0px;
		right: 0px;
		bottom: 0px;
		border: 2px #fff solid;
	}

	.popup .nutrition_label > div:not(.spinner) { display: none; }
	.popup .nutrition_label > span {
		width: 100%;
	}

	.popup .splash.scrolled
	, .popup .recipe.no_image .splash {
		height: 100px !important;
		width: auto;
		position: fixed;
		top: 25px;
		left: 25px;
		right: 25px;

		z-index: 99;

		-webkit-box-shadow: 0px 10px 20px -10px rgba(0, 0, 0, 0.5);
		-moz-box-shadow: 0px 10px 20px -10px rgba(0, 0, 0, 0.5);
		box-shadow: 0px 10px 20px -10px rgba(0, 0, 0, 0.5);
	}

	.popup .recipe h1.light
	, .popup .recipe.no_image h1 { color: #fff; }

	.popup .recipe:not(.no_image) h1.light {
		-webkit-text-shadow: 0px 0px 40px rgba(0, 0, 0, 0.6666), 0px 0px 20px rgba(0, 0, 0, 0.3333), 0px 0px 10px rgba(0, 0, 0, 0.1666);
		-moz-text-shadow: 0px 0px 40px rgba(0, 0, 0, 0.6666), 0px 0px 20px rgba(0, 0, 0, 0.3333), 0px 0px 10px rgba(0, 0, 0, 0.1666);
		text-shadow: 0px 0px 40px rgba(0, 0, 0, 0.6666), 0px 0px 20px rgba(0, 0, 0, 0.3333), 0px 0px 10px rgba(0, 0, 0, 0.1666);
	}

	.popup h1.scrolled
	, .popup .recipe.no_image h1 {
		position: fixed;
		top: 25px;
	}

	.popup.scrolled .recipe { padding-top: 100px; }

	.popup.no_recipe {
		top: 50%;
		bottom: auto;

		-webkit-transform: translate(0px, -50%);
		-moz-transform: translate(0px, -50%);
		-ms-transform: translate(0px, -50%);
		-o-transform: translate(0px, -50%);
		transform: translate(0px, -50%);

		overflow: auto !important;

		padding: 25px 65px 25px 25px;
	}

	.popup.no_recipe h1 {
		position: static;
		line-height: normal;
		margin-right: 0px;
	}

	.popup.no_recipe .close {
		position: absolute;
		top: 30px;
		right: 30px;
	}

	.popup .print { display: none; }
}