#modalOverlay {
	left:0;
	top:0;
	position: fixed;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	background-color: rgba(204,204,204,0.8);
	z-index: 1000;
}

#modal {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	margin: auto auto;
	background-color: #fff;
	z-index: 1001;
	max-height: 96%;
	max-width: 90%;
	overflow: hidden;
	
	-webkit-box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
	-moz-box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
	-o-box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
	box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
	
	
	-webkit-transition: width 0.1s ease, height 0.1s ease;
	-moz-transition: width 0.1s ease, height 0.1s ease;
	-o-transition: width 0.1s ease, height 0.1s ease;
	transition: width 0.1s ease, height 0.1s ease;
}

#modal.loading {
	background-image:url(./images/loading.gif);
	background-position: 50% 50%;
	background-repeat:no-repeat;
}


#modal .content {
	
	width: 98%;	
	-webkit-width: calc(100% - 2rem);
	width: calc(100% - 2rem);
	
	height:98%;
	-webkit-height: calc(100% - 3rem);
	height: calc(100% - 3rem);
	
	margin-left: 1rem;
	margin-top: 2rem;
	overflow: auto;

	
	background: #FFF;
	opacity:1;
	
	-webkit-transition: opacity 0.5s ease-out 0s;
	-moz-transition: opacity 0.5s ease-out 0s;
	-o-transition: opacity 0.5s ease-out 0s;
	transition: opacity 0.5s ease-out 0s;
}

#modal.loading .content {
	opacity:0;
}

#modal .scroll {
   	overflow: auto;
	-webkit-overflow-scrolling: touch !important;
}

#modal .scroll > iframe {
	border: none;
	margin:0;
	padding:0;
	width: 100%;
	height: calc(100% - 6px);
}

#modal .title,
#modal .close {
	position: absolute;
	top: 0.5rem;
}

#modal .title {
	left:1rem;
	top:0.5rem;
	
	-webkit-width:calc(100% - 4rem);
	width:calc(100% - 4rem);
	
	color: #15428b;
	font-size:1rem;
	line-height:1.2rem;
	
	text-overflow:ellipsis;
	overflow:hidden;
	white-space:nowrap;
}

#modal .close {
	right: 1rem;
	width:15px;
	height:15px;
	background-image:url(./images/close.png);
	cursor:pointer;
}

@media screen and (max-width: 559px) {
	
	#modal {
		width: 96% !important;
		height: 96% !important;
		max-height:none;
		max-width:none;
	}
	
	#modal .content {
		
		width: 98%;		
		-webkit-width: calc(100% - 1rem);
		width: calc(100% - 1rem);	
		
		margin-left: 0.5rem; 
	}
	
	#modal .title {
		left: 0.5rem;
		width:80%;
		-webkit-width:calc(100% - 3rem);
		width:calc(100% - 3rem);
	}
	
	#modal .close {
		right: 0.5rem;
	}
}