/**
 * FullStackDost UI — LearnPress & plugin-specific styles
 */

/* LearnPress palette */
#learn-press-custom-css,
:root {
	--lp-primary-color: var(--fsd-primary) !important;
	--lp-secondary-color: var(--fsd-accent) !important;
}

.site-content-wrapper .lp-archive-courses {
	padding: 0;
	max-width: 100%;
}

/* Breadcrumbs */
body.fsd-ui-active .learn-press-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0 0 20px;
	padding: 10px 16px;
	background: var(--fsd-card-bg);
	border: 1px solid var(--fsd-border);
	border-radius: var(--fsd-radius);
	font-size: 0.8125rem;
}

body.fsd-ui-active .learn-press-breadcrumb a {
	color: var(--fsd-text-muted);
	text-decoration: none;
}

body.fsd-ui-active .learn-press-breadcrumb a:hover {
	color: var(--fsd-primary);
}

/* Course tabs & curriculum */
body.fsd-ui-active .learn-press-nav-tabs li.course-nav label {
	font-weight: 600;
	color: var(--fsd-text-muted);
}

body.fsd-ui-active .learn-press-nav-tabs li.course-nav.active label,
body.fsd-ui-active .learn-press-nav-tabs li.course-nav label:hover {
	color: var(--fsd-primary);
}

body.fsd-ui-active .course-section-header {
	background: var(--fsd-card-bg);
	border: 1px solid var(--fsd-border);
	border-radius: var(--fsd-radius);
	margin-bottom: 8px;
}

body.fsd-ui-active .course-section-header:hover {
	border-color: rgba(99, 102, 241, 0.3);
	box-shadow: var(--fsd-shadow);
}

body.fsd-ui-active .course-item__link:hover {
	background: var(--fsd-primary-light);
	border-radius: var(--fsd-radius);
}

/* Empty states */
body.fsd-ui-active .lp-ajax-load-courses-not-found,
body.fsd-ui-active .no-results {
	padding: 48px 24px;
	text-align: center;
	color: var(--fsd-text-muted);
	background: var(--fsd-gradient-soft);
	border-radius: var(--fsd-radius-lg);
	border: 1px dashed var(--fsd-border);
}

/* Curriculum items */
body.fsd-ui-active .course-curriculum {
	margin-top: 8px;
}

body.fsd-ui-active .course-curriculum .course-item {
	border-radius: var(--fsd-radius);
	margin-bottom: 4px;
	transition: background 0.2s ease, border-color 0.2s ease;
}

body.fsd-ui-active .course-curriculum .course-item.completed .course-item__link,
body.fsd-ui-active .course-curriculum .course-item.item-completed .course-item__link {
	background: rgba(34, 197, 94, 0.08);
	border-left: 3px solid var(--fsd-success, #22c55e);
}

body.fsd-ui-active .course-curriculum .course-item.completed .course-item-status::before,
body.fsd-ui-active .course-curriculum .course-item.item-completed .course-item-status::before {
	color: var(--fsd-success, #22c55e);
}

body.fsd-ui-active .course-curriculum .course-item.current .course-item__link {
	background: var(--fsd-primary-light);
	border-left: 3px solid var(--fsd-primary);
	font-weight: 600;
}

body.fsd-ui-active .course-curriculum .section-count {
	font-size: 0.75rem;
	color: var(--fsd-text-muted);
	background: var(--fsd-card-bg);
	padding: 2px 8px;
	border-radius: 999px;
}

/* Popup sidebar curriculum search — undo global pill-button overrides */
body.fsd-ui-active #popup-sidebar .search-course {
	display: flex;
	position: relative;
	height: 70px;
	flex-shrink: 0;
	background: var(--fsd-card-bg, #f7f7fb);
	border-bottom: 1px solid var(--fsd-border);
	overflow: visible;
}

body.fsd-ui-active #popup-sidebar .search-course input[name="s"] {
	display: block;
	width: 100%;
	height: 70px;
	padding: 0 52px 0 20px;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--fsd-text);
	font-size: 0.9375rem;
}

