/**
 * Frontend Training Videos Styles
 *
 * @package Karate_Club_Manager
 * @since 1.0.27
 */

/* Training Videos Container */
.kcm-training-videos {
	padding: 20px 0;
}

/* Header */
.kcm-videos-header {
	margin-bottom: 30px;
}

.kcm-videos-header h2 {
	margin-bottom: 10px;
	font-size: 28px;
	color: #111827;
}

.kcm-welcome-message {
	font-size: 16px;
	color: #6B7280;
}

/* Videos Grid */
.kcm-videos-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

/* Video Card */
.kcm-video-card {
	background: #fff;
	border: 1px solid #D1D5DB;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	cursor: pointer;
}

.kcm-video-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

/* Video Thumbnail */
.kcm-video-thumbnail {
	position: relative;
	background: #F4F4F2;
	height: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.kcm-video-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kcm-video-thumbnail .dashicons {
	width: 64px;
	height: 64px;
	font-size: 64px;
	color: #6B7280;
}

/* Play Overlay */
.kcm-video-play-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;
}

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

.kcm-video-play-overlay .dashicons {
	width: 64px;
	height: 64px;
	font-size: 64px;
	color: #fff;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 50%;
	padding: 10px;
}

/* Video Info */
.kcm-video-info {
	padding: 15px;
}

.kcm-video-info h3 {
	margin: 0 0 10px 0;
	font-size: 18px;
	color: #111827;
	line-height: 1.4;
}

.kcm-video-info .description {
	margin: 0 0 10px 0;
	color: #6B7280;
	font-size: 14px;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.kcm-video-duration {
	display: inline-block;
	background: #F4F4F2;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	color: #6B7280;
	font-weight: 500;
}

/* Notice / Empty State */
.kcm-videos-notice {
	padding: 20px;
	background: #fde8ea;
	border-left: 4px solid #B11226;
	border-radius: 4px;
	text-align: center;
}

.kcm-videos-notice p {
	margin: 0;
	font-size: 16px;
	color: #6B7280;
}

/* Video Modal */
.kcm-video-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.kcm-video-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
}

.kcm-video-modal-content {
	position: relative;
	width: 90%;
	max-width: 1200px;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	z-index: 1;
}

.kcm-video-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	transition: background 0.3s ease;
}

.kcm-video-modal-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.kcm-video-modal-player {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
}

.kcm-video-modal-player iframe,
.kcm-video-modal-player video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Responsive */
@media screen and (max-width: 768px) {
	.kcm-videos-grid {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
		gap: 15px;
	}

	.kcm-videos-header h2 {
		font-size: 24px;
	}

	.kcm-video-modal-content {
		width: 95%;
	}
}

@media screen and (max-width: 480px) {
	.kcm-videos-grid {
		grid-template-columns: 1fr;
	}

	.kcm-video-thumbnail {
		height: 200px;
	}
}

/* Filters */
.kcm-videos-filters {
	background: linear-gradient(135deg, #B11226 0%, #8F0E1E 100%);
	padding: 30px;
	border-radius: 12px;
	margin-bottom: 40px;
	box-shadow: 0 4px 15px rgba(177, 18, 38, 0.2);
	position: relative;
	overflow: hidden;
}

.kcm-videos-filters::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
	pointer-events: none;
}

.kcm-filters-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-end;
	position: relative;
	z-index: 1;
}

.kcm-filter-group {
	flex: 1 1 200px;
	min-width: 180px;
}

.kcm-filter-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: white;
	font-size: 14px;
	text-shadow: 0 1px 2px rgba(0,0,0,0.1);
	letter-spacing: 0.3px;
}

.kcm-filter-select {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid rgba(255,255,255,0.3);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.95);
	font-size: 14px;
	color: #111827;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	font-weight: 500;
}

.kcm-filter-select:hover {
	background: white;
	border-color: rgba(255,255,255,0.5);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.kcm-filter-select:focus {
	outline: none;
	background: white;
	border-color: white;
	box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 3px rgba(255,255,255,0.3);
	transform: translateY(-1px);
}

.kcm-btn-secondary {
	background: white;
	color: #B11226;
	border: 2px solid rgba(255,255,255,0.3);
	padding: 12px 28px;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	position: relative;
	overflow: hidden;
}

.kcm-btn-secondary::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(177, 18, 38, 0.1);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
}

.kcm-btn-secondary:hover::before {
	width: 300px;
	height: 300px;
}

.kcm-btn-secondary:hover {
	background: white;
	border-color: white;
	box-shadow: 0 6px 20px rgba(0,0,0,0.2);
	transform: translateY(-2px);
}

.kcm-btn-secondary:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Video meta information */
.kcm-video-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e1e4e8;
}

.kcm-video-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: #6B7280;
	background: #f3f4f6;
	padding: 4px 8px;
	border-radius: 4px;
}

.kcm-video-meta-item .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* No results message */
.kcm-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	background: #F4F4F2;
	border-radius: 8px;
	color: #6B7280;
}

.kcm-no-results p {
	margin: 0;
	font-size: 16px;
}

/* Responsive filters */
@media screen and (max-width: 768px) {
	.kcm-filters-row {
		flex-direction: column;
	}

	.kcm-filter-group {
		width: 100%;
	}

	.kcm-btn-secondary {
		width: 100%;
	}
}

