.backdrop {
	background-color: rgba(0, 0, 0, 0.35);
	bottom: 0;
	left: 0;
	opacity: 0;
	overflow: auto;
	position: fixed;
	right: 0;
	top: 0;
	transition: opacity 0.25s;
	z-index: var(--z-index-modal-backdrop);

	&.isVisible {
		opacity: 1;
	}
}

.modal {
	--modal-padding: 15px;
	--bounce-easing-curve: cubic-bezier(0.75, 0.7, 0.3, 1.75);

	background-color: #fff;
	border-radius: 3px;
	box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
	left: 50%;
	max-width: 600px;
	padding: 10px;
	position: relative;
	top: 10vh;
	transform: translateX(-50%);
	z-index: var(--z-index-modal);

	.backdrop > & {
		transform: translateX(-50%) scale(0.9);
		transition: transform 0.25s var(--bounce-easing-curve);
	}

	/* Not sure why, but we need the translate in all three selectors here in order to have a smooth transition. */
	.backdrop.isVisible > & {
		transform: translateX(-50%) scale(1);
	}

	&.isLarge {
		max-width: 900px;
	}

	&.isFull {
		border-radius: 0;
		box-shadow: none;
		height: 100%;
		left: 0;
		max-width: none;
		overflow-y: auto;
		padding-top: 30px;
		top: 0;
		transform: none;
		width: 100%;
	}
}

.backdrop > .modal.isFull {
	transform: none;
	transition: none;
}

.header {
	font-size: 24px;
	font-weight: var(--font-weight-bold);
	padding: var(--modal-padding);

	.isFull & {
		border-bottom: none;
	}
}

.body {
	padding: 0 15px;
}

.footer {
	padding: var(--modal-padding);
	text-align: right;
}

.documentBodyNoScroll {
	overflow-y: scroll;
	position: fixed;
	width: 100%;
}

.close {
	background-color: #fff;
	border: none;
	border-radius: 25px;
	cursor: pointer;
	height: 50px;
	padding-top: 9px;
	position: absolute;
	right: 20px;
	top: 20px;
	width: 50px;

	&:hover {
		background-color: var(--color-gray-xx-light);
	}
}

.closeX::before,
.closeX::after {
	background-color: #333;
	border: none;
	content: '';
	height: 33px;
	left: 24px;
	position: absolute;
	top: 9px;
	width: 2px;
}

.closeX::before {
	transform: rotate(45deg);
}

.closeX::after {
	transform: rotate(-45deg);
}