body.fsd-ui-active #popup-sidebar .search-course input[name="s"]:focus {
	outline: none;
	box-shadow: none !important;
}

body.fsd-ui-active #popup-sidebar .search-course input[name="s"]::placeholder {
	color: var(--fsd-text-muted);
}

body.fsd-ui-active #popup-sidebar .search-course button:not(.clear) {
	position: absolute !important;
	top: 0 !important;
	right: 12px !important;
	left: auto !important;
	height: 70px !important;
	width: auto !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 12px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: inherit !important;
	font-weight: 400 !important;
	line-height: 1;
	transform: none !important;
}

body.fsd-ui-active #popup-sidebar .search-course button:not(.clear):hover,
body.fsd-ui-active #popup-sidebar .search-course button:not(.clear):focus {
	opacity: 1;
	transform: none !important;
	box-shadow: none !important;
	background: transparent !important;
	color: inherit !important;
}

body.fsd-ui-active #popup-sidebar .search-course button:not(.clear) i {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	color: var(--fsd-text-muted);
	font-size: 1rem;
}

body.fsd-ui-active #popup-sidebar .search-course button:not(.clear):hover i {
	color: var(--fsd-primary);
}

body.fsd-ui-active #popup-sidebar .search-course button.clear {
	display: none !important;
}

/* Lesson / complete buttons */
body.fsd-ui-active .lp-button-complete,
body.fsd-ui-active .lp-btn-complete,
body.fsd-ui-active button.complete-lesson,
body.fsd-ui-active .lp-button.button-complete-lesson {
	background: linear-gradient(135deg, var(--fsd-primary), var(--fsd-accent)) !important;
	border: none !important;
	border-radius: var(--fsd-radius) !important;
	color: #fff !important;
	font-weight: 700 !important;
	padding: 12px 28px !important;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.fsd-ui-active .lp-button-complete:hover,
body.fsd-ui-active .lp-btn-complete:hover,
body.fsd-ui-active button.complete-lesson:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}

/* Single course sidebar progress */
body.fsd-ui-active .course-progress,
body.fsd-ui-active .lp-course-progress {
	background: var(--fsd-card-bg);
	border: 1px solid var(--fsd-border);
	border-radius: var(--fsd-radius-lg);
	padding: 16px;
	margin-bottom: 16px;
}

body.fsd-ui-active .course-progress .lp-progress-bar,
body.fsd-ui-active .lp-course-progress .lp-progress-bar {
	height: 8px;
	border-radius: 999px;
	background: var(--fsd-border);
	overflow: hidden;
}

body.fsd-ui-active .course-progress .lp-progress-bar .lp-progress-value,
body.fsd-ui-active .lp-course-progress .lp-progress-bar .lp-progress-value {
	background: linear-gradient(90deg, var(--fsd-primary), var(--fsd-accent));
	border-radius: 999px;
	height: 100%;
}

/* LearnPress profile */
body.fsd-ui-active.fsd-profile-page .lp-profile-content {
	background: transparent;
}

body.fsd-ui-active.fsd-profile-page .lp-profile-nav-tabs {
	border-bottom: 2px solid var(--fsd-border);
	margin-bottom: 24px;
}

body.fsd-ui-active.fsd-profile-page .lp-profile-nav-tabs li a {
	border-radius: var(--fsd-radius) var(--fsd-radius) 0 0;
	font-weight: 600;
	color: var(--fsd-text-muted);
}

body.fsd-ui-active.fsd-profile-page .lp-profile-nav-tabs li.active a,
body.fsd-ui-active.fsd-profile-page .lp-profile-nav-tabs li a:hover {
	color: var(--fsd-primary);
	background: var(--fsd-primary-light);
}

