/* No transitions: a fade would leave images visible during the capture. */

/* Images mode: everything the script tagged as an image. */
.hd-sgi-active.hd-sgi-mode-images .hd-sgi-t {
	filter: blur(var(--hd-sgi-blur, 28px)) !important;
	transition: none !important;
}

/* Images mode: background images are removed, not blurred, so text and
   content inside the element stay readable. */
.hd-sgi-active.hd-sgi-mode-images .hd-sgi-bg,
.hd-sgi-active.hd-sgi-mode-images .hd-sgi-bg::before,
.hd-sgi-active.hd-sgi-mode-images .hd-sgi-bg::after {
	background-image: none !important;
	transition: none !important;
}

/* Whole-page mode: everything except the notice. */
.hd-sgi-active.hd-sgi-mode-page body > *:not(.hd-sgi-notice) {
	filter: blur(var(--hd-sgi-blur, 28px)) !important;
	transition: none !important;
}

.hd-sgi-t img,
img.hd-sgi-t {
	-webkit-user-drag: none;
	-webkit-touch-callout: none;
}

.hd-sgi-notice {
	display: none;
	position: fixed;
	inset: auto 1rem 1rem 1rem;
	z-index: 2147483647;
	max-width: 32rem;
	margin-inline: auto;
	padding: 1.25rem 1.5rem;
	background: #111;
	color: #fff;
	border-radius: 0.5rem;
	box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 0.35);
	font-size: 1rem;
	line-height: 1.5;
	text-align: left;
}

.hd-sgi-active .hd-sgi-notice {
	display: block;
}

.hd-sgi-notice p {
	margin: 0 0 0.5rem;
	color: inherit;
}

.hd-sgi-notice__title {
	font-weight: 700;
}

.hd-sgi-notice a {
	color: inherit;
	text-decoration: underline;
}

.hd-sgi-notice__close {
	margin-top: 0.25rem;
	padding: 0.4rem 1rem;
	background: #fff;
	color: #111;
	border: 0;
	border-radius: 0.25rem;
	font: inherit;
	cursor: pointer;
}

.hd-sgi-notice__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Print rules work without JavaScript: the mode class is also added to
   <body> server side, and the image selectors below need no script. */
@media print {
	.hd-sgi-mode-images .hd-sgi-t,
	.hd-sgi-mode-images img,
	.hd-sgi-mode-images picture,
	.hd-sgi-mode-images video {
		visibility: hidden !important;
	}

	.hd-sgi-mode-images .hd-sgi-bg,
	.hd-sgi-mode-images .hd-sgi-bg::before,
	.hd-sgi-mode-images .hd-sgi-bg::after {
		background-image: none !important;
	}

	/* The mode class is on <body> from PHP (works without JavaScript) and
	   on <html> from the script, so match either. */
	.hd-sgi-mode-page body > *:not(.hd-sgi-notice),
	body.hd-sgi-mode-page > *:not(.hd-sgi-notice) {
		display: none !important;
	}

	.hd-sgi-notice {
		display: block !important;
		position: static;
		box-shadow: none;
		background: none;
		color: #000;
		border: 1px solid #000;
	}

	.hd-sgi-notice__close {
		display: none;
	}
}
