.dialog,
.dialog__overlay {
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
}

.dialog {
	position: fixed;
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: center;
	justify-content: center;
	pointer-events: none;
	z-index: 999!important;
}

.dialog__overlay {
	position: absolute;
	z-index: 1;
	background: rgba(55, 58, 71, 0.9);
	opacity: 0;
	-webkit-transition: opacity 0.3s;
	transition: opacity 0.3s;
	-webkit-backface-visibility: hidden;
}

.dialog--open .dialog__overlay {
	opacity: 1;
	pointer-events: auto;
}

.dialog__content {
	width: 90%;
	max-width: 600px;
	min-width: 290px;
	max-height: 80vh;
	background: #fff;
	padding: 1em;
	text-align: center;
	position: relative;
	z-index: 5;
	opacity: 0;
	overflow: auto;
}

.dialog--open .dialog__content {
	pointer-events: auto;
}

/* Content */
.dialog h2 {
	margin: 0;
	font-weight: 400;
	font-size: 1.3em;
	padding: 0 0 0.5em;
}
.dialog__content h2 {}
.dialog__content p, .dialog__content ol, .dialog__content ul { line-height: 1.1; font-size: 0.8em; margin-bottom:0.8em; }

@media screen and (min-width: 768px) {
	.dialog__content { width: 50%; padding: 4em; }
	.dialog h2, .dialog__content h2 { font-size: 2em; }
}

.dialog__overlay {
	-webkit-transition-duration: 0.3s;
	transition-duration: 0.3s;
}

.dialog.dialog--open .dialog__content,
.dialog.dialog--close .dialog__content {
	-webkit-animation-duration: 0.3s;
	animation-duration: 0.3s;
	-webkit-animation-fill-mode: forwards;
	animation-fill-mode: forwards;
}

.dialog.dialog--open .dialog__content {
	-webkit-animation-name: anim-open;
	animation-name: anim-open;
}

.dialog.dialog--close .dialog__content {
	-webkit-animation-name: anim-close;
	animation-name: anim-close;
}

.dialog.dialog--open h2,
.dialog.dialog--open button {
	-webkit-animation: anim-elem 0.3s both;
	animation: anim-elem 0.3s both;
}

.dialog.dialog--open h2 {
	-webkit-animation-delay: 0.05s;
	animation-delay: 0.05s;
}

.dialog.dialog--open button {
	-webkit-animation-delay: 0.1s;
	animation-delay: 0.1s;
}

@-webkit-keyframes anim-open {
	0% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); }
	100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); }
}

@keyframes anim-open {
	0% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); transform: translate3d(0, 50px, 0); }
	100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
}

@-webkit-keyframes anim-close {
	0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); }
	100% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); }
}

@keyframes anim-close {
	0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
	100% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); transform: translate3d(0, 50px, 0); }
}

/* Inner elements animations */

@-webkit-keyframes anim-elem {
	0% { opacity: 0; -webkit-transform: translate3d(0, 25px, 0); }
	100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); }
}

@keyframes anim-elem {
	0% { opacity: 0; -webkit-transform: translate3d(0, 25px, 0); transform: translate3d(0, 25px, 0); }
	100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
}

