///////////////////////////////////
// Variables
///////////////////////////////////
:root {
	--sidebar-code-color-class-name: rgb(0, 134, 105);
	--sidebar-code-color-operator: blue;
	--sidebar-code-color-method: rgb(61, 52, 18);
	--sidebar-code-color-function: rgb(124, 75, 18);

	--sidebar-background-color: rgb(255, 255, 255);
	--sidebar-background-gradient: rgb(255, 255, 255);

	--sidebar-hide-button-bg: rgb(255, 255, 255);

	--sidebar-border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme='dark']
{
	--sidebar-code-color-class-name: rgb(3, 199, 156);
	--sidebar-code-color-operator: rgb(49, 155, 255);
	--sidebar-code-color-method: rgb(224, 215, 183);
	--sidebar-code-color-function: rgb(235, 235, 235);

	--sidebar-background-color: rgb(32, 32, 34);
	--sidebar-background-gradient: radial-gradient(circle, rgb(24, 24, 34) 0%, rgb(18, 18, 19) 70%, rgb(32, 41, 54) 78%);

	--sidebar-hide-button-bg: transparent;

	--sidebar-border-color: rgba(255, 255, 255, 0.1);
}


.theme-doc-sidebar-container {
	background: var(--sidebar-background-color);
	background: var(--sidebar-background-gradient);

	background-size: calc(var(--doc-sidebar-width)*1) 150vh;
	background-repeat: no-repeat;
	background-attachment: fixed;

	background-position-y: -25vh;
	border-right: 1px solid var(--sidebar-border-color) !important;
	>div {
		>button {
			border: none;
			background: var(--sidebar-hide-button-bg);
		}
	}
}


@mixin SidebarCodeFont {
	font-family: 'Jetbrains Mono', 'Consolas', monospace;
	font-size: 85%;
	letter-spacing: -1px;
}

@mixin GenerateSidebarCodeColor($codeElemName, $colorVar) {
	li.sidebar-code.#{$codeElemName}>div {
		>a {
			@include SidebarCodeFont;
			font-weight: normal;
		}
	
		&:not([class$=--active]) {
			&>a {
				color: var($colorVar);
			}	
		}
		&[class*=menu__link--active] {
			&>a:not([class*=menu__link--active]) {
				color: var($colorVar);
			}
		}
	}
	
	li.sidebar-code.#{$codeElemName}>a {
		@include SidebarCodeFont;
		font-weight: normal;
		&:not([class*=menu__link--active]) {
			color: var($colorVar);
		}
	}
}

.sidebar-function {

}

@mixin GenerateSidebarFlag($classPostfix, $content, $backgroundColor) {
	.sidebar-flag-#{$classPostfix} {
		&>a::after, &>div>a::after {
			margin-left: auto;
			content: $content;
      white-space: nowrap;
			border: 1px solid gray;
			background-color: $backgroundColor;
			border-radius: 15px;
			padding: 0 5px;
			font-size: 90%;
			color: rgb(61, 61, 61);
			transform: rotateZ(0deg) !important;
		}
	}

	html[data-theme="dark"] .sidebar-flag-#{$classPostfix} {
		&>a::after, &>div>a::after {
			color: rgb(219, 219, 219);
		}
	}
}

@include GenerateSidebarFlag('cpp98', 'C++98', transparent); // rgb(201, 201, 201));
@include GenerateSidebarFlag('cpp11', 'C++11', transparent); // rgb(152, 252, 255));
@include GenerateSidebarFlag('cpp14', 'C++14', transparent); // rgb(152, 255, 203));
@include GenerateSidebarFlag('cpp17', 'C++17', transparent); // rgb(94, 231, 162));
@include GenerateSidebarFlag('cpp20', 'C++20', transparent); // rgb(152, 179, 255));
@include GenerateSidebarFlag('cpp23', 'C++23', transparent); // rgb(183, 145, 255));

