.modal {
	position: fixed;
	z-index: -1;
	top: -1;
	left: 0;
	width: 1px;
	height: 1px;
	
	background-color: rgba(255, 255, 255, 0.75);
	
	overflow: hidden;
	opacity: 0.01;
	
	-webkit-transition: opacity 300ms ease-in-out;
	-moz-transition: opacity 300ms ease-in-out;
	-ms-transition: opacity 300ms ease-in-out;
	-o-transition: opacity 300ms ease-in-out;
	transition: opacity 300ms ease-in-out;
}

.modal.open {
	z-index: 99999;
	top: 0;
	right: 0;
	bottom: 0;
	
	width: auto;
	height: auto;
}
.modal.visible { opacity: 1; }

.modal .body {
	position: absolute;
	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%);
	
	background-color: #fff;
	
	-webkit-box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
	-moz-box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
	box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
	
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
}

.modal header:not(:empty) {
	height: 40px;
	line-height: 40px;
	
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	
	padding: 0 30px 0 15px;
	
	border-bottom: 1px solid #ccc;
	background-color: #eee;
}

.modal .content {
	padding: 20px;
	
	overflow: auto;
	-ms-overflow-x: hidden;
	-ms-overflow-y: auto;
	overflow-x: hidden;
	overflow-y: auto;
}

.modal header:not(:empty) ~ .content { top: 40px; }

.modal footer:not(:empty) {
	text-align: right;
	padding: 15px;
	border-top: 1px solid #ccc;
	
	white-space: nowrap;
}

.modal footer input ~ input { margin-left: 10px; }

.modal footer input {
	display: inline-block;
	height: 30px;
	padding: 0 20px;
	min-width: 70px;
}

.modal .close {
	position: absolute;
	top: 0;
	right: 0;
	
	display: inline-block;
	width: 40px;
	height: 40px;
	line-height: 40px;
	text-align: center;
	
	font-size: 25px;
	color: #000;
    opacity: 0.5;
	
	-webkit-transition: opacity 150ms ease-in-out;
	-moz-transition: opacity 150ms ease-in-out;
	-ms-transition: opacity 150ms ease-in-out;
	-o-transition: opacity 150ms ease-in-out;
	transition: opacity 150ms ease-in-out;
}

.modal .close:hover { opacity: 1; }
.modal .close:active { line-height: 42px; }
.modal .close::before { content: '\00D7'; }

@media only screen and (max-width: 768px) {
	.modal .body {
		width: 100% !important;
		height: 100% !important;
		padding: 40px 20px;
	}
	
	.modal .close {
		width: 80px;
		height: 80px;
		line-height: 80px;
		font-size: 50px;
	}
	
	.modal .close:active { line-height: 82px; }
}