.savi-popup[hidden] {
	display: none !important;
}

.savi-popup {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.savi-popup.is-visible {
	opacity: 1;
}

.savi-popup .savi-popup__overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.7);
	cursor: pointer;
}

.savi-popup .savi-popup__content {
	position: relative;
	max-width: min(var(--savi-popup-max-width, 600px), 100%);
	max-height: 100%;
	transform: scale(0.95);
	transition: transform 0.25s ease;
}

.savi-popup.is-visible .savi-popup__content {
	transform: scale(1);
}

.savi-popup .savi-popup__link {
	display: block;
	line-height: 0;
}

.savi-popup .savi-popup__image {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	margin: 0;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.savi-popup .savi-popup__close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 2;
	width: 36px;
	height: 36px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #111;
	font-family: Arial, sans-serif;
	font-size: 24px;
	font-weight: normal;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.savi-popup .savi-popup__close:hover,
.savi-popup .savi-popup__close:focus {
	background: #f0f0f0;
	color: #000;
}

html.savi-popup-open,
html.savi-popup-open body {
	overflow: hidden;
}

@media (max-width: 480px) {
	.savi-popup .savi-popup__close {
		top: -12px;
		right: -8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.savi-popup,
	.savi-popup .savi-popup__content {
		transition: none;
	}
}
