/* Shortcode Video Player CSS - HTML5 Player */

/* Container chính cho HTML5 video player */
.html5-video-container {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	background: #000;
	overflow: hidden;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	transition: box-shadow 0.3s ease;
}

.html5-video-container:hover {
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Video element */
.html5-video-container video {
	width: 100%;
	height: auto;
	min-height: 200px;
	display: block;
	background: #000;
	outline: none;
}

/* Responsive design */
@media (max-width: 768px) {
	.html5-video-container {
		border-radius: 4px;
		margin: 0;
	}

	.html5-video-container video {
		min-height: 180px;
	}
}

@media (max-width: 480px) {
	.html5-video-container video {
		min-height: 150px;
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.html5-video-container {
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.html5-video-container {
		border: 2px solid #fff;
	}
}

/* Focus styles for accessibility */
.html5-video-container video:focus {
	outline: 3px solid #007cba;
	outline-offset: 2px;
}

/* Print styles */
@media print {
	.html5-video-container {
		display: none;
	}
}

/* Utility classes */
.html5-video-container.fullwidth {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	border-radius: 0;
}

.html5-video-container.fullheight {
	height: 100vh;
	width: auto;
	max-width: 100vw;
}

.html5-video-container.compact {
	max-width: 480px;
}

.html5-video-container.large {
	max-width: 1200px;
}

/* Poster image optimization */
.html5-video-container video[poster] {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Landscape và portrait orientations */
.html5-video-container.landscape {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.html5-video-container.portrait {
	height: 100vh;
	width: auto;
	max-width: 100%;
	aspect-ratio: 9 / 16;
}

/* Fallback cho trình duyệt không hỗ trợ aspect-ratio */
@supports not (aspect-ratio: 1) {
	.html5-video-container.landscape {
		padding-top: 56.25%; /* 16:9 aspect ratio */
		height: 0;
		position: relative;
	}

	.html5-video-container.portrait {
		padding-left: 177.78%; /* 9:16 aspect ratio */
		width: 0;
		position: relative;
	}

	.html5-video-container.landscape video,
	.html5-video-container.portrait video {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}
}

/* Force orientations */
.html5-video-container.force-landscape {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.html5-video-container.force-portrait {
	height: 100vh;
	width: auto;
	max-width: 100%;
	aspect-ratio: 9 / 16;
}

/* Mobile landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
	.html5-video-container.portrait {
		height: 90vh;
	}
}
