/* Generated by astro-product/scripts/sync-core.mjs from packages/foundation/components/image-compare. Do not edit. */
/*
 * Image compare: the two images share one grid cell; the second is clipped from the divider on (clip-path reads
 * --rt-image-compare-position, which image-compare.js moves). The box is the first image's size, or an aspect ratio
 * (both images then cover it). The handle and the labels take the text colour; the range covers the box for the
 * keyboard and screen readers only, the pointer goes to the box. WP: rtthemes/image-compare with its own
 * WordPress-only CSS; colours, type, ratio and radius are the block's settings.
 */
.rt-image-compare {
	position: relative;
	display: grid;
	grid-template: 100% / 100%;
	overflow: hidden;
	isolation: isolate;
	user-select: none;
	touch-action: pan-y;
	cursor: ew-resize;
}

:where(.rt-image-compare) {
	color: var(--rt-color-on-image);
	font-size: var(--rt-font-size-small);
	line-height: 1.4;
}

.rt-image-compare--vertical {
	touch-action: pan-x;
	cursor: ns-resize;
}

.rt-image-compare__image {
	grid-area: 1 / 1;
	margin: 0;
}

.rt-image-compare__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	-webkit-user-drag: none;
}

.rt-image-compare__image ~ .rt-image-compare__image {
	clip-path: inset(0 0 0 var(--rt-image-compare-position, 50%));
}

.rt-image-compare--vertical > .rt-image-compare__image ~ .rt-image-compare__image {
	clip-path: inset(var(--rt-image-compare-position, 50%) 0 0 0);
}

.rt-image-compare__label {
	position: absolute;
	z-index: 1;
	top: 1rem;
	left: 1rem;
	padding: 0.25em 0.75em;
	background-color: rgb(0 0 0 / 45%);
	pointer-events: none;
}

.rt-image-compare__label[data-side="after"] {
	left: auto;
	right: 1rem;
}

.rt-image-compare--vertical > .rt-image-compare__label[data-side="after"] {
	top: auto;
	bottom: 1rem;
	left: 1rem;
	right: auto;
}

.rt-image-compare__range {
	position: absolute;
	z-index: 2;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	direction: ltr;
	pointer-events: none;
}

.rt-image-compare--vertical > .rt-image-compare__range {
	writing-mode: vertical-lr;
}

.rt-image-compare__handle {
	position: absolute;
	z-index: 3;
	top: 50%;
	left: var(--rt-image-compare-position, 50%);
	box-sizing: border-box;
	width: 2.75rem;
	height: 2.75rem;
	border: 2px solid;
	border-radius: 50%;
	background-color: rgb(0 0 0 / 30%);
	translate: -50% -50%;
	pointer-events: none;
}

.rt-image-compare--vertical > .rt-image-compare__handle {
	top: var(--rt-image-compare-position, 50%);
	left: 50%;
}

.rt-image-compare__handle::before,
.rt-image-compare__handle::after {
	content: "";
	position: absolute;
	background-color: currentColor;
}

.rt-image-compare__handle::before {
	left: 50%;
	width: 2px;
	top: 100%;
	height: 200vmax;
	translate: -50% 0;
	box-shadow: 0 calc(-200vmax - 2.75rem) 0 currentColor;
}

.rt-image-compare--vertical > .rt-image-compare__handle::before {
	top: 50%;
	left: 100%;
	width: 200vmax;
	height: 2px;
	translate: 0 -50%;
	box-shadow: calc(-200vmax - 2.75rem) 0 0 currentColor;
}

.rt-image-compare__handle::after {
	inset: 0;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 60% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 60% no-repeat;
}

.rt-image-compare--vertical > .rt-image-compare__handle::after {
	rotate: 90deg;
}

