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

.shp-popup {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 24px;
	position: fixed;
	z-index: 999999;
}

.shp-popup__backdrop {
	background: rgba(15, 23, 42, 0.72);
	inset: 0;
	position: absolute;
}

.shp-popup__dialog {
	animation: shp-popup-enter 180ms ease-out;
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
	box-sizing: border-box;
	color: #1f2937;
	max-height: calc(100vh - 48px);
	max-width: 640px;
	overflow-y: auto;
	padding: 40px;
	position: relative;
	width: 100%;
	z-index: 1;
}

.shp-popup__dialog--image {
	max-width: 760px;
	overflow: hidden;
	padding: 0;
}

.shp-popup__dialog--image .shp-popup__close {
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.24);
}

.shp-popup__image-link {
	display: block;
}

.shp-popup__image {
	display: block;
	height: auto;
	max-height: calc(100vh - 48px);
	object-fit: contain;
	width: 100%;
}

.shp-popup__close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: #4b5563;
	cursor: pointer;
	display: flex;
	font: 400 30px/1 Arial, sans-serif;
	height: 40px;
	justify-content: center;
	padding: 0;
	position: absolute;
	right: 10px;
	top: 10px;
	width: 40px;
}

.shp-popup__close:hover {
	background: #f3f4f6;
	color: #111827;
}

.shp-popup__close:focus-visible,
.shp-popup__button:focus-visible {
	outline: 3px solid #93c5fd;
	outline-offset: 3px;
}

.shp-popup__title {
	color: #111827;
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.2;
	margin: 0 32px 18px 0;
}

.shp-popup__content {
	font-size: 1rem;
	line-height: 1.65;
}

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

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

.shp-popup__content img {
	height: auto;
	max-width: 100%;
}

.shp-popup__actions {
	margin-top: 26px;
}

.shp-popup__button {
	background: #2563eb;
	border-radius: 8px;
	box-sizing: border-box;
	color: #ffffff;
	display: inline-block;
	font-weight: 700;
	line-height: 1.2;
	padding: 13px 20px;
	text-decoration: none;
}

.shp-popup__button:hover {
	background: #1d4ed8;
	color: #ffffff;
}

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

@keyframes shp-popup-enter {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

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

	.shp-popup__dialog {
		max-height: calc(100vh - 32px);
		padding: 32px 24px 26px;
	}

	.shp-popup__dialog--image {
		padding: 0;
	}

	.shp-popup__image {
		max-height: calc(100vh - 32px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.shp-popup__dialog {
		animation: none;
	}
}
