.sis-slider {
	position: relative;
	width: 100%;
	height: var(--sis-height, 400px);
	overflow: hidden;
	border-radius: 4px;
	background: #eee;
}

.sis-track {
	position: relative;
	width: 100%;
	height: 100%;
}

.sis-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease, transform 0.5s ease;
	transform: translateX(0);
}

.sis-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

/* Slide transition: incoming/outgoing slides shift horizontally. */
.sis-slider[data-transition="slide"] .sis-slide {
	transform: translateX(100%);
}
.sis-slider[data-transition="slide"] .sis-slide.is-active {
	transform: translateX(0);
}
.sis-slider[data-transition="slide"] .sis-slide.is-prev {
	transform: translateX(-100%);
}

/* Fade transition: no horizontal movement, opacity only. */
.sis-slider[data-transition="fade"] .sis-slide {
	transform: none;
}

.sis-slide-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--sis-position, center);
	display: block;
}

/* Show the full image, uncropped (letterboxed inside the slider). */
.sis-slider.sis-fit-contain .sis-slide-image {
	object-fit: contain;
	object-position: center;
}

.sis-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	border: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.sis-arrow:hover {
	background: rgba(0, 0, 0, 0.65);
}

.sis-prev {
	left: 12px;
}

.sis-next {
	right: 12px;
}

.sis-dots {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	display: flex;
	gap: 8px;
}

.sis-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: rgba(255, 255, 255, 0.4);
	padding: 0;
	cursor: pointer;
}

.sis-dot.is-active {
	background: #fff;
}

@media (max-width: 600px) {
	.sis-arrow {
		width: 32px;
		height: 32px;
		font-size: 13px;
	}

	/* A fixed desktop height crops aggressively on narrow screens, since the
	   width shrinks a lot more than the height does. Switch to a taller
	   aspect ratio instead so images crop much less on phones. */
	.sis-slider {
		height: auto;
		aspect-ratio: 4 / 3;
	}
}

/* Photo details: each slide is the image with a caption bar underneath. */
.sis-slide {
	display: flex;
	flex-direction: column;
}

.sis-slide-media {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}

.sis-slide-media .sis-slide-image {
	position: absolute;
	top: 0;
	left: 0;
}

.sis-details {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 12px 18px;
	background: #ffffff;
	color: #444444;
	/* Fixed px sizes (not rem) so themes with a small root font size can't shrink the caption. */
	font-size: 16px;
	line-height: 1.4;
	text-align: left;
}

.sis-details .sis-detail-title {
	font-weight: 700;
	font-size: 18px;
	color: #1d2327;
}

.sis-details .sis-detail-author,
.sis-details .sis-detail-source {
	font-style: italic;
}

.sis-details .sis-detail-description {
	font-size: 15px;
}

/* The caption bar sits where the dots used to be, so move the dots up. */
.sis-slider.sis-has-details .sis-dots {
	bottom: auto;
	top: 12px;
}

@media (max-width: 600px) {
	.sis-details {
		padding: 10px 14px;
		font-size: 15px;
	}

	.sis-details .sis-detail-title {
		font-size: 16px;
	}

	.sis-details .sis-detail-description {
		font-size: 14px;
	}
}

/* Details location: "Over the photo" variants. The caption floats on a dark
   band over the image instead of taking its own row. */
.sis-details-overlay-bottom .sis-details,
.sis-details-overlay-top .sis-details {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 1;
	background: rgba(0, 0, 0, 0.6);
	color: #ffffff;
}

.sis-details-overlay-bottom .sis-details {
	bottom: 0;
}

.sis-details-overlay-top .sis-details {
	top: 0;
}

.sis-details-overlay-bottom .sis-details .sis-detail-title,
.sis-details-overlay-top .sis-details .sis-detail-title {
	color: #ffffff;
}

/* Keep the dots clear of the caption: bottom caption -> dots at top (already
   the default when details exist); top caption -> dots back at the bottom. */
.sis-slider.sis-details-overlay-top .sis-dots {
	top: auto;
	bottom: 12px;
}
