/**
 * @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 View Container */
.video-view-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
}

/* Page Header */
.video-page-header {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid #f0f0f0;
}

.video-page-header h1 {
	font-size: 32px;
	font-weight: 700;
	color: #333;
	margin: 0;
}

/* Main Content */
.video-main-content {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 40px;
	margin-bottom: 40px;
}

@media (max-width: 1024px) {
	.video-main-content {
		grid-template-columns: 1fr;
		gap: 30px;
	}
}

/* Video Player Section */
.video-player-section {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.video-player-wrapper {
	position: relative;
	width: 100%;
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.video-player-wrapper video {
	width: 100%;
	height: auto;
	display: block;
}

/* Plyr Customization */
.plyr {
	border-radius: 12px;
}

.plyr__video-wrapper {
	border-radius: 12px;
	overflow: hidden;
}

.plyr__control--overlaid {
	background: rgba(102, 126, 234, 0.9);
	border-radius: 50%;
	transition: all 0.3s ease;
}

.plyr__control--overlaid:hover {
	background: rgba(102, 126, 234, 1);
	transform: scale(1.1);
}

.plyr__control.plyr__tab-focus,
.plyr__control:hover {
	background: rgba(102, 126, 234, 0.1);
}

.plyr__progress__played {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.plyr__volume__progress {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.plyr__menu__container .plyr__control[role="menuitemradio"][aria-checked="true"]::before {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* No Video Message */
.video-no-video {
	width: 100%;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.no-video-message {
	text-align: center;
	color: rgba(255, 255, 255, 0.9);
}

.no-video-message i {
	font-size: 64px;
	margin-bottom: 16px;
	display: block;
}

.no-video-message p {
	font-size: 18px;
	margin: 0;
}

/* Video Title Section */
.video-title-section {
	padding: 20px 0;
}

.video-title {
	font-size: 28px;
	font-weight: 600;
	color: #333;
	margin: 0;
	line-height: 1.4;
}

/* Video Info Section */
.video-info-section {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

/* Video Description */
.video-description {
	background: #ffffff;
	padding: 24px;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.video-description h3 {
	font-size: 20px;
	font-weight: 600;
	color: #333;
	margin: 0 0 16px 0;
	padding-bottom: 12px;
	border-bottom: 2px solid #f0f0f0;
}

.description-content {
	color: #666;
	line-height: 1.8;
	font-size: 15px;
}

.description-content p {
	margin: 0 0 12px 0;
}

.description-content p:last-child {
	margin-bottom: 0;
}

/* Video Meta Grid */
.video-meta-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.video-meta-item {
	background: #ffffff;
	padding: 5px;
	border-radius: 5px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	display: flex;
	align-items: flex-start;
	gap: 6px;
	transition: all 0.3s ease;
}

.video-meta-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.meta-icon {
	width: 48px;
	height: 48px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.meta-icon i {
	font-size: 24px;
	color: #ffffff;
}

.meta-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.meta-label {
	font-size: 12px;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 600;
}

.meta-value {
	font-size: 16px;
	color: #333;
	font-weight: 500;
}

/* Video Screenshots */
.video-screenshots {
	background: #ffffff;
	padding: 24px;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.video-screenshots h3 {
	font-size: 20px;
	font-weight: 600;
	color: #333;
	margin: 0 0 20px 0;
	padding-bottom: 12px;
	border-bottom: 2px solid #f0f0f0;
}

.screenshots-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
}

.screenshot-item {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

.screenshot-item:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.screenshot-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.screenshot-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
	.video-view-container {
		padding: 15px;
	}
	
	.video-page-header h1 {
		font-size: 24px;
	}
	
	.video-title {
		font-size: 22px;
	}
	
	.video-meta-grid {
		grid-template-columns: 1fr;
	}
	
	.screenshots-gallery {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 12px;
	}
	
	.video-description,
	.video-screenshots {
		padding: 20px;
	}
}

@media (max-width: 480px) {
	.video-page-header h1 {
		font-size: 20px;
	}
	
	.video-title {
		font-size: 18px;
	}
	
	.screenshots-gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Loading Animation */
@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

.video-player-wrapper.loading {
	animation: pulse 2s ease-in-out infinite;
}

/* Custom Scrollbar for Description */
.description-content::-webkit-scrollbar {
	width: 8px;
}

.description-content::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.description-content::-webkit-scrollbar-thumb {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 4px;
}

.description-content::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Lightbox Styles */
.video-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.lightbox-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	cursor: pointer;
}

.lightbox-content {
	position: relative;
	max-width: 90%;
	max-height: 90%;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox-image {
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	font-size: 24px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #333;
	z-index: 10002;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
	top: 20px;
	right: 20px;
	font-size: 32px;
	line-height: 1;
}

.lightbox-prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.lightbox-next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
	background: #ffffff;
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.lightbox-close:hover {
	transform: scale(1.1);
}

@media (max-width: 768px) {
	.lightbox-close,
	.lightbox-prev,
	.lightbox-next {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}
	
	.lightbox-close {
		top: 10px;
		right: 10px;
	}
	
	.lightbox-prev {
		left: 10px;
	}
	
	.lightbox-next {
		right: 10px;
	}
}

