.ri-popup,
.ri-popup *,
.ri-popup *::before,
.ri-popup *::after {
	box-sizing: border-box;
}

.ri-popup {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ri-popup.is-open {
	display: flex;
}

.ri-popup__overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.6);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.ri-popup__box {
	position: relative;
	width: 100%;
	max-width: var(--ri-popup-width, 600px);
	max-height: 100%;
	overflow: auto;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	opacity: 0;
	outline: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.ri-popup[data-animation="zoom"] .ri-popup__box {
	transform: scale(0.9);
}

.ri-popup[data-animation="slide-up"] .ri-popup__box {
	transform: translateY(40px);
}

.ri-popup.is-visible .ri-popup__overlay {
	opacity: 1;
}

.ri-popup.is-visible .ri-popup__box {
	opacity: 1;
	transform: none;
}

/* Close button: reset theme button styles */
.ri-popup .ri-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: #333;
	font-family: Arial, sans-serif;
	font-size: 28px;
	font-weight: 400;
	line-height: 1;
	text-transform: none;
	text-align: center;
	cursor: pointer;
}

.ri-popup .ri-popup__close:hover,
.ri-popup .ri-popup__close:focus {
	background: rgba(0, 0, 0, 0.08);
	color: #000;
}

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

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

/* Trigger button defaults (overridden by Elementor style controls) */
.ri-popup-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border: 0;
	border-radius: 4px;
	background: #1d4ed8;
	color: #fff;
	font-size: 16px;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ri-popup-btn:hover,
.ri-popup-btn:focus {
	background: #1e40af;
	color: #fff;
}

.ri-popup-btn__icon {
	display: inline-flex;
}

@media (max-width: 600px) {
	.ri-popup {
		padding: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ri-popup__overlay,
	.ri-popup__box {
		transition: none;
	}
}
