.bpe-popup-widget {
	text-align: left;
}

.bpe-button-align-left {
	text-align: left;
}

.bpe-button-align-center {
	text-align: center;
}

.bpe-button-align-right {
	text-align: right;
}

.bpe-popup-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	cursor: pointer;
	line-height: 1.2;
	text-decoration: none;
	transition: filter 0.2s ease, transform 0.2s ease;
}

.bpe-popup-button:hover,
.bpe-popup-button:focus {
	filter: brightness(0.95);
}

.bpe-popup-button:active {
	transform: translateY(1px);
}

.bpe-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.bpe-popup-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.bpe-popup-dialog {
	position: relative;
	max-width: min(100%, 920px);
	max-height: calc(100vh - 48px);
	overflow: auto;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
	transform: translateY(12px);
	transition: transform 0.2s ease;
}

.bpe-popup-overlay.is-open .bpe-popup-dialog {
	transform: translateY(0);
}

.bpe-popup-close {
	position: absolute;
	top: 10px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: currentColor;
	cursor: pointer;
	font-size: 30px;
	line-height: 1;
}

.bpe-popup-title {
	margin: 0 42px 16px 0;
}

.bpe-popup-text > :first-child {
	margin-top: 0;
}

.bpe-popup-text > :last-child {
	margin-bottom: 0;
}

body.bpe-popup-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.bpe-popup-overlay {
		padding: 16px;
	}

	.bpe-popup-dialog {
		max-height: calc(100vh - 32px);
	}
}
