/* Container (gallery extension + standalone block) */
.wp-block-gallery.gst-center-peek,
.wp-block-c2-carousel.gst-center-peek,
.c2-carousel.gst-center-peek { position: relative; }

/* Fixed-size viewport driven by explicit width/height (if set).
   Height otherwise comes from the slide frames. */
.wp-block-gallery.gst-center-peek .gst-viewport,
.wp-block-c2-carousel.gst-center-peek .gst-viewport,
.c2-carousel.gst-center-peek .gst-viewport {
	position: relative;
	overflow: hidden;
	width: 100%; /* inherits container width unless user sets one */
}

/* Track height is driven by slides */
.wp-block-gallery.gst-center-peek .gst-track,
.wp-block-c2-carousel.gst-center-peek .gst-track,
.c2-carousel.gst-center-peek .gst-track {
	display: flex !important;
	align-items: center !important;
	will-change: transform;
	gap: 16px; /* JS syncs this; here as default */
}

/* Slides fill viewport height and are centered */
.wp-block-gallery.gst-center-peek .gst-slide,
.wp-block-c2-carousel.gst-center-peek .gst-slide,
.c2-carousel.gst-center-peek .gst-slide {
	flex: 0 0 auto;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

/* Images scale to fit - !important overrides WordPress core inline styles */
.wp-block-gallery.gst-center-peek .gst-slide img,
.wp-block-c2-carousel.gst-center-peek .gst-slide img,
.c2-carousel.gst-center-peek .gst-slide img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: contain; /* keep entire image visible */
	display: block;
}

/* Override default figure margins — !important needed to beat WordPress core
   .wp-block-gallery.has-nested-images:not(.is-cropped) figure:not(#individual-image)
   which sets margin-bottom:auto and pushes slides to top in flex containers. */
.wp-block-gallery.gst-center-peek figure.gst-slide,
.wp-block-c2-carousel.gst-center-peek figure.gst-slide,
.c2-carousel.gst-center-peek figure.gst-slide { margin: 0 !important; }

/* If captions exist, overlay them at the bottom */
.wp-block-gallery.gst-center-peek .gst-slide figcaption,
.wp-block-c2-carousel.gst-center-peek .gst-slide figcaption,
.c2-carousel.gst-center-peek .gst-slide figcaption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,.5);
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	padding: 6px 8px;
}

/* Arrows - positioned relative to gallery container (outside viewport)
   so buttons can be placed beyond the slide area without being clipped.
   Customize with e.g.: .gst-prev { left: -40px; } .gst-next { right: -40px; } */
.wp-block-gallery.gst-center-peek .gst-nav,
.wp-block-c2-carousel.gst-center-peek .gst-nav,
.c2-carousel.gst-center-peek .gst-nav {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	pointer-events: none;
}

.wp-block-gallery.gst-center-peek .gst-prev,
.wp-block-gallery.gst-center-peek .gst-next,
.wp-block-c2-carousel.gst-center-peek .gst-prev,
.wp-block-c2-carousel.gst-center-peek .gst-next,
.c2-carousel.gst-center-peek .gst-prev,
.c2-carousel.gst-center-peek .gst-next {
	pointer-events: auto;
	background: rgba(0,0,0,.4);
	color: #fff;
	border: 0;
	border-radius: 3px;
	font-size: 22px;
	line-height: 1;
	padding: 8px 10px;
	margin: 0 8px;
	cursor: pointer;
	transition: background .2s ease;
}

.wp-block-gallery.gst-center-peek .gst-prev:hover,
.wp-block-gallery.gst-center-peek .gst-next:hover,
.wp-block-c2-carousel.gst-center-peek .gst-prev:hover,
.wp-block-c2-carousel.gst-center-peek .gst-next:hover,
.c2-carousel.gst-center-peek .gst-prev:hover,
.c2-carousel.gst-center-peek .gst-next:hover { background: rgba(0,0,0,.6); }

/* Dots */
.wp-block-gallery.gst-center-peek .gst-dots,
.wp-block-c2-carousel.gst-center-peek .gst-dots,
.c2-carousel.gst-center-peek .gst-dots {
	position: absolute; left: 0; right: 0; bottom: 6px;
	display: flex; justify-content: center; gap: 6px;
}

.wp-block-gallery.gst-center-peek .gst-dot,
.wp-block-c2-carousel.gst-center-peek .gst-dot,
.c2-carousel.gst-center-peek .gst-dot {
	width: 10px; height: 10px; border-radius: 50%; border: 0;
	background: rgba(255,255,255,.55); cursor: pointer; padding: 0;
}

.wp-block-gallery.gst-center-peek .gst-dot.is-active,
.wp-block-c2-carousel.gst-center-peek .gst-dot.is-active,
.c2-carousel.gst-center-peek .gst-dot.is-active { background: #fff; }

/* Preview height: inactive slides shrink, active slides are full height.
   Height values are set via inline JS (pixel-based); CSS handles the transition. */
.gst-center-peek.has-preview-height .gst-slide {
	transition: height 420ms ease;
}

/* Focus outlines for a11y */
.wp-block-gallery.gst-center-peek .gst-prev:focus,
.wp-block-gallery.gst-center-peek .gst-next:focus,
.wp-block-gallery.gst-center-peek .gst-dot:focus,
.wp-block-c2-carousel.gst-center-peek .gst-prev:focus,
.wp-block-c2-carousel.gst-center-peek .gst-next:focus,
.wp-block-c2-carousel.gst-center-peek .gst-dot:focus,
.c2-carousel.gst-center-peek .gst-prev:focus,
.c2-carousel.gst-center-peek .gst-next:focus,
.c2-carousel.gst-center-peek .gst-dot:focus {
	outline: 2px solid #72aee6; outline-offset: 2px;
}
