/*!
 * VMTechs SEO - table of contents styles.
 *
 * Two jobs:
 *   1. Style OUR tables of contents (.vmseo-toc)
 *   2. Keep LEGACY All in One SEO TOC markup looking right after AIOSEO is
 *      deactivated, since that markup lives in post_content and AIOSEO's
 *      stylesheet goes with it.
 */

/* ---------- Shared box ---------- */
.vmseo-toc,
.wp-block-aioseo-table-of-contents {
	background: #f6f8fa;
	border: 1px solid #dfe3e8;
	border-radius: 6px;
	padding: 16px 20px;
	margin: 0 0 28px;
	font-size: 16px;
	line-height: 1.6;
}

/* ---------- Header ---------- */
.vmseo-toc .vmseo-toc-header {
	width: 100%;
	margin-bottom: 8px;
}
.vmseo-toc .vmseo-toc-title {
	display: block;
	color: #434960;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
}

/* ---------- Lists ---------- */
.vmseo-toc .vmseo-toc-list,
.wp-block-aioseo-table-of-contents ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.vmseo-toc .vmseo-toc-list ul,
.wp-block-aioseo-table-of-contents ul ul {
	list-style: none;
	margin: 4px 0 4px 18px;
	padding: 0;
}
.vmseo-toc .vmseo-toc-list li,
.wp-block-aioseo-table-of-contents li {
	margin: 6px 0;
	padding: 0;
}

/* ---------- Links ---------- */
.vmseo-toc a.vmseo-toc-item,
.wp-block-aioseo-table-of-contents a.aioseo-toc-item,
.wp-block-aioseo-table-of-contents a {
	color: #1a56db;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}
.vmseo-toc a.vmseo-toc-item:hover,
.wp-block-aioseo-table-of-contents a.aioseo-toc-item:hover,
.wp-block-aioseo-table-of-contents a:hover {
	color: #0b3ba8;
	border-bottom-color: currentColor;
}

/* ---------- Smooth scrolling + anchor offset for sticky headers ---------- */
html { scroll-behavior: smooth; }
:where(h2, h3, h4, h5, h6)[id] { scroll-margin-top: 90px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

@media (max-width: 600px) {
	.vmseo-toc,
	.wp-block-aioseo-table-of-contents {
		padding: 14px 16px;
		font-size: 15px;
	}
}
