/* Bright Addons Pro: Modal Popup (layer basics in shared/overlay.css) */

/* Elementor Container: fill the width the container gives widgets. */
/* Same fix Elementor uses for its own Video and Accordion widgets: without it the */
/* widget shrinks to its content in Row or centred containers and can collapse to 0px. */
.e-con > .elementor-widget-bapro-modal-popup,
.e-con-inner > .elementor-widget-bapro-modal-popup {
	width: var(--container-widget-width, 100%);
	--flex-grow: var(--container-widget-flex-grow);
}

.bapro-modal__layer {
	--bapro-modal-w: 560px;
	--bapro-modal-max-h: calc(100vh - 2 * var(--bapro-modal-gap));
	--bapro-modal-gap: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--bapro-modal-gap);
}

.bapro-modal--top {
	align-items: flex-start;
}

.bapro-modal--bottom {
	align-items: flex-end;
}

.bapro-modal--bottom-left {
	align-items: flex-end;
	justify-content: flex-start;
}

.bapro-modal--bottom-right {
	align-items: flex-end;
	justify-content: flex-end;
}

.bapro-modal--full {
	--bapro-modal-gap: 0px;
}

/* ---------- Box ---------- */
.bapro-modal__box {
	display: flex;
	flex-direction: column;
	width: var(--bapro-modal-w);
	max-width: 100%;
	max-height: min(var(--bapro-modal-max-h), calc(100vh - 2 * var(--bapro-modal-gap)));
	padding: 0;
	border-radius: 18px;
	background-color: #fff;
	box-shadow: 0 30px 80px rgba(14, 16, 32, 0.3);
	color: #3d4352;
	opacity: 0;
	transition: opacity var(--bapro-ov-duration) ease, transform var(--bapro-ov-duration) cubic-bezier(0.22, 1, 0.36, 1);
}

@supports (height: 100dvh) {
	.bapro-modal__box {
		max-height: min(var(--bapro-modal-max-h), calc(100dvh - 2 * var(--bapro-modal-gap)));
	}
}

.bapro-modal--full .bapro-modal__box {
	width: 100%;
	height: 100%;
	max-height: none;
	border-radius: 0;
}

.bapro-modal__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: inherit;
}

.bapro-modal__body {
	padding: 40px 36px 36px;
}

.bapro-modal .bapro-modal__title,
.bapro-modal__layer .bapro-modal__title {
	margin: 0 0 12px;
	padding-right: 30px;
	color: #1d2330;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
}

.bapro-modal__text {
	font-size: 16px;
	line-height: 1.65;
}

.bapro-modal__text > *:last-child {
	margin-bottom: 0;
}

.bapro-modal__layer .bapro-modal__body .bapro-modal__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 22px;
	padding: 13px 26px;
	border-radius: 40px;
	background: var(--bapro-ov-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: all 0.3s ease;
}

.bapro-modal__layer .bapro-modal__body .bapro-modal__cta:hover {
	color: #fff;
	filter: brightness(1.08);
}

.bapro-modal__cta svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.bapro-modal__layer .bapro-btn__icon {
	display: inline-flex;
}

/* Image and video fill the box. */
.bapro-modal__body:has(> .bapro-modal__image),
.bapro-modal__body:has(> a > .bapro-modal__image),
.bapro-modal__body:has(> .bapro-modal__video) {
	padding: 0;
}

.bapro-modal__body:has(> .bapro-modal__video) .bapro-modal__title,
.bapro-modal__body:has(> .bapro-modal__image) .bapro-modal__title,
.bapro-modal__body:has(> a > .bapro-modal__image) .bapro-modal__title {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.bapro-modal__layer .bapro-modal__image {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	border-radius: 0;
}

.bapro-modal__video {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
}

.bapro-modal__video iframe,
.bapro-modal__video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.bapro-modal__note {
	padding: 20px;
	border: 2px dashed #c9ccd3;
	border-radius: 8px;
	color: #646b7a;
	text-align: center;
}

/* ---------- Close positions ---------- */
.bapro-modal--close-outside .bapro-ov__dialog .bapro-ov__close {
	top: calc(-1 * var(--bapro-ov-close, 36px) - 10px);
	right: 0;
	background: rgba(255, 255, 255, 0.92);
}

.bapro-modal__screen-close {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 6;
}

.bapro-modal__screen-close .bapro-ov__close {
	position: static;
}

.bapro-modal__layer .bapro-modal__screen-close .bapro-ov__close {
	position: static;
	background: rgba(255, 255, 255, 0.92);
}

/* Keep the outside button on screen on phones. */
@media (max-width: 767px) {
	.bapro-modal--close-outside .bapro-ov__dialog .bapro-ov__close {
		top: 10px;
		right: 10px;
	}

	.bapro-modal__body {
		padding: 32px 22px 24px;
	}

	.bapro-modal__layer {
		--bapro-modal-gap: 14px;
	}
}

/* ---------- Effects (the closed state, then .is-open) ---------- */
.bapro-modal--fx-zoom .bapro-modal__box {
	transform: scale(0.88);
}

.bapro-modal--fx-zoom-out .bapro-modal__box {
	transform: scale(1.12);
}

.bapro-modal--fx-slide-up .bapro-modal__box {
	transform: translateY(60px);
}

.bapro-modal--fx-slide-down .bapro-modal__box {
	transform: translateY(-60px);
}

.bapro-modal--fx-flip {
	perspective: 1200px;
}

.bapro-modal--fx-flip .bapro-modal__box {
	transform: rotateX(-30deg) translateY(30px);
	transform-origin: center top;
}

.bapro-modal--fx-none .bapro-modal__box,
.bapro-modal--fx-none .bapro-ov__backdrop {
	transition: none;
}

.bapro-ov.is-open .bapro-modal__box {
	opacity: 1;
	transform: none;
}

.bapro-modal__screen-close {
	opacity: 0;
	transition: opacity var(--bapro-ov-duration) ease;
}

.bapro-ov.is-open .bapro-modal__screen-close {
	opacity: 1;
}

/* ---------- Trigger in the widget ---------- */
.bapro-ov-trigger--icon {
	font-size: 22px;
}

.bapro-ov-trigger-wrap .bapro-ov-trigger.bapro-ov-trigger--icon {
	width: 2.4em;
	height: 2.4em;
	padding: 0;
	border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
	.bapro-modal__box,
	.bapro-modal__screen-close {
		transform: none;
		transition: opacity 0.15s linear;
	}
}

/* Anything the script hides with the hidden attribute stays hidden, even
   when a display value above (or from the theme) would show it. */
.bapro-modal [hidden],
.bapro-modal__layer[hidden] {
	display: none !important;
}
