/* Video Player Styles */
/* Video Player Styles */
.video-player-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 1000;
	display: none;
	justify-content: center;
	align-items: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.video-player-modal.active {
	display: flex;
	opacity: 1;
}

.video-player-container {
	position: relative;
	width: 100%;
	margin: 0 auto;
	display: flex;
	background-color: var(--color-video-background);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	overflow: hidden;
	align-items: stretch;
}

.video-player {
	position: relative;
	width: 100%;
	max-height: 100vh;
	overflow: hidden;
	background-color: #000;
	aspect-ratio: 16 / 9;
	flex-grow: 1;
}

.video-player iframe {
	width: 100%;
	height: 100%;
	border: none;
	position: absolute;
	top: 0;
	left: 0;
}

/* Video Controls Overlay */

.video-controls-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.6) 0%,
		rgba(0, 0, 0, 0) 20%,
		rgba(0, 0, 0, 0) 70%,
		rgba(0, 0, 0, 0.6) 100%
	);
	/* backdrop-filter: blur(2px); */
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
	z-index: 10;
}

.video-player:hover .video-controls-overlay {
	opacity: 1;
}

.video-controls-overlay.active-controls {
	pointer-events: auto;
	opacity: 1;
}

/* Top Controls */

.top-controls {
	display: flex;
	justify-content: space-between;
	padding: 1.25rem;
	pointer-events: auto;
}

.narration-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: var(--color-video-background);
	color: var(--color-video-text);
	border: none;
	padding: 1rem 1.5rem;
	font-family: var(--font-primary);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	border-radius: 0;
	width: auto;
}

.narration-toggle i {
	margin-left: 1rem;
	font-size: 1rem;
}

.narration-toggle:hover {
	background-color: rgba(17, 25, 40, 0.7);
}

.narration-panel:not(.hidden) ~ .video-player .narration-toggle {
	display: none;
}

.close-video {
	color: var(--color-video-text);
	border: none;
	font-size: 2rem;
	cursor: pointer;
	opacity: 0.8;
	transition: opacity 0.3s ease;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
	z-index: 11;
}

.close-video:hover {
	opacity: 1;
}

/* Bottom Controls */

.bottom-controls {
	padding: 1.25rem;
	pointer-events: auto;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.opacity-100 {
	opacity: 1;
}

.bottom-controls:hover {
	opacity: 1;
}

.progress-container {
	width: 100%;
	margin-bottom: 1rem;
}

.progress-bar {
	width: 100%;
	height: 4px;
	background-color: var(--color-video-progress-bar);
	cursor: pointer;
	position: relative;
	border-radius: 2px;
	overflow: hidden;
}

.progress-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background-color: var(--color-video-progress);
	width: 0;
	border-radius: 2px;
}

.playback-controls {
	display: flex;
	align-items: center;
}

.control-btn {
	background-color: var(--color-video-controls-bg);
	color: var(--color-video-text);
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0.9;
	transition: all 0.3s ease;
	margin-right: 1rem;
}

.control-btn:hover {
	opacity: 1;
	background-color: rgba(0, 0, 0, 0.7);
	transform: scale(1.05);
}

.control-btn i {
	font-size: 1rem;
}

.time-display {
	color: var(--color-video-text);
	font-size: 18px;
	line-height: 26px;
	font-family: var(--font-primary);
	background-color: rgba(0, 0, 0, 0.5);
	padding: 0.25rem 0.5rem;
	border-radius: 2px;
}

.narration-panel {
	width: 420px;
	min-width: 420px;
	height: auto;
	max-height: 100vh;
	background-color: var(--color-video-background);
	color: var(--color-video-text);
	overflow-y: auto;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	border-right: 1px solid rgba(255, 255, 255, 0.1);
	position: relative;
	/* Hide scrollbar but allow scrolling */
	scrollbar-width: none;
	/* Firefox */
	-ms-overflow-style: none;
	/* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */

.narration-panel::-webkit-scrollbar {
	display: none;
}

/* Updated narration header */

.narration-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 2rem 1.5rem;
	position: sticky;
	top: 0;
	z-index: 5;
	background-color: var(--color-video-background);
}

