/**
 * My Account Styles
 *
 * Styles for WooCommerce My Account page.
 *
 * @package Affinite\CoursesForWooCommerce
 */

.woocommerce-my-courses,
.woocommerce-lector-courses,
woocommerce-course-detail{
	margin-top: 2em;
}

.woocommerce-my-courses h2,
.woocommerce-lector-courses h2,
.woocommerce-course-detail h2 {
	margin-bottom: 1em;
	margin-top:0;
}

.woocommerce-my-courses .woocommerce-info,
.woocommerce-lector-courses .woocommerce-info {
	padding: 1em;
	background-color: #f0f0f1;
	border-left: 4px solid #2271b1;
	margin-bottom: 1em;
}

.woocommerce-my-courses table,
.woocommerce-lector-courses table,
.woocommerce-course-detail table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1em;
	box-shadow:none;
	font-size:22px;
}

.woocommerce-my-courses table th,
.woocommerce-lector-courses table th,
.woocommerce-course-detail table th {
	text-align: left;
	padding: 0.75em;
	font-weight: 600;
	border: 0.5px solid #000;
	background: #F3F3F3;
}

.woocommerce-my-courses table td,
.woocommerce-lector-courses table td,
.woocommerce-course-detail table td {
	padding: 0.75em;
	border: 0.5px solid #000;
}

.woocommerce-my-courses table tr:hover,
.woocommerce-lector-courses table tr:hover,
.woocommerce-course-detail table tr:hover {
	background-color: #f9f9f9;
}

.woocommerce-my-courses table td a,
.woocommerce-lector-courses table td a,
.woocommerce-course-detail table td a {
	text-decoration: none;
	color: #2271b1;
}

.woocommerce-my-courses table td a:hover,
.woocommerce-lector-courses table td a:hover,
.woocommerce-course-detail table td a:hover {
	text-decoration: underline;
}

/* Course Media Styles */
.course-media-list {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.course-media-item {
	position: relative;
	width: 150px;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	background: #f9f9f9;
}

.course-media-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.course-media-item.course-media-image img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	display: block;
}

.course-media-file {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 15px;
	min-height: 150px;
}

.course-media-file .file-icon {
	width: 64px;
	height: 64px;
	object-fit: contain;
	margin-bottom: 10px;
}

.course-media-file .file-name {
	font-size: 12px;
	text-align: center;
	word-break: break-word;
	color: #333;
}

/* Course Videos Styles */
.course-video-list {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.course-video-item {
	position: relative;
	width: 200px;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	background: #f9f9f9;
	display: flex;
	flex-direction: column;
}

.video-preview {
	position: relative;
	width: 100%;
	height: 120px;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.video-preview.youtube-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.video-preview.file-preview {
	background: #f0f0f0;
}

.video-preview .file-icon {
	width: 64px;
	height: 64px;
	object-fit: contain;
}

.video-type-badge {
	position: absolute;
	top: 5px;
	right: 5px;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: bold;
	text-transform: uppercase;
	z-index: 2;
}

.play-button-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.3);
	opacity: 0;
	transition: opacity 0.3s;
	z-index: 1;
}

.video-preview:hover .play-button-overlay {
	opacity: 1;
}

.play-icon {
	font-size: 48px;
	color: #fff;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.video-info {
	padding: 10px;
	flex: 1;
}

.video-info strong {
	display: block;
	font-size: 13px;
	word-break: break-word;
}

/* Video Popup */
#video-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
}

#video-popup .popup-content {
	position: relative;
	max-width: 90%;
	max-height: 90%;
}

#video-popup .close-popup {
	position: absolute;
	top: -40px;
	right: 0;
	color: #fff;
	font-size: 36px;
	cursor: pointer;
	line-height: 1;
}

#video-popup .close-popup:hover {
	opacity: 0.7;
}

#video-player {
	background: #000;
}

#video-player video,
#video-player iframe {
	max-width: 100%;
	max-height: 80vh;
}

