#shp-popup-overlay[hidden] {
	display: none !important;
}

#shp-popup-overlay.shp-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999999 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
	box-sizing: border-box;
	background-color: rgba(0, 0, 0, 0.72);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	overscroll-behavior: contain;
	cursor: pointer;
}

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

#shp-popup-overlay .shp-modal {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: min(92vw, var(--shp-max-width, 480px));
	max-height: 82vh;
	max-height: min(85vh, calc(100dvh - 104px));
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	cursor: default;
	transform: scale(0.96);
	transition: transform 0.25s ease;
}

#shp-popup-overlay.is-visible .shp-modal {
	transform: scale(1);
}

#shp-popup-overlay .shp-link {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	line-height: 0;
	text-decoration: none;
	cursor: pointer;
}

#shp-popup-overlay .shp-link:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.85);
	outline-offset: 4px;
}

#shp-popup-overlay .shp-image {
	display: block;
	width: auto;
	height: auto;
	max-width: 100% !important;
	max-height: 82vh !important;
	max-height: min(85vh, calc(100dvh - 104px)) !important;
	object-fit: contain;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.48));
}

#shp-popup-overlay .shp-close {
	position: absolute;
	top: -16px;
	right: -16px;
	z-index: 2;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(17, 17, 17, 0.88);
	color: #ffffff;
	font-family: Arial, sans-serif;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

#shp-popup-overlay .shp-close:hover,
#shp-popup-overlay .shp-close:focus-visible {
	background: rgba(0, 0, 0, 0.98);
	transform: scale(1.08);
	outline: 2px solid rgba(255, 255, 255, 0.75);
	outline-offset: 2px;
}

@media (max-width: 600px) {
	#shp-popup-overlay.shp-overlay {
		padding: 52px 14px 20px;
	}

	#shp-popup-overlay .shp-modal {
		max-width: 94vw;
		max-height: 80vh;
		max-height: min(80vh, calc(100dvh - 104px));
	}

	#shp-popup-overlay .shp-image {
		max-width: 100% !important;
		max-height: 80vh !important;
		max-height: min(80vh, calc(100dvh - 104px)) !important;
	}

	#shp-popup-overlay .shp-close {
		top: -42px;
		right: 0;
		width: 36px;
		height: 36px;
		font-size: 24px;
	}
}
