/**
 * @version     CVS: 1.0.0
 * @package     com_video
 * @copyright   2025 Dima
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @author      Dima <info@dima.ir>
 */

/* Video List Container */
.video-list-container {
	padding: 20px 0;
}

.video-list-header {
	margin-bottom: 30px;
	display: flex;
	justify-content: flex-end;
}

/* Add Video Button */
.btn-add-video {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #ffffff;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-add-video:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
	color: #ffffff;
	text-decoration: none;
}

.btn-add-video i {
	font-size: 18px;
}

/* Video Grid */
.video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

@media (max-width: 768px) {
	.video-grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
		gap: 20px;
	}
}

@media (max-width: 480px) {
	.video-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

/* Video Card */
.video-card {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	height: 100%;
	position: relative;
}

.video-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Video Card Thumbnail */
.video-card-thumbnail {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 Aspect Ratio */
	overflow: hidden;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.video-card-thumbnail img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.video-card:hover .video-card-thumbnail img {
	transform: scale(1.1);
}

.video-placeholder {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: rgba(255, 255, 255, 0.7);
	font-size: 48px;
}

/* Video Card Overlay */
.video-card-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.video-card:hover .video-card-overlay {
	opacity: 1;
}

.play-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 70px;
	height: 70px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 50%;
	color: #667eea;
	font-size: 28px;
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.play-button:hover {
	transform: scale(1.1);
	background: #ffffff;
	color: #764ba2;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.video-state-toggle {
	position: absolute;
	top: 10px;
	right: 10px;
}

.state-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 50%;
	color: #666;
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.state-btn:hover {
	background: #ffffff;
	transform: scale(1.1);
	color: #333;
}

.state-btn.active {
	color: #28a745;
}

.state-btn.active:hover {
	color: #218838;
}

/* Video Card Content */
.video-card-content {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.video-card-title {
	margin: 0 0 12px 0;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
}

.video-card-title a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
}

.video-card-title a:hover {
	color: #667eea;
	text-decoration: none;
}

.video-card-description {
	color: #666;
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 16px 0;
	flex: 1;
}

/* Video Card Meta */
.video-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
	padding-top: 16px;
	border-top: 1px solid #f0f0f0;
}

.video-meta-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #888;
}

.video-meta-item i {
	font-size: 14px;
	color: #667eea;
}

/* Video Card Actions */
.video-card-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding-top: 12px;
	border-top: 1px solid #f0f0f0;
}

.action-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 6px;
	text-decoration: none;
	transition: all 0.3s ease;
	font-size: 16px;
}

.edit-btn {
	background: #f8f9fa;
	color: #667eea;
}

.edit-btn:hover {
	background: #667eea;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.delete-btn {
	background: #f8f9fa;
	color: #dc3545;
}

.delete-btn:hover {
	background: #dc3545;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Empty State */
.video-list-empty {
	padding: 60px 20px;
	text-align: center;
}

.empty-state {
	max-width: 400px;
	margin: 0 auto;
}

.empty-state i {
	font-size: 80px;
	color: #ddd;
	margin-bottom: 20px;
	display: block;
}

.empty-state p {
	font-size: 18px;
	color: #999;
	margin: 0;
}

/* Pagination */
.video-pagination {
	margin-top: 40px;
	padding: 20px 0;
	display: flex;
	justify-content: center;
}

.video-pagination .pagination {
	margin: 0;
}

.video-pagination .pagination li {
	margin: 0 4px;
}

.video-pagination .pagination a,
.video-pagination .pagination span {
	padding: 10px 16px;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	background: #ffffff;
	color: #667eea;
	text-decoration: none;
	transition: all 0.3s ease;
}

.video-pagination .pagination a:hover {
	background: #667eea;
	color: #ffffff;
	border-color: #667eea;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.video-pagination .pagination .active span {
	background: #667eea;
	color: #ffffff;
	border-color: #667eea;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
	.video-list-header {
		margin-bottom: 20px;
	}
	
	.btn-add-video {
		width: 100%;
		justify-content: center;
	}
	
	.video-card-content {
		padding: 16px;
	}
	
	.video-card-title {
		font-size: 18px;
	}
}

/* Animation for card appearance */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.video-card {
	animation: fadeInUp 0.5s ease forwards;
}

.video-card:nth-child(1) { animation-delay: 0.1s; }
.video-card:nth-child(2) { animation-delay: 0.2s; }
.video-card:nth-child(3) { animation-delay: 0.3s; }
.video-card:nth-child(4) { animation-delay: 0.4s; }
.video-card:nth-child(5) { animation-delay: 0.5s; }
.video-card:nth-child(6) { animation-delay: 0.6s; }
