#modal_overlay {
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 9998;
	background: rgba(0, 0, 0, .35);
}

#modal {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 9999;
	display: flex;
	flex-direction: column;

	width: var(--modal-w, auto);
	max-width: 80vw;
	max-height: 80vh;

	overflow: hidden;

	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

#modal .modal__inner {
	position: relative;
	overflow: auto;
	flex: 1 1 auto;
	min-height: 0;
}

#modal.modal-loading .modal__inner {
	padding: 24px;
}

#modal .modal__loading {
	padding: 24px;
}

#modal .modal__close {
	display: none;
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;

	width: 40px;
	height: 40px;
	border-radius: 10px;
	border: 0;
	cursor: pointer;
	background: rgba(0,0,0,.06);
}

#modal.modal-fullscreen {
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	transform: none;

	width: 100vw;
	height: 100vh;
	max-width: 100vw;
	max-height: 100vh;

	border-radius: 0;
	overflow: hidden;
}

#modal.modal-fullscreen .modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

#modal.modal-fullscreen .modal__inner {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	overflow: auto;
	flex: 1 1 auto;
	min-height: 0;
}

#modal.modal-fullscreen.modal-fullscreen-centered .modal__inner {
	justify-content: center;
}

#modal .modal__video {
	padding: 16px;
}

#modal .modal__ratio {
	position: relative;
	width: 100%;
	height: 0;
	padding-top: 56.25%;
}

#modal .modal__ratio iframe {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

body.modal-open {
	overflow: hidden;
}

/** CSS For page_content container in modals **/

#modal .page_content {
	padding: 40px;

	font: var(--font-body-reg-sm);

	p {
		padding: 8px 0;
	}

	ul {
		padding-left: 40px;
	}
}