/**
 * Video Playlist Frontend CSS
 *
 * Styles for video playlist display on presentation frontend.
 *
 * @package VirtualConference
 * @since   1.1.0
 */

/* Main Playlist Container */
.vcon-video-playlist-container {
	width: 100%;
	max-width: 1920px;
	margin: 0 auto;
}

/* Playlist */
.vcon-video-playlist {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 16px;
	margin-top: 20px;
}

.vcon-playlist-header {
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 2px solid #dcdcde;
}

.vcon-playlist-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
}

/* Playlist Items */
.vcon-playlist-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.vcon-playlist-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	margin-bottom: 8px;
	background: #fff;
	border: 2px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.vcon-playlist-item:last-child {
	margin-bottom: 0;
}

a.vcon-playlist-item,
a.vcon-playlist-item:visited {
	text-decoration: none;
	color: inherit;
}

.vcon-playlist-item:hover {
	border-color: #2271b1;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vcon-playlist-item.active {
	background: #f0f6fc;
	border-color: #2271b1;
}

.vcon-playlist-item.active .vcon-playlist-item-number {
	background: #2271b1;
	color: #fff;
}

/* Item Number */
.vcon-playlist-item-number {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	background: #646970;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	border-radius: 50%;
	flex-shrink: 0;
}

/* Item Info */
.vcon-playlist-item-info {
	flex: 1;
	min-width: 0;
}

.vcon-playlist-item-title {
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vcon-playlist-item-description {
	font-size: 13px;
	color: #646970;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Video Duration */
.vcon-video-duration {
	font-size: 13px;
	color: #646970;
	font-weight: 500;
	white-space: nowrap;
	flex-shrink: 0;
}

.vcon-playlist-item.active .vcon-video-duration {
	color: #2271b1;
	font-weight: 600;
}

/* Responsive Design */
@media (max-width: 782px) {
	.vcon-video-playlist {
		padding: 12px;
	}

	.vcon-playlist-header h3 {
		font-size: 16px;
	}

	.vcon-playlist-item {
		gap: 8px;
		padding: 10px;
	}

	.vcon-playlist-item-number {
		min-width: 28px;
		height: 28px;
		font-size: 13px;
	}

	.vcon-playlist-item-title {
		font-size: 13px;
	}

	.vcon-playlist-item-description {
		font-size: 12px;
	}

	.vcon-video-duration {
		font-size: 12px;
	}
}

@media (max-width: 600px) {
	.vcon-playlist-item {
		flex-wrap: wrap;
	}

	.vcon-playlist-item-info {
		width: 100%;
		order: 2;
	}

	.vcon-video-duration {
		order: 3;
		margin-left: auto;
	}

	.vcon-playlist-item-description {
		white-space: normal;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}

/* RTL Support */
body.rtl .vcon-playlist-item {
	direction: rtl;
}

body.rtl .vcon-video-duration {
	margin-left: 0;
	margin-right: auto;
}

/* Accessibility */
.vcon-playlist-item:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Loading State */
.vcon-playlist-item.loading {
	opacity: 0.6;
	cursor: wait;
	pointer-events: none;
}

/* Dark Mode Support (if theme supports it) */
@media (prefers-color-scheme: dark) {
	.vcon-video-playlist {
		background: #1d2327;
		border-color: #3c434a;
	}

	.vcon-playlist-header {
		border-color: #3c434a;
	}

	.vcon-playlist-header h3 {
		color: #f0f0f1;
	}

	.vcon-playlist-item {
		background: #2c3338;
		color: #f0f0f1;
	}

	.vcon-playlist-item:hover {
		background: #3c434a;
	}

	.vcon-playlist-item.active {
		background: #1e3a5f;
	}

	.vcon-playlist-item-title {
		color: #f0f0f1;
	}

	.vcon-playlist-item-description,
	.vcon-video-duration {
		color: #c3c4c7;
	}
}
