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

.dialog__content {
	overflow: hidden;
}

.dialog.dialog--open .dialog__content,
.dialog.dialog--close .dialog__content {
	-webkit-animation-duration: 0.4s;
	animation-duration: 0.4s;
	-webkit-animation-timing-function: cubic-bezier(0.7,0,0.3,1);
	animation-timing-function: cubic-bezier(0.7,0,0.3,1);
	-webkit-animation-fill-mode: forwards;
	animation-fill-mode: forwards;
	-webkit-transform-origin: -150% 50%;
	transform-origin: -150% 50%;
}

.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.4s both;
	animation: anim-elem 0.4s both;
	-webkit-transform-origin: -50% 50%;
	transform-origin: -50% 50%;
	-webkit-animation-timing-function: cubic-bezier(0.7,0,0.3,1);
	animation-timing-function: cubic-bezier(0.7,0,0.3,1);
}

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

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

@-webkit-keyframes anim-open {
	0% { opacity: 0; -webkit-transform: rotate3d(0, 0, 1, -45deg); }
	100% { opacity: 1; -webkit-transform: rotate3d(0, 0, 1, 0deg); }
}

@keyframes anim-open {
	0% { opacity: 0; -webkit-transform: rotate3d(0, 0, 1, -45deg); transform: rotate3d(0, 0, 1, -45deg); }
	100% { opacity: 1; -webkit-transform: rotate3d(0, 0, 1, 0deg); transform: rotate3d(0, 0, 1, 0deg); }
}

@-webkit-keyframes anim-close {
	0% { opacity: 1; }
	100% { opacity: 0; -webkit-transform: rotate3d(0, 0, 1, 45deg); }
}

@keyframes anim-close {
	0% { opacity: 1; }
	100% { opacity: 0; -webkit-transform: rotate3d(0, 0, 1, 45deg); transform: rotate3d(0, 0, 1, 45deg); }
}

/* Inner elements animations */

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

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