/**
 * Tutor LMS Rich Lessons — frontend wrapper styles.
 * Loaded only on single lesson pages. Individual block styles live in
 * /blocks/{slug}/style.css and are auto-enqueued by WordPress only when
 * that block is actually present on the page.
 */

.trl-lesson-content {
	position: relative;
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* ---- Dark / Light mode (Feature 15) ---- */
.trl-lesson-content[data-trl-theme="dark"] {
	background-color: #15171a;
	color: #e9e9e9;
	border-radius: 8px;
	padding: 20px;
}
.trl-lesson-content[data-trl-theme="dark"] a {
	color: #6ea8ff;
}

.trl-theme-toggle {
	position: sticky;
	top: 12px;
	float: right;
	z-index: 5;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 999px;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	margin-bottom: 10px;
}
.trl-lesson-content[data-trl-theme="dark"] .trl-theme-toggle {
	background: #232323;
	border-color: #3a3a3a;
	color: #fff;
}
.trl-theme-toggle__icon--moon { display: none; }
.trl-lesson-content[data-trl-theme="dark"] .trl-theme-toggle__icon--sun { display: none; }
.trl-lesson-content[data-trl-theme="dark"] .trl-theme-toggle__icon--moon { display: inline; }

.trl-lesson-inner {
	clear: both;
}

/* ---- Highlighting & Bookmarking (Feature 12) ---- */
.trl-highlight {
	background-color: #fff176;
	cursor: pointer;
	border-radius: 2px;
}
.trl-lesson-content[data-trl-theme="dark"] .trl-highlight {
	background-color: #6b6118;
	color: #fff;
}

.trl-annotation-toolbar {
	display: flex;
	gap: 6px;
	background: #1e1e1e;
	padding: 6px;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.25);
	z-index: 999;
}
.trl-annotation-toolbar__btn {
	background: #fff;
	color: #1e1e1e;
	border: none;
	border-radius: 4px;
	padding: 6px 12px;
	font-size: 0.85em;
	cursor: pointer;
}
.trl-annotation-toolbar__btn:hover {
	background: #f0f0f0;
}

/* ---- Key Takeaways Summary (Feature 13) ---- */
.trl-key-takeaways-summary {
	margin-top: 2em;
	padding: 18px 22px;
	border: 1px solid #f0c43a;
	border-radius: 8px;
	background: #fffdf3;
}
.trl-key-takeaways-summary h3 {
	margin-top: 0;
}
.trl-lesson-content[data-trl-theme="dark"] .trl-key-takeaways-summary {
	background: #201c0a;
	border-color: #5b4d10;
}

/* ---- Shared editor-side repeater styling fallback ---- */
.trl-editor-repeater__item {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 10px;
	margin-bottom: 10px;
	background: #fafafa;
}

@media (max-width: 600px) {
	.trl-theme-toggle {
		position: static;
		float: none;
		margin-bottom: 12px;
	}
}
