/* Image Compare Slider
   Text uses the site's own font (font-family: inherit); the plugin adds no fonts. */

.ics-figure {
	margin: 0;
}

.ics {
	--ics-pos: 50%;
	--ics-handle-color: #fff;
	--ics-handle-size: 44px;
	--ics-line-width: 2px;
	--ics-radius: 0;

	position: relative;
	display: block;
	max-width: 100%;
	overflow: hidden;
	border-radius: var(--ics-radius);
	line-height: 0;
	cursor: ew-resize;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.ics .ics__img {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
	pointer-events: none;
	-webkit-user-drag: none;
}

.ics .ics__img--before {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	object-fit: cover;
	clip-path: inset(0 calc(100% - var(--ics-pos)) 0 0);
}

/* Handle */

.ics__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--ics-pos);
	z-index: 2;
	width: var(--ics-handle-size);
	margin-left: calc(var(--ics-handle-size) / -2);
	display: flex;
	align-items: center;
	justify-content: center;
	outline: none;
}

.ics__handle::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: var(--ics-line-width);
	transform: translateX(-50%);
	background: var(--ics-handle-color);
	box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
}

.ics__grip {
	position: relative;
	box-sizing: border-box;
	width: var(--ics-handle-size);
	height: var(--ics-handle-size);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	border: var(--ics-line-width) solid var(--ics-handle-color);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s ease;
}

.ics__grip::before,
.ics__grip::after {
	content: "";
	width: 0;
	height: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
}

.ics__grip::before {
	border-right: 7px solid var(--ics-handle-color);
}

.ics__grip::after {
	border-left: 7px solid var(--ics-handle-color);
}

.ics.is-dragging .ics__grip {
	transform: scale(1.08);
}

/* Vertical: before on top, after below. */

.ics--vertical {
	cursor: ns-resize;
}

.ics--vertical .ics__img--before {
	clip-path: inset(0 0 calc(100% - var(--ics-pos)) 0);
}

.ics--vertical .ics__handle {
	top: var(--ics-pos);
	bottom: auto;
	left: 0;
	right: 0;
	width: auto;
	height: var(--ics-handle-size);
	margin-left: 0;
	margin-top: calc(var(--ics-handle-size) / -2);
	/* Page scroll still works on the image; dragging starts from the handle on touch. */
	touch-action: none;
}

.ics--vertical .ics__handle::before {
	top: 50%;
	bottom: auto;
	left: 0;
	right: 0;
	width: auto;
	height: var(--ics-line-width);
	transform: translateY(-50%);
}

.ics--vertical .ics__grip {
	transform: rotate(90deg);
}

.ics--vertical.is-dragging .ics__grip {
	transform: rotate(90deg) scale(1.08);
}

.ics--vertical .ics__label--before {
	top: 12px;
	left: 12px;
}

.ics--vertical .ics__label--after {
	top: auto;
	right: auto;
	bottom: 12px;
	left: 12px;
}

/* The handle is an invisible hit area; the plugin draws its own focus ring on the grip.
   Themes and accessibility plugins often outline [tabindex]/[role=slider] on focus or
   press, which would frame the whole strip, so this is locked down (!important to
   beat site-wide rules that use it themselves). */
.ics div.ics__handle,
.ics div.ics__handle:hover,
.ics div.ics__handle:focus,
.ics div.ics__handle:focus-visible,
.ics div.ics__handle:active {
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	outline: none !important;
}

/* Two-tone ring stays visible on light and dark images. */
.ics:not(.is-pointer) .ics__handle:focus-visible .ics__grip {
	outline: 2px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 6px #000;
}

.ics__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Labels: each sits in a full-size layer clipped like its image,
   so the divider sweeps over the label along with the picture. */

.ics__labels {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.ics__labels--before {
	clip-path: inset(0 calc(100% - var(--ics-pos)) 0 0);
}

.ics__labels--after {
	clip-path: inset(0 0 0 var(--ics-pos));
}

.ics--vertical .ics__labels--before {
	clip-path: inset(0 0 calc(100% - var(--ics-pos)) 0);
}

.ics--vertical .ics__labels--after {
	clip-path: inset(var(--ics-pos) 0 0 0);
}

.ics__label {
	position: absolute;
	top: 12px;
	padding: 4px 10px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	pointer-events: none;
}

.ics__label--before {
	left: 12px;
}

.ics__label--after {
	right: 12px;
}

/* Caption */

.ics-caption {
	margin-top: 0.5em;
	margin-bottom: 0;
}

/* Expand button */

.ics .ics__expand,
.ics-lightbox .ics-lightbox__close {
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	box-shadow: none;
	color: #fff;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.ics .ics__expand {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 3;
}

/* Hold our colours in every state. Themes (e.g. Hello Elementor) style
   button:focus / [type=button]:focus with their own colours, which would
   otherwise show when focus returns to the button after the lightbox closes. */
.ics button.ics__expand:focus,
.ics button.ics__expand:active,
.ics-lightbox button.ics-lightbox__close:focus,
.ics-lightbox button.ics-lightbox__close:active {
	border: 0;
	background: rgba(0, 0, 0, 0.55);
	box-shadow: none;
	color: #fff;
	outline: none;
	text-decoration: none;
}

.ics button.ics__expand:hover,
.ics-lightbox button.ics-lightbox__close:hover {
	border: 0;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	text-decoration: none;
}

.ics:not(.is-pointer) button.ics__expand:focus-visible,
.ics-lightbox button.ics-lightbox__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 6px #000;
}

/* Lightbox */

.ics-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 12px;
	padding: 4vh 4vw;
	background: rgba(8, 8, 10, 0.92);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ics-lightbox.is-open {
	opacity: 1;
}

.ics-lightbox .ics-lightbox__close {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 2;
	width: 44px;
	height: 44px;
}

.ics-lightbox .ics--lightbox {
	flex: 0 1 auto;
	width: auto;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ics-lightbox.is-ready .ics--lightbox {
	opacity: 1;
}

.ics-lightbox .ics--lightbox .ics__img--after {
	width: auto;
	max-width: 92vw;
	max-height: 88vh;
}

.ics-lightbox.has-caption .ics--lightbox .ics__img--after {
	max-height: 78vh;
}

.ics-lightbox__caption {
	flex: 0 0 auto;
	max-width: min(92vw, 60em);
	margin: 0;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ics-lightbox__caption a {
	color: inherit;
}

.ics-lightbox.is-ready .ics-lightbox__caption {
	opacity: 1;
}

.ics-lightbox.is-error .ics-lightbox__caption {
	display: none;
}

/* Loading and error states */

.ics-lightbox::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ics-spin 0.8s linear infinite;
}

.ics-lightbox.is-ready::after,
.ics-lightbox.is-error::after {
	display: none;
}

.ics-lightbox.is-error .ics--lightbox {
	display: none;
}

.ics-lightbox__error {
	margin: 0;
	max-width: 32em;
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	text-align: center;
}

@keyframes ics-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Editor notice (Elementor) */

.ics-notice {
	margin: 0 0 8px;
	padding: 8px 12px;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
	color: #1e1e1e;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
	.ics__grip,
	.ics-lightbox,
	.ics-lightbox .ics--lightbox,
	.ics-lightbox__caption {
		transition: none;
	}

	.ics-lightbox::after {
		animation-duration: 2s;
	}
}
