/* Контейнер */
.modal {
	/* Слой перекрытия */
	/* Позиционирум по центру */
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	margin: auto;
	
	background: rgba(0,0,0,0.5);
	z-index: 10000;
	
	/* Трансформации прозрачности при открытии  */
	-webkit-transition: opacity 500ms ease-in;
	-moz-transition: opacity 500ms ease-in;
	transition: opacity 500ms ease-in;
	
	/* Скрываем изначально */
	opacity: 0;
	pointer-events: none;
	
	line-height: 2em;
}

/* Показываем модальное окно (аналог onclick) */
.modal:target {
	opacity: 1;
	pointer-events: auto;
}

.modal .title {
	font-weight: bold;
	font-size: 18px;
	margin-bottom: 15px;
}
.modal .text {
	font-size: 14px;
}

/* Содержание */
.modal > div {
	max-width: 620px;
	background: #ffffff;
	position: relative;
	margin: 20% auto;
	
	/* По умолчанию минимизируем анимацию */
	-webkit-animation: minimise 500ms linear;
	
	/* Придаем хороший вид */
	padding: 40px 80px;
	box-shadow: 0 3px 20px rgba(0,0,0,0.9);
	text-shadow: 0 1px 0 #fff;
	text-align: left;
	    border: 4px solid #bcda61;
}

/* Изменяем анимацию при открытии модального окна*/
.modal:target > div {
	-webkit-animation-name: bounce;
}

.modal h2 {
	font-size: 36px;
	padding: 0 0 20px;
}

/* Ссылка на кнопку Закрыть */
.modal a[href="#close"] {
	color: white;
	content: '\2716';
	display: block;
	
	/* Позиционируем */
	position: absolute;
	right: -24px;
	top: 0px;
	width: 24px;
	height: 24px;
	line-height: 24px;
	
	/* Стили */
	text-decoration: none;
	text-shadow: none;
	text-align: center;
	font-weight: bold;
	background: #000;
}

/* Сбрасываем изменения */
.modal a[href="#close"]:focus {
	outline: none;
}

.modal a[href="#close"]:focus:after,
.modal a[href="#close"]:hover:after {
	background-color: #a8be48;
}

.modal a[href="#close"]:focus:after {
	outline: 0px solid #000;
}

/* Открываем модальное окно */
a.openModal {
	margin-left: 2.5em;
}

.modal .modal_title {
	display: block;
	text-align: center;
	font-size: 22pt;
}

.modal input,
.modal textarea {
	height: 2em;
	width: 280px;
	display: inline-block;
	margin-bottom: 1em;
	box-sizing: border-box;
	font: 13px Arial;
	border: 1px solid #aaa;
}
.modal textarea {
	height: 5em;
	resize: none;
}

.modal input[type="submit"] {
	height: 34px;
	width: 135px;
	display: inline-block;
	background: url('/templates/general/buttons/green-hover.png');
	border: none;
	font-weight: bold;
	color: white;
}
.modal input[type="submit"]:hover {
	background: url('/templates/general/buttons/green.png');
}
.modal input[type="submit"]:active {
	background: url('/templates/general/buttons/green-active.png');
}
.hidefilds {
	visibility: hidden;
	display: none;
}

/* АНИМИРОВАНИЕ */
@-webkit-keyframes bounce {
	0% {
		-webkit-transform: scale3d(0.1,0.1,1);
		-webkit-box-shadow: 0 3px 20px rgba(0,0,0,0.9);
	}
	55% {
		-webkit-transform: scale3d(1.08,1.08,1);
		-webkit-box-shadow: 0 10px 20px rgba(0,0,0,0);
	}
	75% {
		-webkit-transform: scale3d(0.95,0.95,1);
		-webkit-box-shadow: 0 0 20px rgba(0,0,0,0.9);
	}
	100% {
		-webkit-transform: scale3d(1,1,1);
		-webkit-box-shadow: 0 3px 20px rgba(0,0,0,0.9);
	}
}
@keyframes bounce {
	0% {
		transform: scale3d(0.1,0.1,1);
		box-shadow: 0 3px 20px rgba(0,0,0,0.9);
	}
	55% {
		transform: scale3d(1.08,1.08,1);
		box-shadow: 0 10px 20px rgba(0,0,0,0);
	}
	75% {
		transform: scale3d(0.95,0.95,1);
		box-shadow: 0 0 20px rgba(0,0,0,0.9);
	}
	100% {
		transform: scale3d(1,1,1);
		box-shadow: 0 3px 20px rgba(0,0,0,0.9);
	}
}

@-webkit-keyframes minimise {
	0% {
		-webkit-transform: scale3d(1,1,1);
	}
	100% {
		-webkit-transform: scale3d(0.1,0.1,1);
	}
}

@keyframes minimise {
	0% {
		transform: scale3d(1,1,1);
	}
	100% {
		transform: scale3d(0.1,0.1,1);
	}
}