/**
 * XABCD SEO — Table of Contents styles.
 */

.xabcd-seo-toc {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: #f9fafb;
	padding: 16px 20px;
	margin: 24px 0;
	max-width: 700px;
}

.xabcd-seo-toc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.xabcd-seo-toc-title {
	font-size: 1.1em;
	font-weight: 600;
	color: #1a1a1a;
}

.xabcd-seo-toc-toggle {
	background: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 4px 12px;
	cursor: pointer;
	font-size: 0.85em;
	color: #555;
	transition: background 0.2s, color 0.2s;
}

.xabcd-seo-toc-toggle:hover {
	background: #e8e8e8;
	color: #333;
}

/* ----------------------------------------------------------------
   List styles — controlled by xabcd-seo-toc-style-{numbers|letters|none}
   ---------------------------------------------------------------- */

/* Primary list — base */
.xabcd-seo-toc-list {
	margin: 0;
	padding-left: 20px;
}

.xabcd-seo-toc-list > li {
	margin-bottom: 6px;
	line-height: 1.6;
}

/* Primary: numbers (default) */
.xabcd-seo-toc-style-numbers {
	list-style-type: decimal;
}

/* Primary: letters */
.xabcd-seo-toc-style-letters {
	list-style-type: upper-alpha;
}

/* Primary: none */
.xabcd-seo-toc-style-none {
	list-style-type: none;
	padding-left: 0;
}

/* Sub-list — base */
.xabcd-seo-toc-sublist {
	margin: 4px 0 0;
	padding-left: 20px;
}

.xabcd-seo-toc-sublist > li {
	margin-bottom: 4px;
	font-size: 0.95em;
}

/* Sub-list: numbers */
.xabcd-seo-toc-sublist.xabcd-seo-toc-style-numbers {
	list-style-type: decimal;
}

/* Sub-list: letters (default) */
.xabcd-seo-toc-sublist.xabcd-seo-toc-style-letters {
	list-style-type: lower-alpha;
}

/* Sub-list: none */
.xabcd-seo-toc-sublist.xabcd-seo-toc-style-none {
	list-style-type: none;
	padding-left: 0;
}

/* Link styles */
.xabcd-seo-toc-list a {
	text-decoration: none;
	color: #2563eb;
	transition: color 0.15s;
}

.xabcd-seo-toc-list a:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

/* Collapsed state */
.xabcd-seo-toc.collapsed .xabcd-seo-toc-list {
	display: none;
}

.xabcd-seo-toc.collapsed .xabcd-seo-toc-header {
	margin-bottom: 0;
}

/* ----------------------------------------------------------------
   Back to top links
   ---------------------------------------------------------------- */
.xabcd-seo-toc-backtotop {
	margin: 16px 0 24px;
	text-align: right;
}

.xabcd-seo-toc-backtotop a {
	font-size: 0.85em;
	color: #6b7280;
	text-decoration: none;
	transition: color 0.15s;
}

.xabcd-seo-toc-backtotop a:hover {
	color: #2563eb;
	text-decoration: underline;
}

/* Smooth scroll for anchor links */
html {
	scroll-behavior: smooth;
}

/* Offset for fixed headers */
[id] {
	scroll-margin-top: 80px;
}

/* Responsive */
@media (max-width: 600px) {
	.xabcd-seo-toc {
		padding: 12px 14px;
	}

	.xabcd-seo-toc-title {
		font-size: 1em;
	}
}
