/* ABOUTME: Front-end styles: the slider breaks out of the page column and fills the screen. */
/* ABOUTME: Photos cover the area and crossfade; controls sit at the bottom center. */

body:has(.fss) {
	overflow-x: clip;
}

.fss {
	position: relative;
	width: 100vw;
	max-width: none !important; /* block themes cap and center their content with !important */
	height: 100vh;
	height: 100svh;
	margin-right: calc(50% - 50vw) !important;
	margin-left: calc(50% - 50vw) !important;
	overflow: hidden;
	background: #111;
	color: #fff;
}

.fss::before {
	content: "";
	position: absolute;
	z-index: 1;
	top: 0;
	right: 0;
	left: 0;
	height: 10rem;
	background: linear-gradient(rgb(0 0 0 / 0.45), transparent);
	pointer-events: none;
}

.fss-slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 900ms ease, visibility 0s linear 900ms;
}

.fss-slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 900ms ease;
}

.fss-slide__img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
}

.fss-slide figcaption {
	position: absolute;
	right: 0;
	bottom: 1.5rem;
	left: 0;
	padding-inline: 1rem;
	color: #fff;
	font-size: 0.9375rem;
	letter-spacing: 0.04em;
	text-align: center;
	text-shadow: 0 1px 6px rgb(0 0 0 / 0.75);
}

.fss__controls button {
	position: absolute;
	z-index: 2;
	top: 50%;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 0.6);
	border-radius: 50%;
	background: rgb(0 0 0 / 0.35);
	color: #fff;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

.fss__controls[hidden] {
	display: none;
}

.fss__controls [data-fss-action="prev"] {
	left: 1rem;
}

.fss__controls [data-fss-action="next"] {
	right: 1rem;
}

.fss__controls [data-fss-action="toggle"] {
	right: 1rem;
	margin-top: 32px;
}

.fss__controls button:hover,
.fss__controls button:focus-visible {
	background: rgb(0 0 0 / 0.7);
	color: #fff;
}

/* Reach the very top of the page, whatever wraps the slider */

body :has(.fss) {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
	.fss-slide,
	.fss-slide.is-active {
		transition: none;
	}
}
