/*
 * "On this page" Table of Contents module (CSS class "hc-toc"), used on
 * Course Rules. Divi builds the links from the page's H2s.
 * Desktop: links on a 2px rail. Phone: a horizontal row of chips; add the
 * class "hc-toc--numbered" as well to number the chips (1, 2, 3…).
 * Fonts and colours are set on the module (Design > Title / List).
 */
.hc-toc .et_pb_table_of_contents__title {
	margin: 0;
	padding: 0;
}
.hc-toc .et_pb_table_of_contents__list--root {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0 !important;
	border-left: 2px solid rgba(10, 67, 4, 0.16);
	list-style: none;
}
.hc-toc .et_pb_table_of_contents__item {
	margin: 0;
	padding: 0;
}
.hc-toc .et_pb_table_of_contents__link {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 6px 0 6px 18px;
	box-sizing: border-box;
	text-decoration: none;
}
.hc-toc .et_pb_table_of_contents__empty {
	display: none;
}

@media (max-width: 767px) {
	.hc-toc .et_pb_table_of_contents__title {
		padding: 0 20px;
	}
	.hc-toc .et_pb_table_of_contents__list--root {
		flex-direction: row;
		gap: 8px;
		padding: 0 20px 2px !important;
		border-left: 0;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.hc-toc .et_pb_table_of_contents__list--root::-webkit-scrollbar {
		display: none;
	}
	.hc-toc .et_pb_table_of_contents__item {
		flex: 0 0 auto;
	}
	.hc-toc .et_pb_table_of_contents__link {
		display: inline-flex;
		padding: 0 14px;
		border: 1px solid rgba(10, 67, 4, 0.2);
		border-radius: 999px;
		background: var(--gcid-hc-card);
		white-space: nowrap;
	}
}

/* Numbered chips (phones): "hc-toc hc-toc--numbered". */
@media (max-width: 767px) {
	.hc-toc--numbered .et_pb_table_of_contents__list--root {
		padding: 0 20px 18px !important;
		counter-reset: hc-toc;
	}
	.hc-toc--numbered .et_pb_table_of_contents__item {
		counter-increment: hc-toc;
	}
	.hc-toc--numbered .et_pb_table_of_contents__link {
		gap: 8px;
		padding: 0 16px 0 8px;
		border-color: rgba(10, 67, 4, 0.18);
	}
	.hc-toc--numbered .et_pb_table_of_contents__link::before {
		content: counter(hc-toc);
		display: inline-flex;
		flex: 0 0 auto;
		align-items: center;
		justify-content: center;
		width: 26px;
		height: 26px;
		border-radius: 50%;
		background: var(--gcid-hc-tan);
		color: var(--gcid-hc-gold-dark);
		font-size: 12px;
		font-weight: 800;
		line-height: 1;
	}
}
