/**
 * Featured Video Styles
 * 
 * Styling cho video thumbnail
 * 
 * @package PinterHVN_Core
 * @since   1.2.0
 */

/* ========================================
   Featured Video Base Styles
   ======================================== */

.featured-video {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	cursor: pointer;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hover effect */
.featured-video:hover {
	opacity: 0.95;
	transform: scale(1.02);
}

/* ========================================
   Grid/Card Context
   ======================================== */

.asset-card .featured-video,
.grid-item .featured-video {
	border-radius: 8px;
	max-height: 400px;
}

/* ========================================
   Loading State
   ======================================== */

.featured-video:not([data-loaded]) {
	background: #f0f0f0;
	min-height: 200px;
	position: relative;
}

.featured-video:not([data-loaded])::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	border: 3px solid #e0e0e0;
	border-top-color: #666;
	border-radius: 50%;
	animation: video-spinner 0.8s linear infinite;
}

@keyframes video-spinner {
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
	.featured-video:hover {
		transform: none; /* Disable transform on mobile */
	}
}

/* ========================================
   Admin Context (Backend)
   ======================================== */

.wp-admin .featured-video {
	max-width: 100%;
	height: auto;
}

/* Admin column thumbnail */
.column-thumbnail .featured-video {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
}

/* ========================================
   Accessibility
   ======================================== */

.featured-video:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
	.featured-video {
		transition: none;
	}
	
	.featured-video:hover {
		transform: none;
	}
}

/* ========================================
   Dark Mode Support
   ======================================== */

@media (prefers-color-scheme: dark) {
	.featured-video:not([data-loaded]) {
		background: #2a2a2a;
	}
	
	.featured-video:not([data-loaded])::before {
		border-color: #444;
		border-top-color: #999;
	}
}
