.vred-popup[hidden] {
	display: none;
}

.vred-popup {
	align-items: center;
	box-sizing: border-box;
	display: flex;
	inset: 0;
	justify-content: center;
	opacity: 0;
	overflow: hidden;
	padding: 16px;
	position: fixed;
	transition: opacity var(--vred-popup-duration, 300ms) ease;
	z-index: 9999;
}

.vred-popup.is-open {
	opacity: 1;
}

.vred-popup--position-top {
	align-items: flex-start;
}

.vred-popup--position-bottom {
	align-items: flex-end;
}

.vred-popup__overlay {
	-webkit-backdrop-filter: blur(0px);
	backdrop-filter: blur(0px);
	inset: 0;
	position: absolute;
	transition:
		-webkit-backdrop-filter var(--vred-popup-duration, 300ms) ease,
		backdrop-filter var(--vred-popup-duration, 300ms) ease;
}

.vred-popup__overlay::before {
	background-color: var(--vred-popup-overlay-background, #000000);
	content: '';
	inset: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	transition: opacity var(--vred-popup-duration, 300ms) ease;
}

.vred-popup.is-open .vred-popup__overlay {
	-webkit-backdrop-filter: blur(var(--vred-popup-overlay-blur, 0px));
	backdrop-filter: blur(var(--vred-popup-overlay-blur, 0px));
}

.vred-popup.is-open .vred-popup__overlay::before {
	opacity: var(--vred-popup-overlay-opacity, 0.45);
}

.vred-popup__dialog {
	min-height: 0;
	background: var(--vred-popup-background, #ffffff);
	border-radius: var(--vred-popup-border-radius, 12px);
	box-shadow: var(--vred-popup-box-shadow, none);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	margin: var(--vred-popup-margin-top, 0px) var(--vred-popup-margin-right, 0px) var(--vred-popup-margin-bottom, 0px) var(--vred-popup-margin-left, 0px);
	max-height: min(var(--vred-popup-max-height, 90vh), calc(100vh - 32px - var(--vred-popup-margin-top, 0px) - var(--vred-popup-margin-bottom, 0px)));
	max-width: min(var(--vred-popup-max-width, 90vw), calc(100vw - 32px - var(--vred-popup-margin-left, 0px) - var(--vred-popup-margin-right, 0px)));
	opacity: 1;
	overflow: hidden;
	padding: var(--vred-popup-padding, 32px);
	position: relative;
	transform: translate3d(0, 0, 0);
	transition:
		opacity var(--vred-popup-duration, 300ms) ease,
		transform var(--vred-popup-duration, 300ms) ease;
	width: min(var(--vred-popup-width, 640px), var(--vred-popup-max-width, 90vw), calc(100vw - 32px - var(--vred-popup-margin-left, 0px) - var(--vred-popup-margin-right, 0px)));
	z-index: 1;
}

@supports (height: 100dvh) {
	.vred-popup__dialog {
		max-height: min(var(--vred-popup-max-height, 90vh), calc(100dvh - 32px - var(--vred-popup-margin-top, 0px) - var(--vred-popup-margin-bottom, 0px)));
	}
}

.vred-popup .vred-popup__close {
	align-items: center;
	-webkit-appearance: none;
	appearance: none;
	background-color: var(--vred-popup-close-background, transparent);
	border-color: var(--vred-popup-close-border-color, transparent);
	border-radius: var(--vred-popup-close-border-radius, 0);
	border-style: var(--vred-popup-close-border-style, none);
	border-width: var(--vred-popup-close-border-width, 0);
	box-shadow: var(--vred-popup-close-box-shadow, none);
	box-sizing: border-box;
	color: var(--vred-popup-close-color, #111111);
	cursor: pointer;
	display: inline-flex;
	font-family: Arial, sans-serif;
	font-size: var(--vred-popup-close-icon-size, 28px);
	font-style: normal;
	font-weight: 400;
	justify-content: center;
	line-height: 1;
	margin: 0;
	min-height: 36px;
	min-width: 36px;
	overflow: visible;
	padding: var(--vred-popup-close-padding, 0);
	position: absolute;
	right: var(--vred-popup-close-offset-x, 12px);
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
	top: var(--vred-popup-close-offset-y, 12px);
	transition:
		background-color var(--vred-popup-duration, 300ms) ease,
		border-color var(--vred-popup-duration, 300ms) ease,
		box-shadow var(--vred-popup-duration, 300ms) ease,
		color var(--vred-popup-duration, 300ms) ease;
	z-index: 2;
}
.vred-popup .vred-popup__close:hover,
.vred-popup .vred-popup__close:focus-visible {
	background-color: var(--vred-popup-close-background-hover, var(--vred-popup-close-background, transparent));
	border-color: var(--vred-popup-close-border-color-hover, var(--vred-popup-close-border-color, transparent));
	box-shadow: var(--vred-popup-close-box-shadow, none);
	color: var(--vred-popup-close-color-hover, var(--vred-popup-close-color, #111111));
	text-decoration: none
}

.vred-popup .vred-popup__close i,
.vred-popup .vred-popup__close span,
.vred-popup .vred-popup__close svg {
	color: inherit;
	display: block;
	height: 1em;
	line-height: 1;
	pointer-events: none;
	width: 1em
}

.vred-popup .vred-popup__close svg {
	fill: currentColor;
	stroke: currentColor
}

.vred-popup .vred-popup__close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px
}

.vred-popup__content {
	flex: 1 1 auto;
	min-height: 0;
	max-height: 100%;
	overflow: auto
}

.vred-popup__content > :first-child {
	margin-top: 0;
}

.vred-popup__content > :last-child {
	margin-bottom: 0;
}

.vred-popup--animation-none,
.vred-popup--animation-none .vred-popup__dialog {
	transition: none;
}

.vred-popup--animation-fade .vred-popup__dialog,
.vred-popup--animation-fade_slide .vred-popup__dialog {
	opacity: 0;
}

.vred-popup--animation-slide.vred-popup--direction-top .vred-popup__dialog,
.vred-popup--animation-fade_slide.vred-popup--direction-top .vred-popup__dialog {
	transform: translate3d(0, -32px, 0);
}

.vred-popup--animation-slide.vred-popup--direction-bottom .vred-popup__dialog,
.vred-popup--animation-fade_slide.vred-popup--direction-bottom .vred-popup__dialog {
	transform: translate3d(0, 32px, 0);
}

.vred-popup--animation-slide.vred-popup--direction-left .vred-popup__dialog,
.vred-popup--animation-fade_slide.vred-popup--direction-left .vred-popup__dialog {
	transform: translate3d(-32px, 0, 0);
}

.vred-popup--animation-slide.vred-popup--direction-right .vred-popup__dialog,
.vred-popup--animation-fade_slide.vred-popup--direction-right .vred-popup__dialog {
	transform: translate3d(32px, 0, 0);
}

.vred-popup.is-open .vred-popup__dialog {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}