// \00a0 is non-breaking space (nbsp)
@include GenerateSidebarFlag('since-cpp98', '≥ C++98', transparent); // rgb(201, 201, 201));
@include GenerateSidebarFlag('since-cpp11', '≥ C++11', transparent); // rgb(152, 252, 255));
@include GenerateSidebarFlag('since-cpp14', '≥ C++14', transparent); // rgb(152, 255, 203));
@include GenerateSidebarFlag('since-cpp17', '≥ C++17', transparent); // rgb(94, 231, 162));
@include GenerateSidebarFlag('since-cpp20', '≥ C++20', transparent); // rgb(152, 179, 255));
@include GenerateSidebarFlag('since-cpp23', '≥ C++23', transparent); // rgb(183, 145, 255));
@include GenerateSidebarFlag('until-cpp98', '< C++98', transparent); // rgb(201, 201, 201));
@include GenerateSidebarFlag('until-cpp11', '< C++11', transparent); // rgb(152, 252, 255));
@include GenerateSidebarFlag('until-cpp14', '< C++14', transparent); // rgb(152, 255, 203));
@include GenerateSidebarFlag('until-cpp17', '< C++17', transparent); // rgb(94, 231, 162));
@include GenerateSidebarFlag('until-cpp20', '< C++20', transparent); // rgb(152, 179, 255));
@include GenerateSidebarFlag('until-cpp23', '< C++23', transparent); // rgb(183, 145, 255));

.sidebar-separator {
	&:not(.sidebar-category) {
		padding: 0 !important;
		margin: 0 !important;
		border-bottom: 1px dashed gray;
	}
	max-width: 150px;

	&.sidebar-category {
		background-color: rgba(131, 130, 130, 0.2);
		font-size: 80%;
		font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
		font-weight: normal;
		line-height: 100%;
		padding: 2px 0 2px 5px;
	}
}

html[data-theme='dark'] .sidebar-operator-function>a::before {
	color: rgb(55, 128, 189);
}

@include GenerateSidebarCodeColor(sidebar-class-name, --sidebar-code-color-class-name);
@include GenerateSidebarCodeColor(sidebar-function, --sidebar-code-color-function);
@include GenerateSidebarCodeColor(sidebar-method, --sidebar-code-color-method);
@include GenerateSidebarCodeColor(sidebar-operator-function, --sidebar-code-color-operator);

.menu__caret::before, .menu__link--sublist-caret::after {
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

@mixin GenerateCategoryLevelBorder($categoryLevel, $color) {
	li.theme-doc-sidebar-item-category-level-#{$categoryLevel} {
		&.menu__list-item--collapsed {
			&>div {
				position: relative;
				left: -1px;
			}
		}
		&:not(.menu__list-item--collapsed)>ul>li {
			// border-left: 1px solid $color;
		}
		box-sizing: border-box;
	}
}

li.menu__list-item {
	&>div, &>a {
		border-radius: 0;
	}
}
li.menu__list-item:not(:first-child) {
	margin-top: 0;
}

@include GenerateCategoryLevelBorder(1, rgba(gray, 0.4));

li.theme-doc-sidebar-item-category {
	// @include GenerateCategoryLevelBorder(2, rgba(gray, 0.4));
	// @include GenerateCategoryLevelBorder(3, rgba(gray, 0.4));
	// @include GenerateCategoryLevelBorder(4, rgba(gray, 0.5));
	// @include GenerateCategoryLevelBorder(5, rgba(gray, 0.6));

	&:not(.menu__list-item--collapsed)>ul>li {
		border-left: 1px solid gray;
	}

	>div {
		// border-top: 2px rgba(16, 179, 207, 0.2) solid;
		// box-sizing: border-box;
	}
}

.theme-doc-sidebar-container, .navbar-sidebar
{

ul.menu__list>li {
	font-weight: normal;
	>a {
		line-height: 120%;
	}
}



}