/* Extracted from lib.css — loaded conditionally via functions.php */

/* ================================================================
   Lesson page — lib-lesson-*
   ================================================================ */

.lib-lesson-wrap {
	background: var(--wp--preset--color--off-white);
	min-height: 60vh;
}

.lib-lesson-header {
	background: var(--wp--preset--color--primary);
	padding: 2rem 1.25rem 2.5rem;
}

.lib-lesson-header-inner {
	max-width: 960px;
	margin: 0 auto;
}

.lib-lesson-title {
	font-family: var(--wp--preset--font-family--display) !important;
	font-size: clamp(1.4rem, 3.5vw, 2.2rem) !important;
	font-weight: 700 !important;
	color: var(--wp--preset--color--primary) !important;
	line-height: 1.15 !important;
	letter-spacing: -0.02em !important;
	margin: 0 0 1.5rem !important;
}

/* Override LearnDash ld30 white background inside our lesson template */

.lib-lesson-wrap .learndash-wrapper,
.lib-lesson-main .learndash-wrapper {
	background: transparent !important;
}

.lib-lesson-content-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.25rem 4rem;
}

/* ── LearnDash ld30 overrides inside lesson wrapper ────────────── */

.lib-lesson-content-wrap .learndash-wrapper {
	margin-top: 0;
}

/* Breadcrumb bar */

.lib-lesson-content-wrap .ld-breadcrumbs-container {
	padding: 1rem 0;
	border-bottom: 1px solid var(--border);
	margin-bottom: 1.5rem;
}

.lib-lesson-content-wrap .ld-breadcrumbs a {
	color: var(--wp--preset--color--salmon) !important;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.82rem;
}

/* ================================================================
   Further reading — related blog posts on lesson pages
   Ported from astra-child/style.css
   ================================================================ */

.tt-further-reading {
	margin: 2.5rem 0 0;
	padding: 2rem;
	background: var(--wp--preset--color--white);
	border-radius: 10px;
}

.tt-further-reading__heading {
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--mid-grey);
	margin: 0 0 1.25rem;
	font-family: var(--wp--preset--font-family--body);
}

.tt-further-reading__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-items: start;
	gap: 1.25rem;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

@media (max-width: 767px) {
	.tt-further-reading__grid {
		grid-template-columns: 1fr;
	}
}

.tt-further-reading__item {
	list-style: none !important;
}

.tt-further-reading__card {
	display: flex;
	flex-direction: column;
	text-decoration: none !important;
	color: var(--wp--preset--color--primary) !important;
	background: var(--wp--preset--color--white);
	border: none;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s, transform 0.2s;
}

.tt-further-reading__card:hover {
	box-shadow: 0 4px 20px rgba(249,130,119,0.12);
	transform: translateY(-3px);
}

.tt-further-reading__thumb {
	height: 160px;
	overflow: hidden;
	background: #f2f2f2;
	flex-shrink: 0;
}

.tt-further-reading__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform 0.3s;
}

.tt-further-reading__card:hover .tt-further-reading__thumb img {
	transform: scale(1.04);
}

.tt-further-reading__thumb--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	background: linear-gradient(135deg, var(--wp--preset--color--salmon-light) 0%, #fce9d0 100%);
}

.tt-further-reading__thumb--empty svg {
	opacity: 0.4;
}

.tt-further-reading__body {
	padding: 1rem 1.1rem 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	font-family: var(--wp--preset--font-family--body);
}

.tt-further-reading__title {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary) !important;
	line-height: 1.4;
	margin: 0 0 0.5rem !important;
	transition: color 0.2s;
}

.tt-further-reading__card:hover .tt-further-reading__title {
	color: var(--wp--preset--color--salmon) !important;
}

