#modalContainer {
	display: block;
	width: 0;
	height: 0;
	pointer-events: none;
	overflow: visible;
	transition: opacity 0.2s;
	opacity: 0;
}

#modalContainer.open {
	pointer-events: auto;
	opacity: 1;
}

#modalContainer.asleep {
	display: none;
}

#modalOverlay {
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #0003;
}

#modalPopup {
	min-width: 33%;
	max-width: 90%;
	min-height: 40%;
	max-height: min(90%, 900px);
	padding: 12px;
	border-radius: 4px;
	background: #f8f8f8;
	border: 2px solid #222;
	box-shadow: 0 0 5px 0 #0003;
	position: relative;
	
	display: flex;
	flex-direction: column;
	gap: 0.3em;
	overflow-y: auto;
}

#modalTopX {
	appearance: none;
	position: absolute;
	top: 12px;
	right: 12px;
	cursor: pointer;
	height: 1.5ch;
	width: 1.5ch;
/*	border-radius: 3px;	*/
	border-radius: 50%;
	font-size: 20pt;
	color: #555;
	background: transparent;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

#modalTopX:hover {
	background: #0003;
	color: #444;
}

#modalTopX:hover:active {
	background: #0004;
	color: #333;
}