#wprc-popup:not([open]) {
	display: none;
}

#wprc-popup[open] {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 24px;
	border: 0;
	background: transparent;
	overflow: auto;
}

#wprc-popup::backdrop {
	background: rgb(0 0 0 / 78%);
}

#wprc-popup .wprc-popup-frame {
	box-sizing: border-box;
	position: relative;
	max-width: 100%;
	border: 2px solid #fff;
}

#wprc-popup .wprc-popup-link,
#wprc-popup img {
	display: block;
}

#wprc-popup img {
	width: auto;
	height: auto;
	max-width: min(840px, calc(100vw - 52px));
	max-height: calc(100vh - 52px);
	max-height: calc(100dvh - 52px);
	object-fit: contain;
}

#wprc-popup .wprc-popup-close {
	box-sizing: border-box;
	position: absolute;
	z-index: 1;
	top: -14px;
	right: -14px;
	display: grid;
	place-items: center;
	width: 25px;
	height: 25px;
	margin: 0;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #222;
	color: #fff;
	font: 21px / 1 sans-serif;
	cursor: pointer;
}

#wprc-popup .wprc-popup-close:focus-visible {
	outline: none;
	background: #595959;
}

#wprc-popup .wprc-popup-link:focus-visible {
	outline: 2px solid #215dcc;
	outline-offset: 2px;
}

html:has(#wprc-popup[open]) {
	overflow: hidden;
}
