/* MBS Home Slider. Sizes use container query units so the slide scales as one piece, like the old LayerSlider. */

.mbs-slider {
	container-type: inline-size;
	position: relative;
	width: 100%;
	max-width: 860px;
	margin: 0 auto;
	font-family: Helvetica, Arial, sans-serif;
}

.mbs-slider__viewport {
	position: relative;
	aspect-ratio: 860 / 510;
	overflow: hidden;
	border-radius: 6px;
	box-shadow: 0 3px 15px -5px #000;
	background: #ddd;
}

.mbs-slider__slide {
	position: absolute;
	inset: 0;
	visibility: hidden;
}

.mbs-slider__slide.is-active,
.mbs-slider__slide.is-leaving {
	visibility: visible;
}

.mbs-slider__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.mbs-slider__caption {
	position: absolute;
	top: 2.4cqw;
	box-sizing: border-box;
	width: 41.7%;
	min-width: 190px;
	padding: clamp(12px, 3.6cqw, 20px);
	border-radius: 5px;
	background-color: #666;
	background-color: rgba(0, 0, 0, .8);
	color: #fff;
	white-space: normal;
}

.mbs-slider__caption::after {
	content: "";
	display: table;
	clear: both;
}

.mbs-slider__caption--left {
	left: 2.4cqw;
}

.mbs-slider__caption--right {
	right: 2.4cqw;
}

.mbs-slider .mbs-slider__heading {
	margin: 0 0 clamp(12px, 7.25cqw, 40px);
	padding: 0;
	color: #fff;
	font-family: inherit;
	font-size: max(14px, 3.65cqw);
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
}

.mbs-slider .mbs-slider__button {
	float: right;
	padding: 5px 10px;
	border-radius: 5px;
	background-color: #697e57;
	color: #fff !important;
	font-size: max(12px, 2.56cqw);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none !important;
}

.mbs-slider .mbs-slider__button:hover,
.mbs-slider .mbs-slider__button:focus-visible {
	background-color: #798e67;
}

/* Controls: arrows and dots appear on hover or keyboard focus, like the old slider. */

.mbs-slider button {
	margin: 0;
	border: 0;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	text-shadow: none;
}

.mbs-slider .mbs-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 36px;
	height: 56px;
	padding: 0;
	transform: translateY(-50%);
	border-radius: 4px;
	background: rgba(0, 0, 0, .45);
	color: #fff;
	font-size: 40px;
	opacity: 0;
	transition: opacity .3s, background-color .2s;
}

.mbs-slider .mbs-slider__arrow span {
	position: relative;
	top: -3px;
}

.mbs-slider__arrow--prev {
	left: 10px;
}

.mbs-slider__arrow--next {
	right: 10px;
}

.mbs-slider .mbs-slider__arrow:hover,
.mbs-slider .mbs-slider__arrow:focus-visible {
	background: rgba(0, 0, 0, .7);
}

.mbs-slider__controls {
	position: absolute;
	bottom: 10px;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	transform: translateX(-50%);
	border-radius: 14px;
	background: rgba(0, 0, 0, .45);
	opacity: 0;
	transition: opacity .3s;
}

.mbs-slider:hover .mbs-slider__arrow,
.mbs-slider:hover .mbs-slider__controls,
.mbs-slider:focus-within .mbs-slider__arrow,
.mbs-slider:focus-within .mbs-slider__controls,
.mbs-slider.is-paused .mbs-slider__controls {
	opacity: 1;
}

@media (hover: none) {
	.mbs-slider .mbs-slider__controls {
		opacity: 1;
	}
}

.mbs-slider .mbs-slider__dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: transparent;
}

.mbs-slider .mbs-slider__dot[aria-current="true"] {
	background: #fff;
}

.mbs-slider .mbs-slider__toggle {
	position: relative;
	width: 16px;
	height: 16px;
	padding: 0;
	background: transparent;
}

/* Pause icon: two bars. Play icon: triangle. */
.mbs-slider__toggle-icon {
	position: absolute;
	inset: 2px 3px;
	border-left: 4px solid #fff;
	border-right: 4px solid #fff;
}

.mbs-slider.is-paused .mbs-slider__toggle-icon {
	inset: 1px 2px;
	width: 0;
	height: 0;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
	border-left: 12px solid #fff;
	border-right: 0;
}

.mbs-slider button:focus-visible,
.mbs-slider .mbs-slider__button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.mbs-slider .mbs-slider__arrow,
	.mbs-slider__controls {
		transition: none;
	}
}
