.metaslider.ms-theme-clarity {

	&:not(.has-carousel-mode) .flexslider {
		// Animation fade out
		.youtube .play_button,
		.vjs-big-play-button {
			animation-name: clarity_fadeOut;
			animation-delay: 0.5s;
			animation-duration: 0.5s;
			animation-fill-mode: both;
		}

		// Animation fade in
		.flex-active-slide {
			.caption-wrap .caption,
			.youtube .play_button,
			.vjs-big-play-button {
				animation-name: clarity_fadeIn;
			}
		}
	}

	.flexslider {
		margin-bottom: 60px;

		.slides {
			display: flex;
			flex-direction: row;

			li {
				display: flex !important;
				flex-direction: column;
				background-color: #fff;
				margin-bottom: 30px;
				margin-top: 30px;

				&:focus-within {
					outline: 3px solid;
					outline-offset: 0;
				}
			}

			.ms-vimeo, .ms-youtube {
				background-color: transparent;
			}

			.ms-vimeo .vimeo {
				margin: auto 0;
			}
		}

		.caption-wrap {
			background: #fff;
			border: 1px solid #d5d5d5;
			box-sizing: border-box;
			color: #000;
			display: flex;
			flex: 1;
			line-height: 1.4em;
			margin: 0;
			position: relative;
			opacity: 1;
			width: 100%;
			
			.caption {
				padding: 20px 70px;
				text-align: center;
				width: 100%;
				box-sizing: border-box;

				p:not(:last-of-type) {
					margin: 0 0 15px;
				}
			}
		}

		.flex-direction-nav {
			a {
				height: 38px;
				width: 38px;
				background-repeat: no-repeat;
				background-position: center;
				background-color:  #fff;
				background-size: 18px auto;
				background-image: none;
				box-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
				border: 1px solid #888;
				border-radius: 100%;
				top: calc(50% + 20px);
				transform: translateY(-50%);
				
				&:focus {
					outline: 2px solid;
				}

				&:after {
					background-color: #50585C;
					mask-repeat: no-repeat;
					mask-size: 12px auto;
					content: '';
					display: table;
					width: 100%;
					height: 100%;
					position: absolute;
					top: 0;
					mask-position: center;
				}

				&.flex-prev {
					left: -50px;

					&:after {
						mask-image: url(images/left.svg);
						mask-position: center center;
					}
				}

				&.flex-next {
					right: -50px;

					&:after {
						mask-image: url(images/right.svg);
					}
				}
			}
		}

		.flex-control-paging li a {
			text-indent: 99999px;
			overflow: hidden;
		}
		
		.flex-control-nav {
			bottom: -35px;
	
			li a {
				box-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
				background: #07383C;
				margin: 0 5px;
				border-radius: 100%;
				opacity: 0.5;

				&:hover,
				&:focus {
					opacity: 1;
				}

				&:focus {
					outline: 2px solid;
				}

				&.flex-active {
					background: #07383C;
					opacity: 1;
				}
			}
		}

		.flex-pauseplay a::before {
			font-size: 16px;
		}

		.flex-pauseplay a {
			bottom: -35px;
			color: #fff;
			height: 32px;
			text-align: center;
			width: 32px;
			background-color: rgba(0,0,0,0.8);
			
		}

		.flex-pauseplay a:focus {
			outline: 2px solid black;
			border: 1px solid #fff;
		}

		.flex-control-paging li a {
			width: 20px;
			height: 20px;
			font-size: 0;
		}
	}

	&.has-onhover-arrows {
		.flex-direction-nav li {
			opacity: 0;
		}
		&:hover {
			.flex-direction-nav {
				li {
					opacity: 1;
				}
				a {
					opacity: 1;
				}
			}
		}
	}
}

@keyframes clarity_fadeIn {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

@keyframes clarity_fadeOut {
	0% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

@media (max-width:576px) {
	.metaslider.ms-theme-clarity .flexslider {

		.caption-wrap .caption {
			padding: 20px;
		}
	}
}