/**
*	Overwrite Default Carousel CSS
*	Improve visual accessibility & contrast
*/

.carousel-inner.list-unstyled {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ce-carousel figure {
	margin: 0;
	display: flex;
	justify-content: center;
}

.ce-carousel .sr-only {
	position: absolute;
	left: -100%;
	top: 100%;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.carousel-item > a {
	text-decoration: none;
	display: block;
	line-height: 0;
	border: 0;
}

.carousel-item > a[target="_blank"],
.carousel-item > a.external-link,
.carousel-item > a.external-link-new-window {
	/* prevent external link icon */
	padding-right: 0;
	background-image: none;
}

.carousel-item > a:hover,
.carousel-item :focus {
	border: 0;
}

.ce-carousel .carousel-control {
	list-style: none;
}

.ce-carousel .carousel-control-cycle {
	border: 0;
	left: 0;
	bottom: 0;
	border-radius: 0;
	transform: translate(0,0);
}

.ce-carousel .carousel-control-cycle.pause .icon {
	width: 16px;
	height: 16px;
	box-sizing: border-box;
}

.btn.carousel-control-cycle:focus {
	outline: none;
}

.btn.carousel-control-cycle:focus::before {
	content: "";
	position: absolute;
	padding: .5rem;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	border: 3px solid #3070b3;
	background-color: #ffffff;
	z-index: -2;
}

.btn.carousel-control-cycle:focus::after {
	content: "";
	position: absolute;
	padding: .5rem;
	box-sizing: border-box;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, .66);
	z-index: -1;
}

.btn.carousel-control-cycle.pause .icon {
	border-width: 0 .25rem 0 .25rem;
	width: 1rem;
	height: 1rem;
}

.carousel-control-cycle.cycle .icon {
	border-width: .5rem 0 .5rem 1rem;
	width: 0;
	height: 0;
}

.ce-carousel .carousel-control a {
	border: 0;
	padding: 0;
}

.ce-carousel .carousel-control a:focus {
	outline: none;
}

.ce-carousel .carousel-control a:focus::after {
	content: "";
	position: absolute;
	box-sizing: border-box;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 3px solid #3070b3;
	background-color: #ffffff;
	z-index: -1;
}


/* Remove opacity from controls */
.carousel-control-prev,
.carousel-control-next {
	opacity: 1;
}

/* Add backgrounds for contrast */
.carousel-control-prev-icon,
.carousel-control-next-icon {
	padding: 2.5rem 1.5rem;
	background-size: 1rem;
}

.carousel-control-prev-icon,
.carousel-control-next-icon,
.carousel-control-cycle,
.carousel-caption {
	background-color: rgba(0, 0, 0, .55);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
	width: 8px;
}

.carousel-control-prev {
	justify-content: flex-start;
}

.carousel-control-next {
	justify-content: flex-end;
}

.carousel-caption {
	margin-top: 0;
	right: 20px;
	left: initial;
	max-width: 80%; /* calc falback */
	/* 100% - spacing - width of button */
	max-width: calc(100% - 80px - 56px);
	padding: .5rem;
}

.carousel-caption h5 {
	color: #ffffff;
	margin-top: 0;
	margin-bottom: .25em;
	font-weight: bold;
}

.carousel-caption *:empty {
	display: none;
}


/* Reposition carousel indicators and recolor */
.carousel-indicators {
	top: 100%;
	right: initial;
	bottom: initial;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	padding: .25rem;
}

.carousel-indicators li {
	background-color: #0A5096;
}
