/**
 * Smart Video Shortcode.
 *
 * @package fitwerft-design
 */

.smart-video {
	width: 100%;
	margin: 0 auto 1.5rem;
}

.smart-video__media {
	position: relative;
	width: 100%;
	aspect-ratio: var(--smart-video-aspect-ratio, 16 / 9);
	overflow: hidden;
	background: #111111;
}

.smart-video__element {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #111111;
}

.smart-video__play-button {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(4rem, 14vw, 6rem);
	height: clamp(4rem, 14vw, 6rem);
	padding: 0;
	border: 3px solid rgba(255, 255, 255, 0.92);
	border-radius: 50%;
	background: rgba(1, 99, 196, 0.86);
	box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.28);
	color: #ffffff;
	cursor: pointer;
	transform: translate(-50%, -50%);
	transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.smart-video__play-button:hover,
.smart-video__play-button:focus {
	background: rgba(151, 190, 14, 0.94);
	box-shadow: 0 1rem 2.25rem rgba(0, 0, 0, 0.34);
	transform: translate(-50%, -50%) scale(1.05);
}

.smart-video__play-button:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 4px;
}

.smart-video__play-button:disabled {
	cursor: wait;
	opacity: 0.82;
}

.smart-video.is-active .smart-video__play-button {
	opacity: 0;
	pointer-events: none;
}

.smart-video.has-error .smart-video__play-button {
	opacity: 0;
	pointer-events: none;
}

.smart-video__play-icon {
	display: block;
	width: 0;
	height: 0;
	margin-left: 0.35rem;
	border-top: 0.9rem solid transparent;
	border-bottom: 0.9rem solid transparent;
	border-left: 1.35rem solid currentColor;
}

.smart-video__message {
	position: absolute;
	right: 1rem;
	bottom: 1rem;
	left: 1rem;
	z-index: 3;
	margin: 0;
	padding: 0.75rem 1rem;
	background: rgba(0, 0, 0, 0.74);
	color: #ffffff;
	font-size: 0.95rem;
	line-height: 1.4;
	text-align: center;
}

.smart-video .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.smart-video-error {
	padding: 0.75rem 1rem;
	background: #fff4f4;
	color: #8a1f11;
}