.rt-image-compare:has(> .rt-image-compare__range:focus-visible) > .rt-image-compare__handle {
	outline: 2px solid;
	outline-offset: 3px;
}
/* Generated by astro-product/scripts/sync-core.mjs from packages/foundation/components/image-hotspots. Do not edit. */
/*
 * Image hotspots: markers on a photo at x/y percent; each marker opens its card as a popover (popovertarget, no JS).
 * Wide screens anchor the card above its marker (CSS anchor positioning, flipped when there is no room; browsers
 * without it centre the card on the screen). Phones (37.5rem and under) show it as a bottom sheet with a close button.
 * WP: rtthemes/image-hotspots + rtthemes/hotspot with their own WordPress-only CSS (the card is a core/group there).
 */
.rt-image-hotspots {
	--rt-image-hotspots-marker-size: 2.25rem;
	--rt-image-hotspots-ring: color-mix(in srgb, var(--rt-color-accent) 35%, transparent);
	position: relative;
	counter-reset: rt-hotspot;
}

.rt-image-hotspots .rt-image-hotspots__image {
	margin: 0;
}

.rt-image-hotspots .rt-image-hotspots__image img {
	display: block;
	width: 100%;
	height: auto;
}

.rt-image-hotspots__spot {
	position: absolute;
	top: calc(var(--rt-hotspot-y) * 1%);
	left: calc(var(--rt-hotspot-x) * 1%);
	width: 0;
	height: 0;
	counter-increment: rt-hotspot;
	anchor-scope: --rt-hotspot;
}

.rt-image-hotspots__marker {
	position: absolute;
	top: 0;
	left: 0;
	display: grid;
	place-content: center;
	box-sizing: border-box;
	width: var(--rt-image-hotspots-marker-size);
	height: var(--rt-image-hotspots-marker-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--rt-color-accent);
	box-shadow: 0 0 0 calc(var(--rt-image-hotspots-marker-size) / 6) var(--rt-image-hotspots-ring);
	color: var(--rt-color-on-accent);
	font-family: inherit;
	font-size: calc(var(--rt-image-hotspots-marker-size) * 0.42);
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	translate: -50% -50%;
	transition: scale 0.2s ease;
	anchor-name: --rt-hotspot;
}

.rt-image-hotspots__marker:hover,
.rt-image-hotspots__marker:focus-visible,
.rt-image-hotspots__spot:has(> :popover-open) > .rt-image-hotspots__marker {
	scale: 1.12;
}

.rt-image-hotspots__marker:focus-visible {
	outline: 2px solid var(--rt-color-accent);
	outline-offset: calc(var(--rt-image-hotspots-marker-size) / 6 + 2px);
}

.rt-image-hotspots--plus .rt-image-hotspots__marker::before,
.rt-image-hotspots--plus .rt-image-hotspots__marker::after {
	content: "";
	grid-area: 1 / 1;
	width: 0.875em;
	height: 0.125em;
	border-radius: 1px;
	background-color: currentColor;
	transition: rotate 0.2s ease;
}

.rt-image-hotspots--plus .rt-image-hotspots__marker::after {
	rotate: 90deg;
}

.rt-image-hotspots--plus .rt-image-hotspots__spot:has(> :popover-open) > .rt-image-hotspots__marker::before {
	rotate: 45deg;
}

.rt-image-hotspots--plus .rt-image-hotspots__spot:has(> :popover-open) > .rt-image-hotspots__marker::after {
	rotate: 135deg;
}

.rt-image-hotspots--number .rt-image-hotspots__marker::before {
	content: counter(rt-hotspot);
	font-variant-numeric: tabular-nums;
}

.rt-image-hotspots--dot .rt-image-hotspots__marker {
	background-color: var(--rt-image-hotspots-ring);
	box-shadow: none;
}

.rt-image-hotspots--dot .rt-image-hotspots__marker::before {
	content: "";
	/* Sized from the marker: a percentage would resolve against the content-sized grid track */
	width: calc(var(--rt-image-hotspots-marker-size) * 0.4);
	height: calc(var(--rt-image-hotspots-marker-size) * 0.4);
	box-sizing: border-box;
	border: 2px solid currentColor;
	border-radius: 50%;
	background-color: var(--rt-color-accent);
}

.rt-image-hotspots--pulse .rt-image-hotspots__marker {
	animation: rt-image-hotspots-pulse 2s ease-out infinite;
}

