/* ============================================================ */
/* Slideshow – Base */
/* ============================================================ */

.slideshow {
	width: 100%;
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-inline: contain;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.slideshow::-webkit-scrollbar {
	display: none;
}

.slideshow:focus-visible {
	outline: 1px solid var(--color-text);
	outline-offset: 0px;
}

/* ============================================================ */
/* Embla states */

.slideshow--embla {
	overflow-x: hidden;
	scroll-behavior: auto;
	scroll-snap-type: none;
}

.slideshow--embla.slideshow--drag {
	cursor: -webkit-grabbing;
	cursor: grabbing;
}

/* ============================================================ */
/* Modifier variants */

.slideshow--full {
	height: 100svh;
}

/* .slideshow--home {} */

.slideshow--embla.slideshow--project,
.slideshow--embla.slideshow--type {
	cursor: -webkit-grab;
	cursor: grab;
}

/* ============================================================ */
/* Wrapper */

/* AutoHeight plugin requires align-items and transition */
.slideshow__wrapper {
	display: flex;
	align-items: flex-start;
	transition: height 300ms ease-in-out;
	height: 100%;
}

/* ============================================================ */
/* Slide */

.slideshow__slide {
	display: flex;
	position: relative;
	flex: 0 0 100%;
	justify-content: center;
	align-items: center;
	min-width: 0;
	height: 100%;
	scroll-snap-align: center;
}

.slideshow--type .slideshow__slide {
	padding: 0 var(--spacing-m);
}

.slideshow--type .slideshow__slide > div {
	width: 100%;
	height: 100%;
}

.slideshow__slide img,
.slideshow__slide video {
	display: block;
	width: 100%;
	min-width: 0;
	height: 100%;
	object-fit: contain;
	object-position: center;
	user-select: none;
}

.slideshow__slide .svg,
.slideshow__slide svg {
	height:100%;
	width:100%;
}

.slideshow__slide svg,
.slideshow__slide svg * {
	fill: var(--fill-color, black) !important;
}

/* ============================================================ */
/* Pagination */

.slideshow__pagination {
	/* padding: var(--spacing-m); */
	color: var(--color-text-muted);
}

.slideshow__pagination span {
	color: var(--color-text);
}

/* ============================================================ */
/* Static: nothing to scroll (slideshow.js) or a single slide (slideshow.php) */
/* Prev/Next and pagination hidden, their space kept so the caption doesn't shift */

.slideshow__controls.is-static .slideshow__navigation,
.slideshow__controls.is-static .slideshow__pagination {
	visibility: hidden;
}

/* ============================================================ */
/* Navigation */

/* .slideshow__navigation {
	position: absolute;
	top: calc(50% + var(--spacing-l));
	left: 0;
	z-index: 2;
	padding: var(--spacing-m);
} */

.slideshow__navigation__prev.disabled,
.slideshow__navigation__next.disabled {
	pointer-events: none;
	color: var(--color-text-muted);
}

.slideshow__navigation span,
.slideshow__navigation button {
	color: var(--color-text);
}

.slideshow__navigation button {
	transition: color var(--transition-fast);
}

/* Hover: grey, like every other link */
@media (hover: hover) {
	.slideshow__navigation button:hover {
		color: var(--color-text-muted);
	}
}

/* ============================================================ */
/* Caption – shared toggle (mobile) */
/* The toggle itself (hidden checkbox, +/– label, show/hide content) lives in styles/layout/caption.css */

/* label – clickable even inside the pointer-events:none home caption */
.slideshow__caption input[type='checkbox'][name^='toggle'] + label {
	pointer-events: all;
}

.slideshow__caption input[type='checkbox'][name^='toggle'] + label > * {
	pointer-events: none;
}

/* .slideshow__caption__item.is-hidden {
	animation: var(--animate-out);
} */

.slideshow__caption__head,
.slideshow__caption__body {
	pointer-events: all;
}

.slideshow__caption__head {
	margin-bottom: var(--spacing-l);
}

.slideshow__caption__head > h2 {
	margin-bottom: var(--spacing-s);
}

.slideshow__caption__body > .caption__body {
	margin-bottom: var(--spacing-m);
}

.slideshow__caption__body > .caption__credit p {
	margin: 0;
}
