/* Lesson View Mode Selector */
.pcs-view-mode-selector {
	display: flex;
	gap: 0.5rem;
	background: rgba(255, 255, 255, 0.1);
	padding: 0.5rem;
	border-radius: 0.375rem;
	backdrop-filter: blur(10px);
}

.pcs-view-mode-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: rgba(255, 255, 255, 0.7);
	border-radius: 0.375rem;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 1rem;
}

.pcs-view-mode-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.4);
}

.pcs-view-mode-btn.active {
	background: color-mix(in srgb, var(--pco-primary-color, #7A3FF2) 80%, transparent);
	color: #fff;
	border-color: var(--pco-primary-color, #7A3FF2);
}

/* Modal */
.pcs-lesson-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	display: none;
}

.pcs-lesson-modal.active {
	display: flex;
	align-items: center;
	justify-content: center;
}

.pcs-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	z-index: 1;
}

.pcs-modal-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 0.5rem;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
	width: 90%;
	max-width: 900px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	animation: modalIn 0.3s ease;
}

@keyframes modalIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.pcs-modal-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 10;
	width: 2.5rem;
	height: 2.5rem;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	transition: background 0.2s ease;
}

.pcs-modal-close:hover {
	background: rgba(0, 0, 0, 0.9);
}

.pcs-modal-header {
	padding: 1.5rem;
	border-bottom: 1px solid #e5e7eb;
}

.pcs-modal-header h2 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: #1f2937;
}

.pcs-modal-body {
	flex: 1;
	overflow: auto;
	padding: 1.5rem;
}

.pcs-video-container-modal {
	width: 100%;
	aspect-ratio: 16 / 9;
}

/* Fullscreen */
.pcs-lesson-fullscreen {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	background: #000;
	display: none;
	flex-direction: column;
}

.pcs-lesson-fullscreen.active {
	display: flex;
}

.pcs-fullscreen-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	z-index: 2;
}

.pcs-fullscreen-header h2 {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
}

.pcs-fullscreen-close {
	width: 2.5rem;
	height: 2.5rem;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	border: none;
	border-radius: 0.375rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	transition: background 0.2s ease;
}

.pcs-fullscreen-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.pcs-fullscreen-body {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.pcs-video-container-fullscreen {
	width: 100%;
	height: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
}

.pcs-video-container-fullscreen video,
.pcs-video-container-fullscreen iframe {
	width: 100%;
	height: 100%;
}

/* Keyboard shortcuts hint */
.pcs-keyboard-hint {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	padding: 0.75rem 1rem;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	z-index: 100;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.pcs-keyboard-hint.visible {
	opacity: 1;
}

.pcs-keyboard-hint kbd {
	background: rgba(255, 255, 255, 0.2);
	padding: 0.25rem 0.5rem;
	border-radius: 0.25rem;
	margin: 0 0.25rem;
	font-family: monospace;
	font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
	.pcs-view-mode-selector {
		gap: 0.375rem;
	}

	.pcs-view-mode-btn {
		width: 2rem;
		height: 2rem;
		font-size: 0.875rem;
	}

	.pcs-modal-content {
		width: 95%;
		max-height: 95vh;
	}

	.pcs-modal-header h2 {
		font-size: 1rem;
	}

	.pcs-fullscreen-header h2 {
		font-size: 0.875rem;
	}
}
