/* PopVista public announcement dialog. Images always retain their full frame. */
body.popvista-is-open { overflow: hidden; }

dialog.popvista {
	box-sizing: border-box;
	--pv-width: 640px;
	--pv-ink: #142130;
	position: fixed;
	inset: 0;
	display: none;
	place-items: center;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
	border: 0;
	background: transparent;
	color: var(--pv-ink);
	font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	overflow: auto;
	overscroll-behavior: contain;
}
dialog.popvista[open] { display: grid; }
dialog.popvista:focus { outline: none; }
dialog.popvista *,
dialog.popvista *::before,
dialog.popvista *::after { box-sizing: border-box; }
dialog.popvista::backdrop { background: rgb(10 17 29 / 82%); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }

.popvista-shell {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(var(--pv-width), calc(100vw - 32px));
	max-width: 100%;
	max-height: 100%;
	margin: auto;
	overflow: visible;
	border: 0;
	border-radius: 0;
	background: transparent;
	filter: drop-shadow(0 14px 34px rgb(0 0 0 / 28%));
	transform: translateY(8px) scale(.985);
	opacity: 0;
	transition: transform 210ms cubic-bezier(.2,.75,.25,1), opacity 190ms ease;
}
dialog.popvista[open] .popvista-shell { transform: translateY(0) scale(1); opacity: 1; animation: popvista-enter 210ms cubic-bezier(.2,.75,.25,1); }
@keyframes popvista-enter { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

.popvista-close {
	position: relative;
	align-self: flex-end;
	flex: 0 0 44px;
	margin: 0 0 2px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: transparent;
	box-shadow: none;
	color: #fff;
	font: inherit;
	cursor: pointer;
}
.popvista-close:hover, .popvista-close:focus { background: rgb(255 255 255 / 8%); color: #fff; border: 0; box-shadow: none; }
.popvista-close:focus-visible { outline: 2px solid rgb(255 255 255 / 85%); outline-offset: -4px; }
.popvista-close svg { display: block; width: 20px; height: 20px; }

.popvista-art {
	display: grid;
	place-items: center;
	flex: 1 1 auto;
	min-height: 0;
	max-height: calc(100dvh - 112px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
	padding: 4px 4px 0;
	background: #fff;
	border-radius: 5px 5px 0 0;
}
.popvista-art > a { display: grid; place-items: center; max-width: 100%; max-height: 100%; }
.popvista-art img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100dvh - 128px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
	object-fit: contain;
	object-position: center;
	border-radius: 2px;
}

.popvista-credit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	flex: 0 0 auto;
	min-height: 30px;
	padding: 5px 12px max(5px, env(safe-area-inset-bottom));
	border-top: 1px solid #edf0f3;
	background: #fff;
	color: #64748b;
	font-size: 9.5px;
	line-height: 1.4;
	letter-spacing: .015em;
	text-align: center;
	border-radius: 0 0 5px 5px;
}
.popvista-credit strong { color: #526176; font-size: 10px; font-weight: 600; letter-spacing: .025em; }
.popvista-credit > span { color: #9aa5b3; font-weight: 300; }
.popvista-credit a { color: #455468; font-size: 9px; font-weight: 600; letter-spacing: .075em; text-decoration: none; text-underline-offset: 3px; }
.popvista-credit a:hover { color: #2458d3; }
.popvista-credit a:hover, .popvista-credit a:focus-visible { text-decoration: underline; }
.popvista-credit a:focus-visible { outline: 2px solid #2458d3; outline-offset: 3px; }
.popvista-label,
.popvista-description { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 600px) {
	dialog.popvista { padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
	.popvista-shell { width: min(var(--pv-width), calc(100vw - 20px)); }
	.popvista-art { padding: 4px 4px 0; }
	.popvista-credit { min-height: 30px; }
}
@media (max-height: 460px) and (orientation: landscape) {
	dialog.popvista { padding: max(6px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
	.popvista-art img { max-height: calc(100dvh - 128px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
	.popvista-shell { transform: none; transition: none; animation: none !important; }
	dialog.popvista[open] .popvista-shell { transform: none; }
}
