/* ==================== Documentation Layout ==================== */

.holderchat-docs {
	background-color: var(--hc-bg-light, #f8f9fa);
}

.holderchat-docs-layout {
	padding-bottom: 3rem;
}

/* Mobile docs toolbar */
.docs-mobile-bar {
	position: sticky;
	top: 0;
	z-index: 1020;
	background: #fff;
	border-bottom: 1px solid var(--hc-border-light, #ced4da);
	box-shadow: var(--hc-shadow-sm, 0 2px 4px rgba(0, 0, 0, 0.08));
}

.docs-mobile-bar .btn {
	font-weight: 600;
}

/* Sidebar */
.docs-sidebar {
	position: sticky;
	top: 1rem;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #ced4da transparent;
}

.docs-sidebar-card {
	background: #fff;
	border: 1px solid var(--hc-border-light, #ced4da);
	border-radius: var(--hc-border-radius-lg, 12px);
	box-shadow: var(--hc-shadow-sm, 0 2px 4px rgba(0, 0, 0, 0.08));
	overflow: hidden;
}

.docs-sidebar-header {
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--hc-border-light, #ced4da);
	background: linear-gradient(135deg, #f8fbff 0%, #eef5fd 100%);
}

.docs-sidebar-header h2 {
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hc-text-secondary, #666);
	margin: 0;
}

.docs-search {
	border: none;
	border-bottom: 1px solid var(--hc-border-light, #ced4da);
	border-radius: 0;
	padding: 0.75rem 1.25rem;
	font-size: 0.9rem;
}

.docs-search:focus {
	box-shadow: none;
	border-color: var(--hc-primary-blue, #217ff9);
}

.docs-nav {
	padding: 0.5rem 0 0.75rem;
}

.docs-nav-section + .docs-nav-section {
	border-top: 1px solid #eef1f4;
	margin-top: 0.25rem;
	padding-top: 0.25rem;
}

.docs-nav-section-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1.25rem 0.35rem;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--hc-gray-medium, #6c757d);
}

.docs-nav-section-title i {
	font-size: 0.85rem;
	color: var(--hc-primary-blue, #217ff9);
}

.docs-nav-list {
	list-style: none;
	margin: 0;
	padding: 0 0.5rem;
}

.docs-nav-link {
	display: block;
	padding: 0.45rem 0.75rem;
	margin-bottom: 0.1rem;
	border-radius: var(--hc-border-radius-md, 8px);
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--hc-text-primary, #212529);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
	line-height: 1.35;
}

.docs-nav-link:hover {
	background-color: var(--hc-bg-hover, #f2f2f2);
	color: var(--hc-primary-blue, #217ff9);
}

.docs-nav-link.is-active {
	background-color: rgba(33, 127, 249, 0.1);
	color: var(--hc-primary-blue, #217ff9);
	font-weight: 600;
}

.docs-nav-link.is-hidden {
	display: none;
}

.docs-nav-section.is-hidden {
	display: none;
}

.docs-sidebar-footer {
	padding: 0.85rem 1.25rem 1rem;
	border-top: 1px solid var(--hc-border-light, #ced4da);
	background: #fafbfc;
}

.docs-beta-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--hc-primary-blue, #217ff9);
	background: rgba(33, 127, 249, 0.08);
	border-radius: 999px;
	padding: 0.25rem 0.65rem;
}

/* Offcanvas sidebar (mobile) */
.docs-offcanvas .offcanvas-body {
	padding: 0;
}

/* Main content card */
.docs-content-card {
	background: #fff;
	border: 1px solid var(--hc-border-light, #ced4da);
	border-radius: var(--hc-border-radius-lg, 12px);
	box-shadow: var(--hc-shadow-sm, 0 2px 4px rgba(0, 0, 0, 0.08));
	padding: 2rem 2.25rem;
	min-height: 320px;
}

@media (max-width: 767.98px) {
	.docs-content-card {
		padding: 1.25rem 1rem;
	}
}

/* ==================== Documentation Prose ==================== */

.docs-content {
	color: var(--hc-text-primary, #212529);
	font-size: 1rem;
	line-height: 1.7;
}

.docs-content > *:first-child {
	margin-top: 0;
}

.docs-content > *:last-child {
	margin-bottom: 0;
}

.docs-content h2 {
	font-size: 1.65rem;
	font-weight: 700;
	color: var(--hc-black, #222);
	margin: 0 0 1.25rem;
	padding-bottom: 0.65rem;
	border-bottom: 2px solid rgba(33, 127, 249, 0.2);
}

.docs-content h3 {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--hc-black, #222);
	margin: 2rem 0 0.85rem;
	scroll-margin-top: 5rem;
}

.docs-content h4 {
	font-size: 1.05rem;
	font-weight: 600;
	color: #343a40;
	margin: 1.5rem 0 0.65rem;
	scroll-margin-top: 5rem;
}

.docs-content p {
	margin-bottom: 1rem;
}

.docs-content ul,
.docs-content ol {
	margin-bottom: 1rem;
	padding-left: 1.35rem;
}

.docs-content li {
	margin-bottom: 0.35rem;
}

.docs-content li > ul,
.docs-content li > ol {
	margin-top: 0.35rem;
	margin-bottom: 0.35rem;
}

.docs-content a {
	color: var(--hc-primary-blue, #217ff9);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.docs-content a:hover {
	color: var(--hc-primary-blue-hover, #1a6ad4);
}

.docs-content code {
	font-size: 0.875em;
	color: #c7254e;
	background: #f8f0f3;
	padding: 0.15em 0.4em;
	border-radius: 4px;
}

.docs-content pre {
	background: #1e2430;
	color: #e8ecf3;
	border-radius: var(--hc-border-radius-md, 8px);
	padding: 1rem 1.15rem;
	overflow-x: auto;
	margin: 1rem 0 1.25rem;
	font-size: 0.875rem;
	line-height: 1.55;
}

.docs-content pre code {
	background: transparent;
	color: inherit;
	padding: 0;
	font-size: inherit;
}

.docs-content table {
	width: 100%;
	margin: 1rem 0 1.5rem;
	font-size: 0.925rem;
}

.docs-content table th {
	background: #f1f5fb;
	font-weight: 600;
}

.docs-content table td,
.docs-content table th {
	vertical-align: top;
}

.docs-content strong {
	font-weight: 600;
	color: var(--hc-black, #222);
}

/* Callout blocks (optional in article HTML) */
.docs-content .docs-callout {
	border-left: 4px solid var(--hc-primary-blue, #217ff9);
	background: rgba(33, 127, 249, 0.06);
	border-radius: 0 var(--hc-border-radius-md, 8px) var(--hc-border-radius-md, 8px) 0;
	padding: 1rem 1.15rem;
	margin: 1.25rem 0;
}

.docs-content .docs-callout-warning {
	border-left-color: var(--hc-warning, #ffc107);
	background: rgba(255, 193, 7, 0.1);
}

.docs-content .docs-callout-success {
	border-left-color: var(--hc-success, #28a745);
	background: rgba(40, 167, 69, 0.08);
}

/* ==================== Table of Contents (sidebar) ==================== */

.docs-nav-section-toc {
	border-top: 1px solid #eef1f4;
	margin-top: 0.35rem;
	padding-top: 0.35rem;
}

.docs-nav-toc-list {
	list-style: none;
	margin: 0;
	padding: 0 0.5rem 0.5rem;
}

.docs-nav-toc-list a {
	display: block;
	font-size: 0.82rem;
	color: var(--hc-text-secondary, #666);
	text-decoration: none;
	padding: 0.3rem 0.75rem;
	border-left: 2px solid transparent;
	margin-left: 0.25rem;
	line-height: 1.35;
	border-radius: 0 var(--hc-border-radius-md, 8px) var(--hc-border-radius-md, 8px) 0;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.docs-nav-toc-list a:hover,
.docs-nav-toc-list a.is-active {
	color: var(--hc-primary-blue, #217ff9);
	border-left-color: var(--hc-primary-blue, #217ff9);
	background-color: rgba(33, 127, 249, 0.06);
}

.docs-nav-toc-list .docs-toc-h4 a {
	padding-left: 1.25rem;
	font-size: 0.78rem;
}

.docs-nav-toc-list a.is-hidden {
	display: none;
}

/* ==================== Prev / Next ==================== */

.docs-pagination {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--hc-border-light, #ced4da);
}

.docs-pagination-link {
	display: block;
	padding: 1rem 1.1rem;
	border: 1px solid var(--hc-border-light, #ced4da);
	border-radius: var(--hc-border-radius-md, 8px);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-pagination-link:hover {
	border-color: var(--hc-primary-blue, #217ff9);
	box-shadow: var(--hc-shadow-hover, 0 4px 12px rgba(33, 127, 249, 0.15));
	color: inherit;
}

.docs-pagination-link.next {
	text-align: right;
}

.docs-pagination-label {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hc-gray-medium, #6c757d);
	margin-bottom: 0.25rem;
}

.docs-pagination-title {
	display: block;
	font-weight: 600;
	color: var(--hc-primary-blue, #217ff9);
}

.docs-pagination-spacer {
	visibility: hidden;
}

@media (max-width: 575.98px) {
	.docs-pagination {
		grid-template-columns: 1fr;
	}
}

/* Hub page quick links */
.docs-hub-section {
	margin-bottom: 2rem;
}

.docs-hub-section h3 {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 0.75rem;
	color: var(--hc-black, #222);
}

.docs-hub-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.docs-hub-links li {
	margin-bottom: 0.5rem;
}

.docs-hub-links a {
	font-weight: 500;
	text-decoration: none;
}

.docs-hub-links a:hover {
	text-decoration: underline;
}

.docs-hub-links .text-muted {
	font-weight: 400;
}
