/* EP Gallery Styles 1.2.0 */

/* ---------- Mosaic ---------- */
/* Before the script runs, a Mosaic gallery looks like the normal grid. */
.wp-block-gallery.is-style-ep-mosaic.ep-mosaic-ready {
	display: block !important;
	position: relative !important;
	gap: 0 !important;
}
.wp-block-gallery.is-style-ep-mosaic.ep-mosaic-ready > figure.wp-block-image {
	position: absolute !important;
	margin: 0 !important;
	max-width: none !important;
	flex: none !important;
}
.wp-block-gallery.is-style-ep-mosaic.ep-mosaic-ready > figure.wp-block-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
}
/* Tile captions: shown over the photo on hover (mouse) or after tapping the "i" button (touch). */
.wp-block-gallery.is-style-ep-mosaic.ep-mosaic-ready > figure.wp-block-image figcaption {
	display: block !important;
	position: absolute !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	top: auto !important;
	width: auto !important;
	max-height: 100% !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 24px 10px 8px !important;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0) 100%) !important;
	color: #fff !important;
	font-size: 12px !important;
	line-height: 1.35 !important;
	text-align: left !important;
	text-shadow: none !important;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}
.wp-block-gallery.is-style-ep-mosaic.ep-mosaic-ready > figure.wp-block-image figcaption::before {
	display: none !important;
}
.wp-block-gallery.is-style-ep-mosaic.ep-mosaic-ready > figure.wp-block-image.ep-cap-open figcaption {
	opacity: 1;
}
@media (hover: hover) {
	.wp-block-gallery.is-style-ep-mosaic.ep-mosaic-ready > figure.wp-block-image:hover figcaption {
		opacity: 1;
	}
}
.ep-cap-toggle {
	position: absolute;
	right: 6px;
	bottom: 6px;
	z-index: 2;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font: italic 700 14px/26px Georgia, serif;
	text-align: center;
	cursor: pointer;
}
.ep-cap-open .ep-cap-toggle {
	background: #06a7e2;
}
.wp-block-gallery.is-style-ep-mosaic.ep-mosaic-ready > figure.wp-block-image.ep-has-toggle figcaption {
	padding-right: 40px !important;
}
@media (hover: hover) {
	.ep-cap-toggle {
		display: none;
	}
	.wp-block-gallery.is-style-ep-mosaic.ep-mosaic-ready > figure.wp-block-image.ep-has-toggle figcaption {
		padding-right: 10px !important;
	}
}
.wp-block-gallery.is-style-ep-mosaic.ep-mosaic-ready > figcaption.blocks-gallery-caption {
	position: absolute;
	left: 0;
	width: 100%;
	margin: 0;
	padding-top: 8px;
}

/* ---------- Slider ---------- */
/* Every photo sits in the same 3:2 frame and the strip is as tall as its tallest slide,
   so the text below never moves when the reader changes photos. */
.wp-block-gallery.is-style-ep-slider {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	gap: 0 !important;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.wp-block-gallery.is-style-ep-slider::-webkit-scrollbar {
	display: none;
}
.wp-block-gallery.is-style-ep-slider > figure.wp-block-image {
	display: flex !important;
	flex-direction: column !important;
	justify-content: flex-start !important;
	flex: 0 0 100% !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	scroll-snap-align: start;
}
.wp-block-gallery.is-style-ep-slider > figure.wp-block-image img {
	flex: none !important;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 3 / 2;
	object-fit: contain !important;
	background: #111;
}
.wp-block-gallery.is-style-ep-slider > figure.wp-block-image figcaption {
	position: static !important;
	flex: 1 0 auto;
	max-height: none !important;
	overflow: visible !important;
	margin: 0 !important;
	padding: 8px 4px 0 !important;
	background: none !important;
	color: inherit !important;
	text-shadow: none !important;
	text-align: center;
	font-size: 0.8125rem;
	line-height: 1.4;
}
.wp-block-gallery.is-style-ep-slider > figure.wp-block-image figcaption::before {
	display: none !important;
}
.ep-slider-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin: 8px 0 0;
}
.ep-slider-nav button {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #06a7e2; /* EP blue */
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.ep-slider-nav button:hover,
.ep-slider-nav button:focus-visible {
	background: #015a78; /* EP dark blue */
}
.ep-slider-nav button:focus-visible {
	outline: 2px solid #015a78;
	outline-offset: 2px;
}
.ep-slider-nav button svg {
	display: block;
	width: 20px;
	height: 20px;
}
.ep-slider-nav button[disabled] {
	background: #06a7e2;
	opacity: 0.35;
	cursor: default;
}
.ep-slider-count {
	min-width: 4.5em;
	text-align: center;
	font-size: 0.8125rem;
}
.ep-slider-caption {
	margin: 6px 0 0;
	text-align: center;
	font-size: 0.8125rem;
}

/* ---------- Canvas slider gallery: same fixed frame ---------- */
.cnvs-gallery-type-slider .gallery-item {
	width: 100%;
}
.cnvs-gallery-type-slider .gallery-item img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: contain;
	background: #111;
}
.cnvs-gallery-type-slider .gallery-caption {
	min-height: 3.4em;
}
.cnvs-gallery-type-slider .flickity-button {
	background: #06a7e2;
	color: #fff;
}
.cnvs-gallery-type-slider .flickity-button:hover {
	background: #015a78;
}
