
.custom-block-sidebar-menu {
	.menu,
	.sub-menu {
		list-style: none;
		margin: 0;
		padding: 0;
		line-height: 2;
	}

	.sub-menu {
		.current-menu-item > a {
			text-decoration: underline;
		}

		.sub-menu {
			padding-left: 2em;
		}
	}

	.menu {
		a {
			color: var(--custom-s--color--text-main);
			display: block;
			line-height: 1;
			margin: .25em 0;
			padding: .5em .75em;

			&:focus,
			&:hover {
				text-decoration: underline;
			}
		}

		/* Section heading */
		& > li.current-menu-item:first-child > a,
		& > li.current-menu-ancestor > a,
		& > li.current-menu-ancestor > a:visited {
			color: var(--custom-s--color--secondary, #333);
			border-bottom: solid 4px var(--custom-s--color--primary, #666);
			display: block;
			font-weight: var(--custom-s--font--primary-bold);
			text-decoration: none;
			margin-bottom: 1em;
			padding: 0 0 1em 0;
		}

		& > li.current-menu-ancestor > a:focus,
		& > li.current-menu-ancestor > a:hover {
			background-color: transparent;
			cursor: default;
		}
	}
}

/* remove bottom margin from block if empty and used in a widget */
.widget_block:has(.custom-s-block-sidebar-menu:empty) {
	margin-bottom: 0;
}
