/* General styles for the modal */

/* 
Styles for the html/body for special modal where we want 3d effects
Note that we need a container wrapping all content on the page for the 
perspective effects (not including the modals and the overlay).
*/
.md-perspective,
.md-perspective body {
	height: 100%;
	overflow: hidden;
}

.md-perspective body  {
	background: #d4c6a1;
	-webkit-perspective: 600px;
	-moz-perspective: 600px;
	perspective: 600px;
}

.container {
	min-height: 100%;
}

.md-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	width: min(92vw, 1100px);
	max-width: calc(100vw - 32px);
	min-width: 320px;
	max-height: calc(100vh - 32px);
	height: auto;
	overflow-y: auto;
	z-index: 2000;
	visibility: hidden;
	-webkit-backface-visibility: hidden;
	-moz-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-transform: translateX(-50%) translateY(-50%);
	-moz-transform: translateX(-50%) translateY(-50%);
	-ms-transform: translateX(-50%) translateY(-50%);
	transform: translateX(-50%) translateY(-50%);
}

.md-show {
	visibility: visible;
}

.md-overlay {
	position: fixed;
	width: 100%;
	height: 100%;
	visibility: hidden;
	top: 0;
	left: 0;
	z-index: 1000;
	opacity: 0;
	background: rgba(145,120,30,0.8);
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
}

.md-show ~ .md-overlay {
	opacity: 1;
	visibility: visible;
}

/* Content styles */
.md-content {
	color: #fff;
	background: #544c37;
	position: relative;
	border-radius: 3px;
	margin: 0 auto;
	max-width: 100%;
	overflow: hidden;
}

.md-content img {
	max-width: 100%;
	height: auto;
}

.md-content h3 {
	margin: 0;
	padding: 0.4em;
	text-align: center;
	font-size: 2.4em;
	font-weight: 300;
	opacity: 0.8;
	background: rgba(0,0,0,0.1);
	border-radius: 3px 3px 0 0;
}

.md-content > div {
	padding: 15px 40px 30px;
	margin: 0;
	font-weight: 300;
	font-size: 1.15em;
}

.md-content > div p {
	margin: 0;
	padding: 10px 0;
	text-align: justify;
}

.md-content > div ul {
	margin: 0;
	padding: 0 0 30px 20px;
}

.md-content > div ul li {
	padding: 5px 0;
}

.md-content button {
	display: block;
	margin: 0 auto;
	font-size: 0.8em;
}

/* Individual modal styles with animations/transitions */

/* Effect 1: Fade in and scale up */
.md-effect-1 .md-content {
	-webkit-transform: scale(0.7);
	-moz-transform: scale(0.7);
	-ms-transform: scale(0.7);
	transform: scale(0.7);
	opacity: 0;
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
}

.md-show.md-effect-1 .md-content {
	-webkit-transform: scale(1);
	-moz-transform: scale(1);
	-ms-transform: scale(1);
	transform: scale(1);
	opacity: 1;
}

@-webkit-keyframes slit {
	50% { -webkit-transform: translateZ(-250px) rotateY(89deg); opacity: .5; -webkit-animation-timing-function: ease-out;}
	100% { -webkit-transform: translateZ(0) rotateY(0deg); opacity: 1; }
}

@-moz-keyframes slit {
	50% { -moz-transform: translateZ(-250px) rotateY(89deg); opacity: .5; -moz-animation-timing-function: ease-out;}
	100% { -moz-transform: translateZ(0) rotateY(0deg); opacity: 1; }
}

@keyframes slit {
	50% { transform: translateZ(-250px) rotateY(89deg); opacity: 1; animation-timing-function: ease-in;}
	100% { transform: translateZ(0) rotateY(0deg); opacity: 1; }
}

@media (max-width: 1280px) {
	.md-modal {
		width: min(94vw, 960px);
		min-width: 0;
	}
}

@media (max-width: 900px) {
	.md-content > div img.float-left,
	.md-content > div img.float-right {
		float: none;
		display: block;
		margin: 0 auto 16px;
		max-width: min(100%, 260px);
	}
}

@media (max-width: 768px) {
	.md-modal {
		width: calc(100vw - 24px);
		max-width: calc(100vw - 24px);
		max-height: calc(100vh - 24px);
	}

	.md-content h3 {
		position: relative;
		padding: 0.65em 3.4rem;
		font-size: 1.5em;
		line-height: 1.3;
	}

	.md-content > div {
		padding: 16px 18px 20px;
		font-size: 1em;
	}

	.md-content h3 img.float-left {
		position: absolute;
		left: 12px;
		top: 50%;
		transform: translateY(-50%);
		float: none;
	}

	.md-content h3 .frame-icon-close.float-right {
		position: absolute;
		right: 12px;
		top: 50%;
		transform: translateY(-50%);
		float: none;
	}
}

@media (max-width: 480px) {
	.md-modal {
		width: calc(100vw - 16px);
		max-width: calc(100vw - 16px);
		min-width: 0;
		max-height: calc(100vh - 16px);
	}

	.md-content h3 {
		padding: 0.85em 2.8rem;
		font-size: 1.15em;
	}

	.md-content > div {
		padding: 14px 12px 18px;
		font-size: 0.95em;
	}

	.md-content > div p {
		text-align: left;
	}
}
