.ht-function-toc--inline {
	position: static;
	margin: 0 0 24px;
}

.ht-function-toc--inline .ht-function-toc__list {
	max-height: none;
}

.ht-function-toc {
	position: sticky;
	top: var(--ht-toc-offset-top, 100px);
	margin: 0 0 24px;
	background: var(--ht-toc-bg, #e6effb);
	border: 1px solid var(--ht-toc-border, #b8ceeb);
	border-radius: var(--ht-toc-radius, 13px);
	overflow: hidden;
}

.ht-function-toc--floating {
	z-index: 30;
	margin: 0;
	width: var(--ht-toc-width, 260px);
	max-width: calc(100vw - 32px);
}

.ht-function-toc--floating .ht-function-toc__list {
	max-height: calc(100vh - var(--ht-toc-offset-top, 100px) - 80px);
}

.ht-function-toc--collapsed:not(.ht-function-toc--expanded) .ht-function-toc__title-text,
.ht-function-toc--collapsed:not(.ht-function-toc--expanded) .ht-function-toc__list {
	display: none;
}

.ht-function-toc--collapsed .ht-function-toc__title {
	cursor: pointer;
}

.ht-function-toc--collapsed:not(.ht-function-toc--expanded) .ht-function-toc__title {
	justify-content: center;
	padding: 12px;
}

.ht-function-toc--collapsed:not(.ht-function-toc--expanded) .ht-function-toc__icon {
	width: 24px;
	height: 24px;
	flex-basis: 24px;
}

.ht-function-toc__title {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	background: var(--ht-toc-title-bg, #0e0428);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
}

.ht-function-toc__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	color: inherit;
}

.ht-function-toc__icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.ht-function-toc__list {
	max-height: calc(100vh - var(--ht-toc-offset-top, 100px) - 80px);
	overflow: auto;
	padding: 10px 0;
}

.ht-function-toc__list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ht-function-toc__item {
	margin: 0;
}

.ht-function-toc__item a {
	display: block;
	padding: 8px 14px;
	color: var(--ht-toc-link, #333333);
	text-decoration: none;
	line-height: 1.45;
	transition: background 0.2s ease, color 0.2s ease;
}

.ht-function-toc__item-h3 a {
	padding-left: 24px;
}

.ht-function-toc__item-h4 a {
	padding-left: 34px;
}

.ht-function-toc__item a:hover,
.ht-function-toc__item a.is-active {
	background: linear-gradient(90deg,var(--ht-toc-active, #002359) 40%, transparent 100%);
	color: var(--ht-toc-active-link, #ffffff);
}

@media (max-width: 849px) {
	.ht-function-toc--floating.ht-function-toc--collapsed:not(.ht-function-toc--expanded) {
		position: fixed;
		width: 48px !important;
		max-width: 48px;
		margin: 0;
		visibility: visible !important;
		opacity: var(--ht-toc-collapsed-opacity, 0.45);
		transition: opacity 0.25s ease;
	}

	.ht-function-toc--floating.ht-function-toc--collapsed:not(.ht-function-toc--expanded):hover {
		opacity: 1;
	}

	.ht-function-toc--floating.ht-function-toc--expanded {
		position: fixed;
		width: min(var(--ht-toc-width, 260px), calc(100vw - 32px)) !important;
		max-width: calc(100vw - 32px);
		margin: 0;
		visibility: visible !important;
		opacity: 1;
	}
}