body.fsd-ui-active.fsd-profile-page .learn-press-profile-dashboard {
	display: flex;
	flex-direction: column;
	gap: 24px;
}/* LearnPress Lesson Single Item Popup Header & Drawer Toggle */
html body.fsd-ui-active #popup-header,
html body #popup-header {
	background: var(--fsd-gradient-hero, linear-gradient(135deg, #4f46e5 0%, #7c3aed 40%, #0891b2 100%)) !important;
	color: #ffffff !important;
	display: flex !important;
	align-items: center !important;
	height: 60px !important;
	padding: 0 16px !important;
	gap: 12px !important;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
	box-sizing: border-box !important;
	border-bottom: none !important;
	transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html body.fsd-ui-active #sidebar-toggle,
html body #sidebar-toggle,
html body .wp-block-learnpress-item-hidden-sidebar #sidebar-toggle {
	-webkit-appearance: none !important;
	appearance: none !important;
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	min-height: 38px !important;
	background: rgba(255, 255, 255, 0.2) !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	border-radius: 10px !important;
	cursor: pointer !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 !important;
	padding: 0 !important;
	outline: none !important;
	flex-shrink: 0 !important;
	box-shadow: none !important;
	position: relative !important;
	line-height: 1 !important;
	pointer-events: auto !important;
	z-index: 10 !important;
	transform-origin: center center !important;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease !important;
}

html body.fsd-ui-active #sidebar-toggle:hover,
html body #sidebar-toggle:hover,
html body.fsd-ui-active #sidebar-toggle:focus-visible {
	background: rgba(255, 255, 255, 0.35) !important;
}

html body.fsd-ui-active #sidebar-toggle::before,
html body #sidebar-toggle::before,
html body .wp-block-learnpress-item-hidden-sidebar #sidebar-toggle::before {
	content: "►" !important;
	font-size: 0.8rem !important;
	color: #ffffff !important;
	display: inline-block !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 !important;
	position: static !important;
	width: auto !important;
	height: auto !important;
	font-family: system-ui, -apple-system, sans-serif !important;
	pointer-events: none !important;
}

/* OPEN state (drawer open) -> rotate button 180deg to point LEFT (◀) */
html body:not(.lp-sidebar-toggle__close) #sidebar-toggle,
html body.lp-sidebar-toggle__open #sidebar-toggle {
	transform: rotate(180deg) !important;
}

/* CLOSED state (drawer closed) -> rotate button 0deg to point RIGHT (►) */
html body.lp-sidebar-toggle__close #sidebar-toggle,
html body #sidebar-toggle:checked {
	transform: rotate(0deg) !important;
}




body.fsd-ui-active #popup-header .popup-header__inner,
#popup-header .popup-header__inner {
	flex: 1 !important;
	min-width: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: center !important;
}

body.fsd-ui-active #popup-header .course-title,
#popup-header .course-title {
	margin: 0 !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	line-height: 1.2 !important;
	color: #ffffff !important;
}

body.fsd-ui-active #popup-header .course-title a,
#popup-header .course-title a {
	color: #ffffff !important;
	text-decoration: none !important;
}

body.fsd-ui-active #popup-header .back-course,
#popup-header .back-course {
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	min-height: 38px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: rgba(255, 255, 255, 0.2) !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	border-radius: 10px !important;
	color: #ffffff !important;
	font-size: 1.1rem !important;
	text-decoration: none !important;
	transition: background 0.2s ease, transform 0.15s ease !important;
	flex-shrink: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1 !important;
	opacity: 1 !important;
}

body.fsd-ui-active #popup-header .back-course:hover,
#popup-header .back-course:hover {
	background: rgba(255, 255, 255, 0.35) !important;
	color: #ffffff !important;
	transform: scale(1.05) !important;
}

/* ═══════════════════════════════════════════════════════════
 * W3SCHOOLS & TUTORIALSPOINT LESSON & READING EXPERIENCE
 * ═══════════════════════════════════════════════════════════ */

/* ─── Reading Typography ─── */
body.fsd-ui-active .content-item-summary,
body.fsd-ui-active .entry-content,
body.fsd-ui-active .lp-entry-content {
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--fsd-text, #1e293b);
}

