.ubcc-banner {
	position: relative;
	overflow: hidden;
	background: #e9e9e9;
}

.ubcc-banner__viewport {
	position: relative;
	/* An explicit width stops max-height from narrowing the box via aspect-ratio */
	width: 100%;
	aspect-ratio: var(--ubcc-banner-aspect, 16 / 10);
	max-height: var(--ubcc-banner-max, none);
}

/* Older browsers: keep the ratio without the height cap */
@supports not (aspect-ratio: 1) {
	.ubcc-banner__viewport {
		height: 0;
		padding-bottom: var(--ubcc-banner-ratio, 62.5%);
	}
}

.ubcc-banner__slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	visibility: hidden;
}

.ubcc-banner__slide.is-active,
.ubcc-banner__slide.is-leaving {
	visibility: visible;
}

.ubcc-banner__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.ubcc-banner__link {
	display: block;
	width: 100%;
	height: 100%;
}

/* Slide transition */
.ubcc-banner--slide .ubcc-banner__slide.is-animating {
	transition: transform 0.6s ease;
}

/* Fade transition */
.ubcc-banner--fade .ubcc-banner__slide {
	opacity: 0;
	transition: opacity 0.8s ease, visibility 0s 0.8s;
}

.ubcc-banner--fade .ubcc-banner__slide.is-active {
	opacity: 1;
	transition: opacity 0.8s ease, visibility 0s;
}

.ubcc-banner__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 60px 20px 50px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
	color: #fff;
	font-size: 28px;
	line-height: 1.3;
	text-align: center;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.ubcc-banner__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	cursor: pointer;
	transition: background 0.2s;
}

.ubcc-banner__arrow:hover,
.ubcc-banner__arrow:focus-visible {
	background: rgba(0, 0, 0, 0.65);
}

.ubcc-banner__arrow::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 12px;
	border: solid #fff;
	border-width: 0 0 3px 3px;
}

.ubcc-banner__arrow--prev {
	left: 20px;
}

.ubcc-banner__arrow--prev::before {
	transform: translate(-30%, -50%) rotate(45deg);
}

.ubcc-banner__arrow--next {
	right: 20px;
}

.ubcc-banner__arrow--next::before {
	transform: translate(-70%, -50%) rotate(-135deg);
}

.ubcc-banner__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 20px;
	z-index: 2;
	text-align: center;
}

.ubcc-banner__dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	margin: 0 5px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: transparent;
	box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
	cursor: pointer;
}

.ubcc-banner__dot.is-active {
	background: #fff;
}

@media (max-width: 767px) {
	.ubcc-banner__arrow {
		width: 34px;
		height: 34px;
		margin-top: -17px;
	}

	.ubcc-banner__arrow--prev {
		left: 10px;
	}

	.ubcc-banner__arrow--next {
		right: 10px;
	}

	.ubcc-banner__caption {
		padding: 30px 12px 36px;
		font-size: 18px;
	}

	.ubcc-banner__dots {
		bottom: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ubcc-banner__slide,
	.ubcc-banner__slide.is-animating {
		transition: none !important;
	}
}