.tt-further-reading__excerpt {
	font-size: 0.8rem;
	color: var(--wp--preset--color--mid-grey);
	line-height: 1.5;
	margin: 0 !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tt-further-reading__meta {
	font-size: 0.75rem;
	color: #aaa;
	margin: 0.5rem 0 0 !important;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex-wrap: wrap;
	font-family: var(--wp--preset--font-family--body);
}

.tt-further-reading__meta-sep { color: #ddd; }

.tt-further-reading__cat {
	color: var(--wp--preset--color--salmon);
	text-decoration: none !important;
	font-weight: 500;
}

.tt-further-reading__cat:hover { text-decoration: underline !important; }

/* ── Mark Complete button ─────────────────────────────────── */

.learndash_mark_complete_button {
	background: var(--wp--preset--color--teal) !important;
	color: var(--wp--preset--color--white) !important;
	border: none !important;
	border-radius: 8px !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-weight: 600 !important;
	cursor: pointer;
	transition: background 0.2s;
}

.learndash_mark_complete_button:hover {
	background: var(--wp--preset--color--teal-dark) !important;
}

/* ── Lesson sidebar navigation ─────────────────────────────── */

.tt-lesson-nav { font-size: 0.8125rem; }

.tt-lesson-nav-list { list-style: none; margin: 0; padding: 0; }

.tt-lesson-nav-item { margin: 0; padding: 0; }

.tt-lesson-nav-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.35rem;
	text-decoration: none;
	color: var(--wp--preset--color--primary);
	border-radius: 6px;
	transition: background 0.15s;
}

.tt-lesson-nav-link:hover { background: rgba(62,158,149,0.08); }

.tt-lesson-nav-item--current .tt-lesson-nav-link {
	color: #3e9e95;
	font-weight: 600;
	background: rgba(62,158,149,0.1);
}

.tt-lesson-nav-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border-radius: 50%;
}

.tt-lesson-nav-icon--done { background: var(--wp--preset--color--salmon); color: #fff; font-weight: 700; font-size: 0.65rem; }

.tt-lesson-nav-icon--todo { border: 1.5px solid #c8cacc; background: #fff; }

.tt-lesson-nav-item--current .tt-lesson-nav-icon--todo { border-color: #3e9e95; }

.tt-lesson-nav-title { flex: 1; min-width: 0; line-height: 1.35; }

.tt-lesson-nav-divider { height: 1px; background: var(--border); margin: 2px 0.25rem; }

/* ── Lesson sidebar: Ask a question link ───────────────────── */

.tt-lesson-ask-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.6rem;
	margin-bottom: 0.75rem;
	background: var(--wp--preset--color--salmon-light);
	border-radius: 8px;
	color: var(--wp--preset--color--salmon-dark) !important;
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.15s;
}

.tt-lesson-ask-link:hover { background: #f9d5d2; }

.tt-lesson-ask-icon { display: flex; align-items: center; }

/* ── Lesson sidebar: Help links list ──────────────────────── */

.tt-lesson-help-list { list-style: none; margin: 0; padding: 0; }

.tt-lesson-help-item { margin: 0; }

.tt-lesson-help-link {
	display: flex;
	flex-direction: column;
	padding: 0.45rem 0.35rem;
	border-radius: 6px;
	text-decoration: none !important;
	transition: background 0.15s;
}

.tt-lesson-help-link:hover { background: rgba(62,158,149,0.06); }

.tt-lesson-help-title {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary);
}

.tt-lesson-help-desc {
	font-size: 0.75rem;
	color: var(--wp--preset--color--mid-grey);
}

/* ── Lesson sidebar cards ──────────────────────────────────── */

.lib-lesson-sidebar > * + * { margin-top: 1.25rem; }

.lib-lesson-sidebar .tt-lesson-nav,
.lib-lesson-sidebar .tt-lesson-help {
	background: var(--wp--preset--color--white);
	border-radius: 12px;
	padding: 1rem 0.875rem;
	box-shadow: 0 2px 12px rgba(58,58,58,0.07);
}

/* ─── In This Article — sidebar TOC ──────────────────────────── */

.tt-ita-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.tt-ita-item {
	margin: 0;
}

.tt-ita-link {
	display: block;
	padding: 0.5rem 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	border-left: 2px solid transparent;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.tt-ita-link:hover {
	color: var(--wp--preset--color--salmon);
	background: var(--wp--preset--color--off-white);
}

.tt-ita-link.is-active {
	color: var(--wp--preset--color--salmon);
	border-left-color: var(--wp--preset--color--salmon);
	font-weight: 600;
}