@keyframes rt-image-hotspots-pulse {
	0% {
		box-shadow: 0 0 0 0 var(--rt-image-hotspots-ring);
	}

	70% {
		box-shadow: 0 0 0 calc(var(--rt-image-hotspots-marker-size) / 2.5) transparent;
	}

	100% {
		box-shadow: 0 0 0 calc(var(--rt-image-hotspots-marker-size) / 2.5) transparent;
	}
}

.rt-image-hotspots__card {
	box-sizing: border-box;
	width: min(18rem, 100vw - 2rem);
	max-height: calc(100dvh - 2rem);
	overflow: auto;
	padding: var(--rt-spacing-30) var(--rt-spacing-40);
	border: 0;
	border-radius: 0.3125rem;
	background-color: var(--rt-color-base);
	box-shadow: 0 2px 25px rgb(0 0 0 / 22%);
	color: var(--rt-color-contrast);
	opacity: 0;
	translate: 0 0.5rem;
	transition: opacity 0.2s ease, translate 0.2s ease, display 0.2s allow-discrete, overlay 0.2s allow-discrete;
}

.rt-image-hotspots__card:popover-open {
	display: flex;
	flex-direction: column;
	gap: var(--rt-spacing-20);
	opacity: 1;
	translate: 0 0;
}

@starting-style {
	.rt-image-hotspots__card:popover-open {
		opacity: 0;
		translate: 0 0.5rem;
	}
}

.rt-image-hotspots .rt-image-hotspots__title {
	margin: 0;
	font-size: var(--rt-font-size-base-plus);
	font-weight: 700;
}

.rt-image-hotspots .rt-image-hotspots__text,
.rt-image-hotspots .rt-image-hotspots__link {
	margin: 0;
	font-size: var(--rt-font-size-small);
}

.rt-image-hotspots .rt-image-hotspots__link {
	font-weight: 700;
}

.rt-image-hotspots__link a {
	color: inherit;
}

.rt-image-hotspots__close {
	display: none;
}

@supports (position-area: top) {
	@media (width > 37.5rem) {
		.rt-image-hotspots__card {
			inset: auto;
			margin: 0.75rem;
			position-anchor: --rt-hotspot;
			position-area: top;
			position-try-fallbacks: flip-block, right, left;
		}
	}
}

@media (width <= 37.5rem) {
	.rt-image-hotspots .rt-image-hotspots__card {
		inset: auto 0 0;
		width: auto;
		max-width: none;
		max-height: 75dvh;
		margin: 0;
		border-end-start-radius: 0;
		border-end-end-radius: 0;
		translate: 0 100%;
	}

	.rt-image-hotspots .rt-image-hotspots__card:popover-open {
		translate: 0 0;
	}

	@starting-style {
		.rt-image-hotspots .rt-image-hotspots__card:popover-open {
			translate: 0 100%;
		}
	}

	.rt-image-hotspots__card::backdrop {
		background-color: rgb(0 0 0 / 35%);
	}

	.rt-image-hotspots__close {
		position: absolute;
		top: 0.25rem;
		right: 0.25rem;
		display: grid;
		place-content: center;
		width: 2.5rem;
		height: 2.5rem;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: none;
		color: inherit;
		cursor: pointer;
	}

	.rt-image-hotspots__close::before,
	.rt-image-hotspots__close::after {
		content: "";
		grid-area: 1 / 1;
		width: 1.125rem;
		height: 2px;
		background-color: currentColor;
		rotate: 45deg;
	}

	.rt-image-hotspots__close::after {
		rotate: -45deg;
	}

	.rt-image-hotspots__close:focus-visible {
		outline: 2px solid currentColor;
		outline-offset: -4px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rt-image-hotspots .rt-image-hotspots__marker,
	.rt-image-hotspots .rt-image-hotspots__marker::before,
	.rt-image-hotspots .rt-image-hotspots__marker::after,
	.rt-image-hotspots .rt-image-hotspots__card {
		transition: none;
		animation: none;
	}
}
