/* Zoomable images (includes/zoom-images.php). Colours are the Lines theme's tokens. */

/* On the page: the image fills the panel and is cut at the case study image cap
   with the same fade as lightbox images (Lines compat.css). The whole image can
   be opened, so nothing below the cut is lost. */
.at-zoom-open {
	position: relative;
	display: block;
	width: 100%;
	max-height: var(--cs-image-cap, 450px);
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--wp--custom--radius, 4px);
	background: none;
	cursor: zoom-in;
}

.at-zoom-open img {
	display: block;
	width: 100%;
	height: auto;
	-webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--cs-image-cap, 450px) - 96px), transparent var(--cs-image-cap, 450px));
	mask-image: linear-gradient(to bottom, #000 calc(var(--cs-image-cap, 450px) - 96px), transparent var(--cs-image-cap, 450px));
}

.at-zoom-open:focus-visible {
	outline: 2px solid var(--wp--preset--color--yellow, #FFC93C);
	outline-offset: 3px;
}

.at-zoom-hint {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 6px 10px 6px 30px;
	border-radius: var(--wp--custom--radius, 4px);
	background: rgb(16 27 45 / 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23EEF0F3' stroke-width='1.5'%3E%3Cpath d='M10 2h4v4M6 14H2v-4M14 2 9 7M2 14l5-5'/%3E%3C/svg%3E") no-repeat 9px center;
	color: var(--wp--preset--color--text, #EEF0F3);
	font-family: var(--wp--preset--font-family--body, system-ui, sans-serif);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
}

.at-zoom-open:hover .at-zoom-hint {
	background-color: var(--wp--preset--color--ground, #101B2D);
}

.at-zoom-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Full-screen viewer. */
.at-zoom-locked {
	overflow: hidden;
}

.at-zoom-dialog {
	width: 100vw;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--wp--preset--color--ground, #101B2D);
	color: var(--wp--preset--color--text, #EEF0F3);
	font-family: var(--wp--preset--font-family--body, system-ui, sans-serif);
}

.at-zoom-dialog[open] {
	display: grid;
	grid-template-rows: 1fr auto;
}

.at-zoom-dialog::backdrop {
	background: var(--wp--preset--color--ground, #101B2D);
}

.at-zoom-stage {
	position: relative;
	min-height: 0;
	background: var(--wp--preset--color--step, #16233A);
}

.at-zoom-stage .openseadragon-canvas:focus-visible {
	outline: 2px solid var(--wp--preset--color--yellow, #FFC93C);
	outline-offset: -2px;
}

.at-zoom-dialog.is-loading .at-zoom-stage::after {
	content: "Loading";
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--wp--preset--color--muted, #8792A6);
	font-size: 14px;
}

.at-zoom-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 16px;
	border-top: 1px solid var(--wp--preset--color--rule, #2A3A55);
}

.at-zoom-caption {
	margin: 0;
	max-width: 80ch;
	color: var(--wp--preset--color--text-2, #C7CFDB);
	font-size: 14px;
	line-height: 1.5;
}

.at-zoom-tools {
	display: flex;
	flex: none;
	align-items: center;
	gap: 4px;
}

.at-zoom-tools button {
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--wp--preset--color--rule, #2A3A55);
	border-radius: var(--wp--custom--radius, 4px);
	background: var(--wp--preset--color--step, #16233A);
	color: var(--wp--preset--color--text, #EEF0F3);
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
}

.at-zoom-tools button:hover {
	border-color: var(--wp--preset--color--mark-slate, #7FA3CC);
}

.at-zoom-tools button:focus-visible {
	outline: 2px solid var(--wp--preset--color--yellow, #FFC93C);
	outline-offset: 2px;
}

.at-zoom-level {
	min-width: 56px;
	color: var(--wp--preset--color--text-2, #C7CFDB);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.at-zoom-help {
	position: absolute;
	top: 12px;
	left: 16px;
	margin: 0;
	padding: 6px 10px;
	border-radius: var(--wp--custom--radius, 4px);
	background: rgb(16 27 45 / 0.85);
	color: var(--wp--preset--color--muted, #8792A6);
	font-size: 13px;
	pointer-events: none;
}

@media (max-width: 600px) {
	.at-zoom-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.at-zoom-tools {
		justify-content: space-between;
	}

	.at-zoom-help {
		display: none;
	}
}
