/* AI Video Importer — front-end click-to-play */

.avi-featured-video {
	width: 100%;
	max-width: 100%;
	margin: 0 0 1em;
	display: block;
}

.avi-click-to-play {
	position: relative;
	width: 100% !important;
	max-width: none !important;
	aspect-ratio: 16 / 9;
	background: #000;
	cursor: pointer;
	display: block;
	overflow: hidden;
	border-radius: 4px;
	min-height: 240px; /* Fallback for browsers without aspect-ratio */
	box-sizing: border-box;
}

@supports (aspect-ratio: 16 / 9) {
	.avi-click-to-play { min-height: 0; }
}

.avi-click-to-play .avi-poster {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	max-width: none !important;
}

.avi-click-to-play .avi-play-overlay {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.25);
	transition: background 0.2s;
}

.avi-click-to-play:hover .avi-play-overlay {
	background: rgba(0, 0, 0, 0.4);
}

.avi-click-to-play .avi-play-btn {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease-out, background 0.15s;
	padding: 0;
	margin: 0;
}

.avi-click-to-play:hover .avi-play-btn {
	transform: scale(1.1);
	background: #fff;
}

.avi-click-to-play .avi-play-btn svg {
	width: 36px;
	height: 36px;
	margin-left: 4px; /* optical centering of triangle */
}

/* When iframe replaces the poster after click */
.avi-click-to-play.avi-playing {
	cursor: default;
}

.avi-click-to-play.avi-playing iframe,
.avi-click-to-play iframe {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
	max-width: none !important;
	display: block;
}

/* HLS native player wrapper (for prefer_direct_media mode) */
.avi-video-html5,
.avi-video-hls {
	width: 100%;
	max-width: 100%;
	background: #000;
	display: block;
}

.avi-video-html5 video,
.avi-video-hls video {
	width: 100% !important;
	max-width: 100% !important;
	height: auto;
	display: block;
}
