/**
 * help.css
 *
 * Copyright (c) 2000-2012 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * Stylesheet for help pages.
 *
 * $Id$
 */

:root {
	--primary-color: #007bff;
	--text-color: #333;
	--bg-color: #fff;
	--sidebar-bg: #f8f9fa;
	--border-color: #dee2e6;
	--font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
	font-family: var(--font-family);
	color: var(--text-color);
	background-color: var(--bg-color);
	margin: 0;
	padding: 0;
	line-height: 1.6;
}

#header {
	background-color: var(--bg-color);
	border-bottom: 1px solid var(--border-color);
	padding: 1rem 2rem;
}

#header h1 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--primary-color);
}

#container {
	display: flex;
	min-height: calc(100vh - 70px);
	/* Adjust based on header height */
}

#sidebar {
	width: 280px;
	background-color: var(--sidebar-bg);
	border-left: 1px solid var(--border-color);
	padding: 1.5rem;
	box-sizing: border-box;
	order: 2;
	/* Move sidebar to the right */
	font-size: 0.9rem;
}

#main {
	flex: 1;
	padding: 2rem;
	box-sizing: border-box;
	order: 1;
}

#main h1,
#main h2,
#main h3,
#main h4 {
	margin-top: 1.5rem;
	margin-bottom: 1rem;
	color: #222;
}

#main h4 {
	font-size: 1.1rem;
	font-weight: 600;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 0.5rem;
}

/* Nested Accordion TOC */
#toc ul.toc-root,
#toc ul.toc-sub {
	margin: 0;
	padding: 0;
	list-style: none !important;
	/* Force remove default bullets from UL */
	border: none;
}

#toc ul.toc-sub {
	padding-left: 0;
	/* Align perfectly, manage indent via padding/margin */
	border-left: 1px solid #e0e0e0;
	/* Guide line */
	margin-left: 1.2rem;
	/* Indent the whole block */
}

#toc li.toc-item {
	margin: 0;
	border-bottom: 1px solid #f0f0f0;
	position: relative;
	list-style: none !important;
	/* Ensure LI has no marker */
}

/* Explicitly hide marker for modern browsers */
#toc li.toc-item::marker {
	content: none;
	display: none;
}

.toc-header {
	display: flex;
	align-items: center;
	padding: 0.25rem 0;
}

/* Toggle Icon */
.toc-toggle {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 0.25rem;
	cursor: pointer;
	color: #444;
	/* Darker color for visibility */
	font-weight: bold;
	user-select: none;
	font-family: Arial, sans-serif;
	/* Ensure character renders */
}

/* Unicode Arrow: Right Triangle (Black) */
.toc-item.has-children>.toc-header>.toc-toggle::before {
	content: "\25B6";
	font-size: 0.8rem;
	display: inline-block;
	transition: transform 0.2s;
}

.toc-item.expanded>.toc-header>.toc-toggle::before {
	transform: rotate(90deg);
	/* Down arrow */
}

.toc-item.no-children>.toc-header>.toc-toggle {
	visibility: hidden;
	/* Keep alignment */
}

/* Link Styling */
#toc li a.toc-heading {
	text-decoration: none;
	color: var(--primary-color);
	font-weight: 600;
	flex: 1;
	padding: 0.4rem 0.5rem;
	font-size: 1rem;
	border-radius: 4px;
	transition: all 0.2s;
}

#toc li a.toc-heading:hover {
	background-color: #f8f9fa;
	color: var(--primary-hover, #0056b3);
}

.toc-title {
	flex: 1;
}

/* Active State */
.active-topic {
	color: #d63384 !important;
	/* Distinct highlight color */
	background-color: #fff0f6;
	font-weight: 700;
	border-left: 3px solid #d63384;
	padding-left: 0.5rem;
}

div.thickSeparator {
	border-bottom: 1px solid var(--border-color);
	margin: 1.5rem 0;
}

.code {
	font-family: 'Courier New', Courier, monospace;
	background-color: #f1f1f1;
	padding: 0.2rem 0.4rem;
	border-radius: 4px;
	color: #d63384;
}

/* Sidebar Specifics */
#sidebar div.block {
	margin-bottom: 1.5rem;
}

#sidebar div.block span.blockTitle {
	display: block;
	font-weight: 700;
	margin-bottom: 0.75rem;
	color: #444;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.85rem;
}

#sidebar ul {
	padding-left: 0;
	list-style: none;
}

#sidebar li {
	margin-bottom: 0.5rem;
}

#sidebar a {
	color: #555;
	text-decoration: none;
	transition: color 0.2s;
}

#sidebar a:hover {
	color: var(--primary-color);
}

/* Breadcrumbs */
#breadcrumb {
	margin-bottom: 1rem;
	font-size: 0.9rem;
	color: #666;
}

#breadcrumb a {
	color: var(--primary-color);
	text-decoration: none;
}

#breadcrumb a:hover {
	text-decoration: underline;
}

.current {
	font-weight: 600;
	color: #000;
}