/* Updated narration title styles */

.narration-title {
	font-family: "Fraunces", serif;
	font-weight: 700;
	font-size: 30px;
	line-height: 38px;
	letter-spacing: 0px;
	margin: 0;
	padding: 0;
}

.close-narration {
	background-color: transparent;
	color: var(--color-video-text);
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	opacity: 0.8;
	transition: opacity 0.3s ease;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.close-narration:hover {
	opacity: 1;
}

.narration-divider {
	height: 1px;
	background-color: var(--color-video-timeline);
	margin: 0 1.5rem;
}

.narration-content {
	padding: 0;
	flex-grow: 1;
	position: relative;
}

/* Timeline indicator */

.narration-timeline {
	position: absolute;
	top: 2rem;
	right: 1.5rem;
	bottom: 0;
	width: 2px;
	background-color: var(--color-video-timeline);
	z-index: 1;
}

/* Single timeline dot that moves with video progress */

.narration-item {
	position: relative;
	padding: 2rem 3.25rem 0 1.5rem;
	opacity: 0.4;
	transition: all 0.3s ease;
	cursor: pointer;
}

.narration-item:last-child {
	margin-bottom: 2rem;
}

.narration-item.active {
	opacity: 1;
}

/* Remove individual dots from narration items */

.narration-item::after {
	display: none;
}

/* Updated timestamp styles */

.timestamp {
	display: block;
	font-family: "Open Sans", sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 26px;
	letter-spacing: 0px;
	margin-bottom: 1rem;
	color: var(--color-video-text);
}

.narration-item p.lyrics {
	font-family: "Open Sans", sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	letter-spacing: 0px;
	margin: 0;
}

.mobile-narration-title {
	display: none;
	background-color: var(--color-video-background);
	width: 100%;
	padding: 1.5rem;
	border-bottom: 1px solid var(--color-video-divider);
}

.mobile-narration-title .narration-title {
	font-family: var(--font-heading);
	font-weight: var(--font-weight-bold);
	font-size: 24px;
	line-height: 30px;
	letter-spacing: 0px;
	margin: 0;
	padding: 0;
	color: var(--color-video-text);
	text-align: center;
}

/* Full-width video page styles */

.video-page {
	width: 100%;
	max-width: 100%;
}

.video-page .video-player-container {
	margin-left: 0;
	margin-right: 0;
}

.narration-panel.hidden {
	display: none !important;
}
/* Responsive Adjustments */

@media (max-width: 768px) {
	.video-player-container {
		flex-direction: column;
	}
	.mobile-narration-title {
		display: block;
		order: 1;
	}
	.narration-panel .narration-header {
		display: none;
	}
	.narration-panel {
		width: 100%;
		height: auto;
		max-height: 400px;
		border-right: none;
		border-top: none;
		border-bottom: 1px solid var(--color-video-divider);
		order: 3;
	}
	.video-player {
		order: 2;
	}
	.narration-panel.hidden {
		height: 0;
		max-height: 0;
		border-bottom: none;
		overflow: hidden;
	}
	.control-btn {
		width: 32px;
		height: 32px;
	}
	.time-display {
		font-size: 0.75rem;
	}
	.narration-toggle {
		font-size: 0.75rem;
		padding: 0.4rem 0.8rem;
	}
	.top-controls,
	.bottom-controls {
		padding: 0.75rem;
	}
	.narration-title {
		font-size: 1.5rem;
	}
	.narration-header {
		padding: 1.5rem 1rem;
	}
	.timestamp {
		font-size: 1rem;
	}

	.content-container.video-page {
		width: 100%;
		max-width: 100%;
		padding: 0;
	}
	.content-container.video-page .text-center {
		padding: 0 1rem;
	}
}

@media (min-width: 769px) {
	/* Make video player take full width on non-mobile devices */
	.content-container .video-player-container {
		max-width: 100vw;
		width: 100vw;
		margin-left: calc(-50vw + 50%);
		border-radius: 0;
	}
}
