/* ==========================================================================
   Amr Slider — front-end styles (single file, no dependencies).
   ========================================================================== */

.amr-slider {
	--amr-slider-radius: 0px;
	position: relative;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	isolation: isolate;
	background: var(--amr-slider-bg, transparent);
}

/* Width ------------------------------------------------------------------- */
/* Always full-bleed: break out of any constrained content column. */
.amr-slider--full {
	max-width: none;
	width: auto;
	margin-inline: calc(50% - 50vw);
}

.amr-slider__viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
	touch-action: pan-y pinch-zoom;
	border-radius: var(--amr-slider-radius);
}

/*
 * Height is driven by the images themselves: the tallest slide sets the track
 * height, so a 1280×720 desktop image gives a 16:9 box and a 720×1280 mobile
 * image gives a portrait box (the <picture> source swaps them per breakpoint).
 */

.amr-slider__track {
	display: flex;
	align-items: stretch;
	width: 100%;
	will-change: transform;
	transform: translate3d(0, 0, 0);
	transition: transform 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
	backface-visibility: hidden;
}

.amr-slider.is-dragging .amr-slider__track {
	transition: none;
}

.amr-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	user-select: none;
	-webkit-user-select: none;
}

.amr-slide__media,
.amr-slide__link {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
}

.amr-slide__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	vertical-align: middle;
	object-fit: cover;
	object-position: center;
}

/* Per-slide fit override (set per slide in the slide editor). */
.amr-slider .amr-slide--fit-cover .amr-slide__img {
	object-fit: cover;
	object-position: center;
}

.amr-slider .amr-slide--fit-contain .amr-slide__img {
	object-fit: contain;
	object-position: center;
}

/* Controls stay hidden until JS runs, so they never appear broken. */
.amr-slider__arrow,
.amr-slider__dots,
.amr-slider__toggle {
	display: none;
}

.amr-slider.is-ready .amr-slider__arrow {
	display: flex;
	margin: 0.35em;
}

.amr-slider.is-ready .amr-slider__dots {
	display: flex;
}

.amr-slider.is-ready .amr-slider__toggle {
	display: inline-flex;
	margin: 1em;
}

/* Arrows ------------------------------------------------------------------ */
.amr-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: rgba(17, 17, 17, 0.45);
	color: #fff;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 160ms ease, background-color 160ms ease;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.amr-slider__arrow:hover,
.amr-slider__arrow:focus-visible {
	opacity: 1;
	background: rgba(17, 17, 17, 0.7);
}

.amr-slider__arrow:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.amr-slider__arrow[disabled] {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

.amr-slider__arrow svg {
	display: block;
	width: 22px;
	height: 22px;
}

.amr-slider__arrow--prev {
	inset-inline-start: 12px;
}

.amr-slider__arrow--next {
	inset-inline-end: 12px;
}

/* Dots -------------------------------------------------------------------- */
.amr-slider__dots {
	position: absolute;
	inset-inline: 0;
	bottom: 14px;
	z-index: 2;
	gap: 8px;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.amr-slider__dot {
	pointer-events: auto;
	width: 8px;
	height: 8px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(17, 17, 17, 0.45);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: width 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

.amr-slider__dot[aria-current="true"] {
	width: 26px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.35);
}

.amr-slider__dot:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* Autoplay pause / play --------------------------------------------------- */
.amr-slider__toggle {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-end: 10px;
	z-index: 2;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(17, 17, 17, 0.45);
	color: #fff;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 160ms ease, background-color 160ms ease;
}

.amr-slider__toggle:hover,
.amr-slider__toggle:focus-visible {
	opacity: 1;
	background: rgba(17, 17, 17, 0.7);
}

.amr-slider__toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.amr-slider__toggle-icon {
	display: block;
	width: 12px;
	height: 12px;
}

.amr-slider__toggle-icon--pause {
	border-inline: 3px solid currentColor;
	width: 10px;
	height: 12px;
}

.amr-slider__toggle-icon--play {
	display: none;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent currentColor;
}

.amr-slider.is-paused .amr-slider__toggle-icon--pause {
	display: none;
}

.amr-slider.is-paused .amr-slider__toggle-icon--play {
	display: block;
}

/* Screen-reader helper (in case the theme does not ship one). */
.amr-slider .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 767px) {
	.amr-slider__arrow {
		width: 38px;
		height: 38px;
	}

	.amr-slider__arrow svg {
		width: 20px;
		height: 20px;
	}

	.amr-slider__arrow--prev {
		inset-inline-start: 8px;
	}

	.amr-slider__arrow--next {
		inset-inline-end: 8px;
	}

	.amr-slider__dots {
		bottom: 10px;
	}
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.amr-slider__track {
		transition: none;
	}

	.amr-slider__dot {
		transition: none;
	}
}
