.nimbus-toc-wrapper {
	box-sizing: border-box;
	--nimbus-toc-marker-color: #8e2de2;
	align-self: stretch;
	height: 100%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Defensive fallback: some Elementor column/widget alignment settings
   (Align Self set to Center/Start/End instead of Stretch) shrink the
   widget's wrapper down to its own content height, leaving no room for
   position: sticky to visibly do anything. This forces the full chain
   of Elementor's own wrapper elements to stretch to the column's height
   so sticky always has room to work, regardless of the site's alignment
   settings. Supported in all current evergreen browsers. */
.elementor-widget:has( > .elementor-widget-container > .nimbus-toc-wrapper ) {
	height: 100%;
	align-self: stretch;
}

.elementor-widget-container:has( > .nimbus-toc-wrapper ) {
	height: 100%;
	display: flex;
}

.nimbus-toc-wrapper.nimbus-toc-sticky {
	position: -webkit-sticky;
	position: sticky;
	top: 32px;
	max-height: calc(100vh - 64px);
	overflow-y: auto;
}

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

.nimbus-toc-title {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 14px;
}

.nimbus-toc-header .nimbus-toc-title {
	margin: 0;
}

.nimbus-toc-mobile-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	font: inherit;
	color: inherit;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.nimbus-toc-mobile-label {
	font-weight: 700;
	font-size: 15px;
	text-align: left;
}

.nimbus-toc-wrapper svg {
	box-sizing: content-box;
	max-width: none;
}

.nimbus-toc-chevron {
	width: 14px !important;
	height: 14px !important;
	flex-shrink: 0;
	transition: transform 0.25s ease;
}

.nimbus-toc-nav {
	width: 100%;
	margin-top: 14px;
}

.nimbus-toc-list,
.nimbus-toc-list--root {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nimbus-toc-list .nimbus-toc-list {
	margin-inline-start: 18px;
	margin-top: 8px;
	overflow: hidden;
	max-height: 2000px;
	transition: max-height 0.3s ease, opacity 0.2s ease;
	opacity: 1;
}

.nimbus-toc-item.is-collapsed > .nimbus-toc-list {
	max-height: 0;
	opacity: 0;
	margin-top: 0;
}

.nimbus-toc-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.nimbus-toc-link {
	display: block;
	flex: 1;
	text-decoration: none;
	color: #4a4a4a;
	font-size: 14px;
	line-height: 1.4;
	padding: 6px 10px;
	border-radius: 6px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.nimbus-toc-link:hover {
	color: #111111;
}

/* Marker style: pill (default background highlight, handled by widget color controls) */
.nimbus-toc-marker--pill .nimbus-toc-link.is-active {
	font-weight: 600;
}

/* Marker style: left border line */
.nimbus-toc-marker--line .nimbus-toc-link.is-active {
	position: relative;
	font-weight: 600;
}
.nimbus-toc-marker--line .nimbus-toc-link.is-active::before {
	content: "";
	position: absolute;
	left: -10px;
	top: 4px;
	bottom: 4px;
	width: 3px;
	border-radius: 2px;
	background: var(--nimbus-toc-marker-color);
}

/* Marker style: dot */
.nimbus-toc-marker--dot .nimbus-toc-link.is-active {
	font-weight: 600;
}
.nimbus-toc-marker--dot .nimbus-toc-link.is-active::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--nimbus-toc-marker-color);
	margin-right: 8px;
	vertical-align: middle;
}

.nimbus-toc-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #8a8a8a;
	flex-shrink: 0;
}

.nimbus-toc-toggle svg {
	width: 12px !important;
	height: 12px !important;
	transition: transform 0.2s ease;
}

.nimbus-toc-item.is-collapsed > .nimbus-toc-row .nimbus-toc-toggle svg {
	transform: rotate(-90deg);
}

.nimbus-toc-empty {
	font-size: 13px;
	color: #999999;
}

@media (max-width: 767px) {
	.nimbus-toc-wrapper.nimbus-toc-sticky {
		position: -webkit-sticky;
		position: sticky;
		top: 8px;
		max-height: none;
		z-index: 20;
	}

	.nimbus-toc-header .nimbus-toc-title {
		display: none;
	}

	.nimbus-toc-mobile-toggle {
		display: flex;
	}

	.nimbus-toc-nav {
		overflow: hidden;
		max-height: 0;
		opacity: 0;
		margin-top: 0;
		padding-top: 0;
		border-top: 0 solid rgba(0, 0, 0, 0.08);
		transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.25s ease, padding-top 0.25s ease;
	}

	.nimbus-toc-wrapper.is-open .nimbus-toc-nav {
		max-height: 70vh;
		opacity: 1;
		margin-top: 14px;
		padding-top: 14px;
		border-top-width: 1px;
		overflow-y: auto;
	}

	.nimbus-toc-wrapper.is-open .nimbus-toc-chevron {
		transform: rotate(180deg);
	}
}