body.fsd-ui-active .content-item-summary h1,
body.fsd-ui-active .entry-content h1 {
	font-size: clamp(1.85rem, 3vw, 2.35rem) !important;
	font-weight: 800 !important;
	color: var(--fsd-text-heading, #0f172a) !important;
	margin: 0 0 20px !important;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--fsd-border, #e2e8f0);
}

body.fsd-ui-active .content-item-summary h2,
body.fsd-ui-active .entry-content h2 {
	font-size: 1.5rem !important;
	font-weight: 700 !important;
	color: var(--fsd-text-heading, #0f172a) !important;
	margin: 32px 0 16px !important;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--fsd-border, #e2e8f0);
}

body.fsd-ui-active .content-item-summary h3,
body.fsd-ui-active .entry-content h3 {
	font-size: 1.25rem !important;
	font-weight: 600 !important;
	color: var(--fsd-text-heading, #0f172a) !important;
	margin: 24px 0 12px !important;
}

/* ─── W3Schools & TutorialsPoint Callout Panels ─── */
body.fsd-ui-active .fsd-callout,
body.fsd-ui-active .w3-panel,
body.fsd-ui-active blockquote {
	margin: 24px 0 !important;
	padding: 16px 22px !important;
	border-radius: 0 var(--fsd-radius, 8px) var(--fsd-radius, 8px) 0 !important;
	border: 1px solid var(--fsd-border, #e2e8f0) !important;
	border-left: 6px solid var(--fsd-callout-tip-border, #04aa6d) !important;
	background: var(--fsd-callout-tip-bg, #e8f5e9) !important;
	font-size: 1rem !important;
	line-height: 1.65 !important;
	color: #1e293b !important;
	position: relative;
}

/* Tip Callout (Green) */
body.fsd-ui-active .fsd-callout-tip,
body.fsd-ui-active .w3-panel.w3-pale-green {
	background: #e8f5e9 !important;
	border-left-color: #04aa6d !important;
}

/* Note Callout (Blue/Slate) */
body.fsd-ui-active .fsd-callout-note,
body.fsd-ui-active .w3-panel.w3-pale-blue {
	background: #f1f5f9 !important;
	border-left-color: #3b82f6 !important;
}

/* Warning Callout (Amber/Yellow) */
body.fsd-ui-active .fsd-callout-warn,
body.fsd-ui-active .w3-panel.w3-pale-yellow {
	background: #fffbeb !important;
	border-left-color: #f59e0b !important;
}

/* ─── W3Schools "Try It Yourself" & Example Boxes ─── */
.fsd-code-example,
.w3-example {
	background: #f8fafc;
	border: 1px solid var(--fsd-border, #e2e8f0);
	border-radius: var(--fsd-radius, 8px);
	padding: 20px;
	margin: 28px 0;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.fsd-code-example__header,
.w3-example h3,
.w3-example h4 {
	font-size: 1.125rem !important;
	font-weight: 700 !important;
	color: var(--fsd-text-heading, #0f172a) !important;
	margin: 0 0 12px 0 !important;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.fsd-code-example__code,
.w3-example .w3-code {
	background: #ffffff !important;
	border: 1px solid var(--fsd-border, #e2e8f0) !important;
	border-left: 4px solid var(--fsd-primary, #04aa6d) !important;
	border-radius: var(--fsd-radius-sm, 4px) !important;
	padding: 16px !important;
	font-family: var(--fsd-font-mono, ui-monospace, Menlo, Monaco, Consolas, monospace) !important;
	font-size: 0.9375rem !important;
	line-height: 1.6 !important;
	overflow-x: auto;
	margin-bottom: 14px !important;
}

.fsd-btn-try-it,
.w3-btn.w3-green,
a.w3-btn.w3-green {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	background: var(--fsd-primary, #04aa6d) !important;
	color: #ffffff !important;
	padding: 10px 22px !important;
	font-size: 0.9375rem !important;
	font-weight: 700 !important;
	border-radius: var(--fsd-radius-sm, 4px) !important;
	text-decoration: none !important;
	border: none !important;
	cursor: pointer !important;
	transition: background 0.15s ease, transform 0.1s ease !important;
}

.fsd-btn-try-it:hover,
.w3-btn.w3-green:hover {
	background: var(--fsd-primary-hover, #038d5a) !important;
	color: #ffffff !important;
	transform: translateY(-1px);
}

/* ─── Reference Tables (TutorialsPoint & W3Schools) ─── */
body.fsd-ui-active table:not(.lp-table-clean),
body.fsd-ui-active .w3-table-all,
body.fsd-ui-active .ws-table-all {
	width: 100% !important;
	border-collapse: collapse !important;
	margin: 24px 0 !important;
	font-size: 0.9375rem !important;
	border: 1px solid var(--fsd-border, #e2e8f0) !important;
	border-radius: var(--fsd-radius, 8px) !important;
	overflow: hidden !important;
	display: table !important;
}

body.fsd-ui-active table th,
body.fsd-ui-active .w3-table-all th {
	background: #f1f5f9 !important;
	color: #0f172a !important;
	font-weight: 700 !important;
	text-align: left !important;
	padding: 12px 16px !important;
	border-bottom: 2px solid var(--fsd-border, #e2e8f0) !important;
}

body.fsd-ui-active table td,
body.fsd-ui-active .w3-table-all td {
	padding: 12px 16px !important;
	border-bottom: 1px solid var(--fsd-border, #e2e8f0) !important;
	color: var(--fsd-text, #1e293b) !important;
}

body.fsd-ui-active table tr:nth-child(even) td {
	background: #f8fafc;
}

body.fsd-ui-active table tr:hover td {
	background: #f1f5f9;
}

/* ─── TutorialsPoint & W3Schools Curriculum Sidebar (#popup-sidebar) ─── */
body.fsd-ui-active #popup-sidebar {
	background: #ffffff !important;
	border-right: 1px solid var(--fsd-border, #e2e8f0) !important;
	box-shadow: 2px 0 12px rgba(0, 0, 0, 0.05) !important;
}

body.fsd-ui-active #popup-sidebar .course-curriculum {
	padding: 12px 8px !important;
}

body.fsd-ui-active #popup-sidebar .curriculum-sections .section-header {
	background: transparent !important;
	border: none !important;
	padding: 12px 14px 6px !important;
	font-size: 0.8125rem !important;
	font-weight: 800 !important;
	letter-spacing: 0.05em !important;
	text-transform: uppercase !important;
	color: #64748b !important;
}

body.fsd-ui-active #popup-sidebar .course-item {
	margin-bottom: 2px !important;
	border-radius: var(--fsd-radius, 8px) !important;
	transition: background 0.15s ease, color 0.15s ease !important;
	border: none !important;
}

body.fsd-ui-active #popup-sidebar .course-item .course-item__link {
	padding: 10px 14px !important;
	font-size: 0.9375rem !important;
	color: #334155 !important;
	font-weight: 500 !important;
	border-radius: var(--fsd-radius, 8px) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	text-decoration: none !important;
}

body.fsd-ui-active #popup-sidebar .course-item:hover .course-item__link {
	background: #f1f5f9 !important;
	color: #0f172a !important;
}

/* W3Schools Signature Active Lesson Highlight (Green background/border) */
body.fsd-ui-active #popup-sidebar .course-item.current,
body.fsd-ui-active #popup-sidebar .course-item.item-current {
	background: transparent !important;
}

body.fsd-ui-active #popup-sidebar .course-item.current .course-item__link,
body.fsd-ui-active #popup-sidebar .course-item.item-current .course-item__link {
	background: var(--fsd-primary-light, #e8f5e9) !important;
	color: #047857 !important;
	font-weight: 700 !important;
	border-left: 4px solid var(--fsd-primary, #04aa6d) !important;
	border-radius: 0 var(--fsd-radius, 8px) var(--fsd-radius, 8px) 0 !important;
}

/* Completed Lesson Checkmark */
body.fsd-ui-active #popup-sidebar .course-item.completed .course-item__link,
body.fsd-ui-active #popup-sidebar .course-item.item-completed .course-item__link {
	color: #059669 !important;
}

body.fsd-ui-active #popup-sidebar .course-item.completed .course-item-status::before,
body.fsd-ui-active #popup-sidebar .course-item.item-completed .course-item-status::before {
	color: #059669 !important;
}

