@keyframes fadeIn {
	from { opacity:0}
	to { opacity: 1 }
}
@-webkit-keyframes fadeIn {
	from { opacity:0 }
	to { opacity: 1 }
}
@keyframes fadeOut {
	from { opacity:1 }
	to { opacity: 0 }
}
@-webkit-keyframes fadeOut {
	from { opacity:1 }
	to { opacity: 0 }
}
@keyframes fadeInModal {
	0% {
		opacity: 0;
		transform: translateY(-20%)
	}
	100% {
		opacity: 1;
		transform: translateY(0%)
	}
}
@-webkit-keyframes fadeInModal {
	0% {
		opacity: 0;
		-webkit-transform: translateY(-20%)
	}
	100% {
		opacity: 1;
		-webkit-transform: translateY(0%)
	}
}
@keyframes fadeOutModal {
	0% {
		opacity: 1;
		transform: translateY(0%)
	}

	100% {
		opacity: 0;
		transform: translateY(-20%)
	}
}
@-webkit-keyframes fadeOutModal {
	0% {
		opacity: 1;
		-webkit-transform: translateY(0%)
	}
	100% {
		opacity: 0;
		-webkit-transform: translateY(-20%)
	}
}
modal-backdrop {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	animation: fadeIn 0.4s;
	-webkit-animation: fadeIn 0.4s;
	background: rgba(0, 0, 0, 0.4);
	z-index: 99999999999;
	text-align: center;
	vertical-align: middle;
}

modal-backdrop padding {
	display: block
}

modal-dialog {
	font: inherit;
	background: #fff;
	border-radius: 2px;
	box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.4);
	animation: fadeInModal 0.4s;
	-webkit-animation: fadeInModal 0.4s;
	margin: 0 auto;
	text-align: left;
	min-width: 650px;
	max-width: 850px;
	/*max-width: 1000px;*/
	display: inline-grid;
	grid-template-rows: auto 1fr auto;
}

modal-dialog.fullscreen {
	position: fixed;
	top: 50px;
	bottom: 50px;
	left: 80px;
	right: 80px;
	max-width: 100%;
}

modal-header h2 {
	margin: 0;
	font-size: 22px;
	font-weight: normal;
}

modal-header {
	display: block;
	padding: 15px 25px 20px 25px;
	border-bottom: 1px solid #eee;
	height: auto;
}

modal-header button {
	margin-top: 7px;
	float: right;
	padding: 0;
	border: 0;
	width: 16px;
	height: 16px;
	background: transparent;
	background-repeat: no-repeat;
	cursor: pointer;
	background-position: center top;
	background-size: 100%;
	background-image: url(../img/modal/close.png);
}

modal-header button:hover {
	background-position: center bottom;
}

modal-content {
	display: block;
	padding: 12px 25px 30px 25px;
	overflow-y: auto;
	position: relative;
	font-size: 16px;
}

modal-footer {
	display: block;
	padding: 15px 25px 20px 25px;
	border-top: 1px solid #eee;
}

modal-footer commands {
	display: block;
	text-align: right;
}

modal-footer button {
	margin-left: 12px;
}

modal-backdrop.removing {
	animation: fadeOut 0.4s;
	-webkit-animation: fadeOut 0.4s;
}

modal-backdrop.removing modal-dialog {
	animation: fadeOutModal 0.4s;
	-webkit-animation: fadeOutModal 0.4s;
}

modal-content>tab-panel {
	min-width: auto !important;
	position: absolute;
	padding: 12px 25px 30px 25px;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}

modal-content>tab-panel>tab-container {
	overflow-y: auto;
}

@media only screen and (max-width: 600px) {
	modal-dialog {
		min-width:auto;
		max-width:auto;
		width: clamp(300px, 650px, calc(100% - 20px));
	}
	modal-dialog.fullscreen {
		top: 10px;
		bottom: 10px;
		left: 10px;
		right: 10px;
	}
	modal-header {
		padding: 10px;
	}
	/*modal-content {
		padding: 15px;
	}*/
	modal-content>tab-panel {
		padding: 15px;
	}
	modal-footer {
		padding: 10px;
	}
}