/**
 * Gallery block style: "Slider" — matches the original oldamericanbusiness.com slideshow.
 * Full width, min(600px, 60vh) tall from 1024px (min(500px, 50vh) below), dots below (12px, 1px #777 border, active #5E5E5E).
 * Works without JavaScript (swipe/scroll); slider.js adds dots and autoplay.
 *
 * The :not(#individual-image) selector mirrors core's gallery specificity so no !important is needed.
 */

.oab-slider,
.wp-block-gallery.has-nested-images.is-style-oab-slider {
	--oab-slider-height: min(500px, 50vh);
}

@media (min-width: 1024px) {

	.oab-slider,
	.wp-block-gallery.has-nested-images.is-style-oab-slider {
		--oab-slider-height: min(600px, 60vh);
	}
}

.wp-block-gallery.has-nested-images.is-style-oab-slider {
	position: relative;
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	margin-block: 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.wp-block-gallery.has-nested-images.is-style-oab-slider::-webkit-scrollbar {
	display: none;
}

.wp-block-gallery.has-nested-images.is-style-oab-slider figure.wp-block-image:not(#individual-image) {
	flex: 0 0 100%;
	width: 100%;
	height: var(--oab-slider-height);
	margin: 0;
	scroll-snap-align: start;
}

.wp-block-gallery.has-nested-images.is-style-oab-slider figure.wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Per-slide focal points, measured on the original. */
.is-style-oab-slider .oab-slide--port-cranes img {
	object-position: 47.99% 75.22%;
}

.is-style-oab-slider .oab-slide--container-yard img {
	object-position: 49.71% 69.13%;
}

.is-style-oab-slider .oab-slide--bulk-carrier img {
	object-position: 49.13% 85.65%;
}

.is-style-oab-slider .oab-slide--warehouse-man img {
	object-position: 50.29% 28.26%;
}

.is-style-oab-slider .oab-slide--container-ship img {
	object-position: 52.62% 88.26%;
}

@media (prefers-reduced-motion: reduce) {

	.wp-block-gallery.has-nested-images.is-style-oab-slider {
		scroll-behavior: auto;
	}
}

/* Dots injected by slider.js */
.oab-slider {
	position: relative;
}

.oab-slider__dots {
	display: flex;
	justify-content: center;
	gap: 24px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
	line-height: 0;
}

.oab-slider__dot {
	box-sizing: border-box;
	width: 12px;
	height: 12px;
	padding: 0;
	border: 1px solid rgb(119, 119, 119);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.oab-slider__dot[aria-current="true"] {
	background: var(--wp--preset--color--body-text);
}

.oab-slider__dot:focus-visible {
	outline: 1px solid var(--wp--preset--color--black);
	outline-offset: 3px;
}
