
/* PAA Slideshow Source: Gallery
   Constrain slide images to viewport height minus configurable offset.
   Offset is provided as CSS variable on the slideshow root: --paa-sg-vh-offset: 120px;
*/
.wp-block-jetpack-slideshow,
.wp-block-photopress-slideshow {
	--paa-sg-vh-offset: 0px;
}

/* Jetpack/Swiper sometimes sets fixed heights inline on wrapper/container.
   Override so the slide can shrink responsively to viewport height. */
.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_container,
.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_swiper-wrapper,
.wp-block-jetpack-slideshow .swiper-wrapper,
.wp-block-jetpack-slideshow .swiper-slide,
.wp-block-photopress-slideshow .wp-block-photopress-slideshow_container,
.wp-block-photopress-slideshow .wp-block-photopress-slideshow_swiper-wrapper,
.wp-block-photopress-slideshow .swiper-wrapper,
.wp-block-photopress-slideshow .swiper-slide {
	height: auto !important;
}

/* Center images within slide when we remove fixed heights */
.wp-block-jetpack-slideshow .swiper-slide,
.wp-block-photopress-slideshow .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* The actual cap */
.wp-block-jetpack-slideshow img.wp-block-jetpack-slideshow_image,
.wp-block-jetpack-slideshow .swiper-slide img,
.wp-block-photopress-slideshow img.wp-block-photopress-slideshow_image,
.wp-block-photopress-slideshow .swiper-slide img {
	max-height: calc(100vh - var(--paa-sg-vh-offset)) !important;
	max-width: 100% !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain;
}


/* --- Custom navigation (v0.6.0) --- */
/* Hide Jetpack's built-in buttons/pagination/pause so we can use full-area click zones. */
.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_button-prev,
.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_button-next,
.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_button-pause,
.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_pagination,
.wp-block-photopress-slideshow .wp-block-photopress-slideshow_button-prev,
.wp-block-photopress-slideshow .wp-block-photopress-slideshow_button-next,
.wp-block-photopress-slideshow .wp-block-photopress-slideshow_button-pause,
.wp-block-photopress-slideshow .wp-block-photopress-slideshow_pagination {
	display: none !important;
}

/* Make sure the slideshow itself remains clickable. */
.wp-block-jetpack-slideshow,
.wp-block-photopress-slideshow {
	position: relative;
}

.wp-block-jetpack-slideshow.paa-sg-cursor-next,
.wp-block-photopress-slideshow.paa-sg-cursor-next {
	cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'><path d='M28 14 L44 32 L28 50' fill='none' stroke='black' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/></svg>") 44 32, e-resize;
}


.wp-block-jetpack-slideshow.paa-sg-cursor-next,
.wp-block-jetpack-slideshow.paa-sg-cursor-next * ,
.wp-block-photopress-slideshow.paa-sg-cursor-next,
.wp-block-photopress-slideshow.paa-sg-cursor-next * {
	cursor: url("cursor-next.png") 26 16, e-resize !important;
}


/* --- Overlay cursor (v0.6.5) ---
   Safari inconsistently supports custom cursor URLs; instead we draw our own arrow near the pointer.
*/
.wp-block-jetpack-slideshow.paa-sg-cursor-active,
.wp-block-jetpack-slideshow.paa-sg-cursor-active * ,
.wp-block-photopress-slideshow.paa-sg-cursor-active,
.wp-block-photopress-slideshow.paa-sg-cursor-active * {
	cursor: none !important;
}
.paa-sg-pointer {
	position: fixed;
	width: 68px;
	height: 68px;
	transform: translate(-50%, -50%);
	pointer-events: none;
	z-index: 2147483647;
	display: none;
}

.paa-sg-pointer svg {
	width: 100%;
	height: 100%;
}


/* --- Return-to-gallery button (v0.6.8) --- */
.paa-sg-return {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	background: rgba(255,255,255,0.92);
	box-shadow: 0 2px 10px rgba(0,0,0,0.15);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	cursor: pointer;
}

.paa-sg-return svg {
	width: 22px;
	height: 22px;
}

.wp-block-jetpack-slideshow.paa-sg-has-return .paa-sg-return,
.wp-block-photopress-slideshow.paa-sg-has-return .paa-sg-return {
	display: flex;
}


/* Ensure return button restores normal cursor */
.paa-sg-return,
.paa-sg-return * {
	cursor: pointer !important;
}



/* --- Captions under slides (v0.7.1) --- */
/* Force slide content to stack vertically */
.wp-block-jetpack-slideshow .swiper-slide,
.wp-block-photopress-slideshow .swiper-slide {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: flex-start !important;
}

/* Ensure figure itself is vertical */
.wp-block-jetpack-slideshow .swiper-slide figure,
.wp-block-photopress-slideshow .swiper-slide figure {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	margin: 0;
}

/* Caption styling */
.paa-sg-caption {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.4;
	color: #111;
	width: 100%;
	text-align: center;
}
