/**
 * Screenshot links and their dialog (screenshot.js). A link in a
 * component's text that points at a picture carries the class sba-c-shot
 * (raskin_component_prose()): it stays an inline link, with the image icon
 * after its text so a reader knows a picture opens. The dialog shows the
 * picture at its own size, at most the viewport's, on white, as Poster
 * cards show a poster. See docs/components.md, "Screenshot links".
 */

/* The icon is a background in the link's own padding, not a box after it:
   a box would let the line break between the icon and the closing quote or
   full stop that follows the link. Lucide's image, stroked in brand red. */
a.sba-c-shot {
	padding-right: 1.125em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E73137' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2' ry='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/%3E%3C/svg%3E") right 0.0625em center / 0.875em no-repeat;
	cursor: zoom-in;
}

.sba-c-shot-dialog {
	width: fit-content;
	max-width: min(94vw, 1200px);
	max-height: 92vh;
	padding: 56px 24px 24px;
	overflow: auto;
	border: 0;
	border-radius: var(--sba-radius);
	background: #fff;
}

.sba-c-shot-dialog::backdrop {
	background-color: rgb(0 0 0 / 0.8);
}

.sba-c-shot-dialog img {
	display: block;
	max-width: 100%;
	max-height: calc(92vh - 80px);
	width: auto;
	height: auto;
	margin: 0 auto;
	border: 1px solid var(--sba-border);
}

.sba-c-shot-close.sba-c-shot-close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: var(--sba-muted);
	color: var(--sba-charcoal);
	cursor: pointer;
}
