#modal, #error_message {
	background-color: #fff;
	color: #2c2c2c;
	font-size: 14px;
	margin: 16px auto;
	max-width: 640px;
	min-height: 250px;
	padding: 8px;
	position: relative;
	overflow: hidden;
	text-align: left;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	-o-border-radius: 5px;
	border-radius: 5px;
	}
	
#modal button.mfp-close, 
#error_message button.mfp-close {
	font-size: 1.5em;
	height: 1em;
	line-height: 1em;
	margin: 0;
	padding: 0;
	position: absolute; top: 8px; right: 8px;
	text-align: right;
	width: 1em;
	}

#modal .instructions {
	border: 0 solid #ccc;
	border-width: 0 0 1px 0;
	font-weight: bold;
	line-height: 1.5em;
	margin: 0 auto 12px;
	padding: 0 0 8px;
	text-align: left;
	}

#modal-thumbnail {
	float: left;
	margin: 0;
	min-height: 250px;
	padding: 0;
	text-align: center;
	width: 150px;
	}

#modal img {
	background-color: transparent;
	max-width: 100%;
	box-shadow: 0 0 2px rgba(0,0,0,0.35);
	}

#modal .details {
	float: right;
	margin: 0;
	max-width: 469px;
	overflow: hidden;
	padding: 0 0 0 4px;
	text-align: left;
	width: 100%;
	}
#modal .package-details {
	float: none;
	max-width: none;
	padding: 0 0;
	}

#modal p {
	line-height: 1.5em;
	margin: 0 0 1.5em;
	}

#modal p,
#modal label {
	color: #2c2c2c;
	}

#modal .details p:empty {
	display: none;
	}

#modal .details span.info-label {
	font-size: 12px;
	font-weight: bold;
	}

#modal label {
	display: block;
	font-size: 12px;
	font-weight: bold;
	line-height: 1.5em;
	}

#modal fieldset {
	margin: 10px auto;	
	}

#modal table {
	border: none;
	margin: 0;
}
	
#purchaseOptions input[type=text] {
	width: 5em;
}

#purchaseOptions input[type=text] {
	border-radius: 4px;
	line-height: 2em;
	margin-left: 0;
	padding: 0 8px;
	}

p#calculatedPrice {
	display: hidden;
	font-size: 12px;
	font-weight: bold;
	line-height: 21px;
	margin-top: 1.5em;
	text-align: left;
	}	

p#calculatedPrice span.unit_price {
	font-size: 14px;
	font-weight: normal;
	margin-left: 8px;
	}

#error_message #title {
	font-weight: bold;
	margin: 1.5em 0;
	}

#purchaseOptions fieldset {
	margin: 4px 0;
	}

	
fieldset#buttons {
	clear: both;
	margin: 1.5em 0 0;
	position: relative;
	width: 100%;
	}

fieldset#buttons button {
	display: block;
	line-height: 1.5em;
	margin: 0;
	}
	
fieldset#buttons button#purchase {
	float: left;
	width: 50%;
	}
	
fieldset#buttons button#cancelpurchase, fieldset#buttons button#closemodal {
	background-color: transparent;
	color: #2c2c2c;
	float: right;
	font-weight: normal;
	line-height: 1em;
	padding: 0;
	position: absolute; bottom: 0; right: 0;
	}
fieldset#buttons button#cancelpurchase:hover, fieldset#buttons button#closemodal:hover {
	text-decoration: underline;
	}

/*
================================================== */

@media (max-width: 992px) {
	
	#modal, #error_message {
		border-radius: 0;
		margin: 0 auto;
		max-width: none;
		padding-top: 16px;
		position: fixed; top: 0; left: 0;
		overflow-y: scroll;
		-webkit-overflow-scrolling: touch;
		}

	#modal, 
	.white-popup {
		margin: 0 auto;
		}
	
	#modal .instructions {
		}

	#modal button.mfp-close {
		top: 16px;
		}

	#modal .details {
		float: none;
		max-width: none;
		padding-left: 0;
		width: auto;
		}
  
	#modal-thumbnail {
		display: block;
		float: none;
		margin: 1.5em 0;
		min-height: 25px;
		text-align: left;
		width: 150px;
		}
	#modal-thumbnail img {
		height: auto;
		max-height: 100px;
		}
  
	#modal fieldset {
		display: block;
		float: none;
		}
  
	#modal fieldset#buttons {
		border: 0 solid #ccc;
		border-width: 1px 0 0;
		display: block;
		float: none;
		}
  
	fieldset#buttons button {
		margin: 1.5em auto;
		}
	
	fieldset#buttons button#purchase {
		float: none;
		width: 50%;
		}
		
	fieldset#buttons button#cancelpurchase {
		float: none;
		line-height: 1.5em;
		position: static;
		}

	#modal table {
		position: relative;
		}
  
	#cart-status small {
		display: none;
		}

	}
