.modal {
	position: absolute;
	left: 0px;
	top: 0px;
	right: 0px;
	bottom: 0px;
	display: flex;
	align-content: center;
	justify-content: center;
	align-items: center;
}

.modal-ending {
	pointer-events: none !important;
	animation-duration: 0.3s;
	animation-name: modalEnding;
	animation-timing-function: ease-in-out;
	animation-fill-mode: forwards;
	opacity: 1;
}

@keyframes modalEnding {
	0% {
		opacity: 1;
	}

	100% {
		opacity: 0;
	}
}

.modal-background {
	position: absolute;
	left: 0px;
	top: 0px;
	right: 0px;
	bottom: 0px;
	background-color: rgba(0, 0, 0, 0.5);
	pointer-events: initial !important;
	animation-duration: 0.3s;
	animation-name: modalBackground;
	animation-timing-function: ease-in-out;
	animation-fill-mode: forwards;
	opacity: 0;
}

@keyframes modalBackground {
	0% {
		opacity: 0;
	}

	100% {
		opacity: 1;
	}
}

.modal-stage {
	display: table;
	margin: auto;
	/*margin-top: 30px;*/
	/* width: 100%;
	max-width: 50vw;
	max-height: 100vh; */
	/* width: auto; */
	position: relative;
	pointer-events: initial !important;
	animation-duration: 0.5s;
	animation-name: modalInit;
	animation-timing-function: ease-in-out;
	animation-fill-mode: forwards;
	/* transform: translatey(50px); */
	opacity: 0;
}

@keyframes modalInit {
	0% {
		transform: translatey(50px);
		opacity: 0;
	}

	100% {
		transform: translatey(0px);
		opacity: 1;
	}
}

.modal-move {
	position: absolute;
	width: 32px;
	height: 32px;
	top: -15px;
	left: -10px;
	padding: 3px;
	background-color: #FFF;
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	-moz-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
	-webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
	box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
	cursor: pointer;
	display: flex;
	align-content: center;
	justify-content: center;
	align-items: center;
	cursor: move;
	pointer-events: initial !important;
}

.modal[data-draggable='0'] .modal-move {
	display: none;
}

.modal-move:hover {
	background-color: #F6F6F6;
}

.modal-move>img {
	width: 16px;
	height: 16px;
}

.modal-close {
	position: absolute;
	width: 32px;
	height: 32px;
	top: -16px;
	right: -16px;
	padding: 4px;
	background-color: #FFF;
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
	cursor: pointer;
	display: flex;
	align-content: center;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	pointer-events: initial !important;
}

.modal-close>i {
	margin: 0;
	padding: 0;
	line-height: 100%;
}

.modal-close:hover {
	background-color: #CCC;
}

.modal-content {
	overflow: auto;
	/* max-height: 88vh;
	padding: 24px; */
	background-color: #FFF;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
	-webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
	box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
	pointer-events: initial !important;
}

.modal-content * {
	pointer-events: initial !important;
}

.modal-header {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
}

.modal-header>div>img {
	width: 32px;
	height: 32px;
	float: left;
}

.modal-header>div>h1 {
	font-family: var(--font-default);
	font-size: 1.2rem;
	line-height: 120%;
}

.modal-header>div>p {
	font-family: var(--font-default);
	font-size: 0.875rem;
	line-height: 120%;
}

.modal-stage-content {
	font-family: var(--font-default);
}

.modal-buttons {
	display: flex;
	gap: 5px;
	margin-top: 15px;
	border-top: var(--ui-border-thin);
	padding-top: 15px;
	flex-direction: row-reverse;
}

.modal-buttons>div {
	flex-grow: 1;
	display: flex;
	align-content: center;
	align-items: center;
}

.modal-buttons>div:nth-child(1) {
	justify-content: flex-end;
}

.modal-buttons>div:nth-child(2) {
	justify-content: flex-start;
}

.modal[data-size='default'] .modal-stage {
	width: auto;
	max-width: 60vw !important;
}

.modal[data-size='default'] .modal-content {
	padding: 24px;
	max-height: 94vh;
	overflow: auto;
}

/* Modal em tela cheia */
.modal[data-size='full'] .modal-stage {
	position: fixed !important;
	display: block !important;
	max-width: none !important;
	top: 0px !important;
	right: 0px !important;
	bottom: 0px !important;
	left: 0px !important;
}

.modal[data-size='full'] .modal-content {
	position: absolute;
	top: 16px;
	right: 16px;
	bottom: 16px;
	left: 16px;
	overflow: hidden;
	border-radius: 0px;
}

.modal[data-size='full'] .modal-content>iframe {
	width: 100% !important;
	height: 100% !important;
}

.modal[data-size='full'] .modal-close {
	position: absolute;
	width: 32px;
	height: 32px;
	top: 4px;
	right: 4px;
	padding: 4px;
}

.modal[data-size='full'] .modal-move {
	display: none !important;
}