/* پس‌زمینه/بوردر/گردی‌گوشه از کلاس مشترک .webisoft-card می‌آید. */
.webisoft-toc {
	box-sizing: border-box;
	width: 100%;
	margin-bottom: 20px;
	padding: 18px 20px;
	direction: rtl;
	font-family: inherit;
}

.webisoft-toc * {
	box-sizing: border-box;
}

.webisoft-toc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.webisoft-toc-header.webisoft-toc-toggle {
	cursor: pointer;
	user-select: none;
}

.webisoft-toc-title {
	color: #0f172a;
	font-size: 16px;
	font-weight: 800;
}

.webisoft-toc-arrow {
	position: relative;
	flex-shrink: 0;
	width: 10px;
	height: 10px;
	border-inline-end: 2px solid var(--webisoft-toc-accent, #1d64bd);
	border-bottom: 2px solid var(--webisoft-toc-accent, #1d64bd);
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.webisoft-toc.is-collapsed .webisoft-toc-arrow {
	transform: rotate(-45deg);
}

.webisoft-toc-list {
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
	overflow: hidden;
	max-height: 800px;
	transition: max-height 0.25s ease, margin-top 0.25s ease;
}

.webisoft-toc.is-collapsed .webisoft-toc-list {
	margin-top: 0;
	max-height: 0;
}

.webisoft-toc-item {
	margin: 0;
	padding: 7px 0;
	border-top: 1px solid #e8edf3;
	font-size: 13px;
	line-height: 1.7;
}

.webisoft-toc-item:first-child {
	border-top: 0;
}

.webisoft-toc-item.webisoft-toc-level-3 {
	padding-inline-start: 18px;
	font-size: 12.5px;
}

.webisoft-toc-item a {
	color: #334155;
	text-decoration: none;
	transition: color 0.15s ease;
}

.webisoft-toc-item a:hover,
.webisoft-toc-item a.is-active {
	color: var(--webisoft-toc-accent, #1d64bd);
}

.webisoft-toc-sticky {
	position: sticky;
	top: 20px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}
