html {
	scrollbar-gutter: stable;
}

body {
	overflow: auto;
}

body.has-ft-popup {
	overflow: hidden;
	overscroll-behavior: none;
}

.ft-popup {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: -1;
	opacity: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.has-ft-popup .ft-popup {
	opacity: 1;
	z-index: 360;
	transition: opacity .25s ease-in-out;
}

.ft-popup-overlay {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 0;
	background-color: var(--color-black);
	opacity: 0.85;
}

.has-ft-popup .ft-popup-content {
	display: block;
	width: 90%;
	max-height: 90%;
	max-width: 760px; /* TODO: This doesn't make sense here */
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	position: relative;
	z-index: 1;
	background-color: var(--color-surface-overlay);
	background-color: var(--color-surface);
}

.ft-popup-html {
	padding: var(--space-xlarge) var(--space-large);
}

.close-ft-popup {
	float: right;
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	line-height: 36px;
	width: 36px;
	height: 36px;
	text-align: center;
	z-index: 10;
}

.close-ft-popup-text {
	font-size: 2em;
}
