/**
 * Lumos Lesson Layout Styles
 *
 * Complete page layout with video, sidebar, supplementary material, and comments.
 *
 * @package LifterLMS_Lumos_Customization
 */

.llms-lumos-lesson-layout {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
}

/* Main Two Column Container */
.llms-lumos-layout-container {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 1.5rem;
	max-width: 1400px;
	margin: 0 auto;
	padding: 1.5rem;
}

/* Main Content Column (70%) */
.llms-lumos-layout-main {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* Video Container */
.llms-lumos-video-container {
	border-radius: 8px;
	padding: 0;
	min-height: 400px;
	position: relative;
}

.llms-lumos-video-container iframe,
.llms-lumos-video-container video,
.llms-lumos-video-container embed,
.llms-lumos-video-container .llms-video-wrapper {
	width: 100%;
	height: 100%;
	min-height: 400px;
	border: none;
	display: block;
}

/* override lifter class to show the video */
.llms-video-wrapper > div.center-video {
	overflow: visible;
}

/* Lesson Navigation in Layout */
.llms-lumos-layout-main .llms-lumos-lesson-navigation {
	display: flex;
	flex-direction: row;
	gap: 1rem;
	margin: 0;
	width: 100%;
}

.llms-lumos-layout-main .llms-lumos-btn-nav {
	display: block;
	flex: 1;
	padding: 1rem 1.5rem;
	background: #46504e;
	color: #ffffff;
	border: 1px solid #46504e;
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 500;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.llms-lumos-layout-main .llms-lumos-btn-nav:hover {
	background: #46504e;
	border-color: #46504e;
	color: #9bc3a0;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.llms-lumos-layout-main .llms-lumos-btn-nav:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sidebar Column (20%) */
.llms-lumos-layout-sidebar {
	position: sticky;
	top: 20px;
	align-self: start;
	margin-top: 0 !important;
	padding-top: 0;
}

/* Remove list bullets from sidebar */
.llms-lumos-layout-sidebar ul,
.llms-lumos-layout-sidebar ol,
.llms-lumos-layout-sidebar li,
.llms-lumos-layout-sidebar > li {
	list-style-type: none !important;
	list-style: none !important;
	padding-left: 0;
	margin-left: 0;
}

.llms-lumos-layout-sidebar > *:first-child {
	margin-top: 0 !important;
}

/* Supplementary Material Section */
.llms-lumos-supplementary {
	padding: 1.5rem;
	min-height: 120px;
}

.llms-lumos-section-title {
	font-size: 1.125rem;
	font-weight: 400;
	margin: 0 0 1rem 0;
}

.llms-lumos-supplementary-content {
	line-height: 1.6;
}

.llms-lumos-supplementary-content p {
	margin-bottom: 1rem;
}

.llms-lumos-supplementary-content p:last-child {
	margin-bottom: 0;
}

/* Comments Section (inside main column) */
.llms-lumos-comments-section {
	padding: 0;
	margin-top: 0;
}

.llms-lumos-comments-container {
	margin-top: 1rem;
}

.llms-lumos-no-comments {
	font-style: italic;
	padding: 1rem 0;
}

/* WordPress Comments Styling */
.llms-lumos-comments-container .comment-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem 0;
}

.llms-lumos-comments-container .comment {
	padding: 1rem;
	margin-bottom: 1rem;
}

.llms-lumos-comments-container .comment-author {
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.llms-lumos-comments-container .comment-content {
	line-height: 1.6;
}

.llms-lumos-comments-container .comment-form,
.llms-lumos-comments-container .comment-respond {
	margin-top: 1rem;
}

.llms-lumos-comments-container .comment-form label,
.llms-lumos-comments-container .comment-reply-title {
	font-size: 0.875rem;
	margin-bottom: 0.5rem;
	display: block;
}

.llms-lumos-comments-container .comment-form input[type="text"],
.llms-lumos-comments-container .comment-form input[type="email"],
.llms-lumos-comments-container .comment-form textarea,
.llms-lumos-comments-container .comment-respond textarea {
	padding: 0.75rem;
	width: 100%;
	min-height: 120px;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.llms-lumos-layout-container {
		grid-template-columns: 1fr 250px;
	}
}

@media (max-width: 768px) {
	.llms-lumos-layout-container {
		grid-template-columns: 1fr;
		padding: 1rem;
	}

	.llms-lumos-layout-sidebar {
		position: static;
		max-height: none;
	}

	.llms-lumos-video-container {
		min-height: 300px;
	}

	.llms-lumos-layout-main .llms-lumos-lesson-navigation {
		flex-direction: column;
		gap: 0.75rem;
	}

	.llms-lumos-layout-main .llms-lumos-btn-nav {
		padding: 0.875rem 1.25rem;
		font-size: 0.8125rem;
	}
}

@media (max-width: 480px) {
	.llms-lumos-lesson-layout {
		--llms-layout-gap: 1rem;
		gap: 1rem;
	}

	.llms-lumos-layout-sidebar {
		position: static;
		max-height: none;
	}

	.llms-lumos-video-container {
		min-height: 300px;
	}

	.llms-lumos-layout-main {
		gap: 1rem;
	}
}

@media (max-width: 480px) {
	.llms-lumos-layout-container {
		padding: 0.75rem;
	}

	.llms-lumos-video-container {
		min-height: 250px;
	}

	.llms-lumos-section-title {
		font-size: 1rem;
	}

	.llms-lumos-supplementary {
		padding: 1rem;
	}
}

/* Widget Area Styling Override */
.llms-lumos-layout-sidebar .widget {
	margin-bottom: 1.5rem;
	padding: 0 1rem 1rem 1rem;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 6px;
}

.llms-lumos-layout-sidebar .widget:last-child {
	margin-bottom: 0;
}

.llms-lumos-layout-sidebar .widget-title {
	color: var(--llms-layout-sidebar-text);
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
}

/* Integration with Lesson Sidebar */
.llms-lumos-layout-sidebar .llms-lumos-lesson-sidebar {
	max-width: 100%;
	margin: 0;

	border: none;
	box-shadow: none;

}

.llms-lumos-layout-sidebar .llms-lumos-lesson-sidebar .llms-lumos-sidebar-btn {
	background: rgba(255, 255, 255, 0.9);
	color: var(--llms-layout-sidebar-bg);
}

.llms-lumos-layout-sidebar .llms-lumos-lesson-sidebar .llms-lumos-sidebar-btn:hover {
	background: #ffffff;
}

/* ============================================
   Barra de Progresso Estilosa
   ============================================ */

.llms-progress {
	background: #5a6169;
	border-radius: 8px;
	padding: 1.25rem 1.5rem 1.25rem 1.5rem;
	margin: 1.5rem 0;
	align-items: center;
}

.progress__indicator {
	font-size: 1rem;
	font-weight: 600;
	color: #ffffff;
	text-align: center;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.llms-progress-bar {
	background: #4a5159;
	border-radius: 4px;
	overflow: hidden;
	top: 0 !important;
}

.progress-bar-complete {
	height: 100%;
	background: #8bc4a9;
	border-radius: 4px;
	transition: width 0.6s ease;
	position: relative;
}

/* ============================================
   Imagens Estilosas
   ============================================ */

.llms-lumos-lesson-layout img,
.llms-lumos-layout-main img,
.llms-lumos-supplementary img {
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1),
	            0 2px 4px rgba(0, 0, 0, 0.06);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	max-width: 100%;
	height: auto;
	display: block;
}

.llms-lumos-lesson-layout img:hover,
.llms-lumos-layout-main img:hover,
.llms-lumos-supplementary img:hover {
	transform: translateY(-4px) scale(1.02);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15),
	            0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Container de Imagem com Overlay */
.llms-lumos-image-wrapper {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	margin: 1.5rem 0;
}

.llms-lumos-image-wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(180deg,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 0.3) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 1;
	pointer-events: none;
}

.llms-lumos-image-wrapper:hover::before {
	opacity: 1;
}

.llms-lumos-image-wrapper img {
	margin: 0;
	box-shadow: none;
	border-radius: 0;
}

/* Imagem Featured/Destaque */
.llms-lumos-featured-image {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	margin: 2rem 0;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.llms-lumos-featured-image::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.llms-lumos-featured-image img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
}

/* Galeria de Imagens */
.llms-lumos-image-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

.llms-lumos-image-gallery img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

/* Responsivo */
@media (max-width: 768px) {
	.progress__indicator {
		font-size: 0.875rem;
	}

	.llms-progress {
		padding: 1rem 1.25rem;
	}

	.llms-progress-bar {
		height: 24px;
	}

	.llms-lumos-image-gallery {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
		gap: 0.75rem;
	}
}

@media (max-width: 480px) {
	.progress__indicator {
		font-size: 0.8rem;
	}

	.llms-progress {
		padding: 0.875rem 1rem;
		margin: 1rem 0;
	}

	.llms-progress-bar {
		height: 20px;
	}

	.llms-lumos-image-gallery {
		grid-template-columns: 1fr;
	}

	.llms-lumos-image-gallery img {
		height: 250px;
	}
}
