//@import "../../../abstracts/abstracts";

// Note from Jeroen @ 30-01-2024:
// Added .dbqkbbs-breadcrumbs, which are the knowledge base breadcrumbs. 
// When pressing the help button (?) in the header of the BMS, a knowledge base
// is opened directly. It will place its breadcrumbs in the same container as the 
// class list breadcrumbs
.dbqkbbs-breadcrumbs,
#dbq-document-class-list-breadcrumbs {
	display: inline-flex;
	align-items: center;
	height: 60px;
	width: max-content;
	max-width: 100%;
	background-color: transparent;
	padding: 0;
	vertical-align: unset;

	a {
		display: flex;
		color: $text-color-default;
		font-weight: 700;
		font-size: 14px;
		text-decoration: none;
		line-height: 0.8;
		//float: left;

		&.dbq-breadcrumb-back {
			padding: 0px;
		}
		// 0 = Back button
		&[data-type="0"] {
			padding: 0px;
			min-width: max-content;
			&:after {
				line-height: 1.5;
			}
		}
		// 1 = Home button
		&[data-type="1"] {
			padding: 0px;
			min-width: max-content;
			&:after {
				line-height: 1.5;
			}

			svg {
				margin-right: 5px;
			}
		}
		// 2 = Class list breadcrumb item
		// 3 = Knowledge base breadcrumb item
		&[data-type="2"],
		&[data-type="3"] {
			padding: 0;
			line-height: 20px;
			white-space: nowrap;
			
			&:last-child {
				text-overflow: ellipsis;
				overflow: hidden;
			}
			
			&:after {
				line-height: 1;
			}
		}

		&:first-child {
			padding-left: 30px;
		}

		&:not(:last-child) {
			&:after {
				@if ($dark-theme == false) {
					filter: invert(100%); // Change the default white color to black of the svg
				} @else {
					filter: unset;
				}
				content: url("data:image/svg+xml,<svg fill='%23ffffff' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'><g><path d='M6.5,4c-1.3,1.3-2.7,2.7-4,4C2.2,7.7,1.9,7.4,1.6,7.1c0.9-0.9,2-2,3-3C3.6,3,2.5,2,1.5,0.9c0.4-0.3,0.7-0.7,1-0.9C3.8,1.3,5.1,2.7,6.5,4z'/></g></svg>");
				border-top: none;
				border-bottom: none;
				width: 8px;
				margin: 1px 7.5px 0 9.5px;
				position: absolute;
				right: 0;
			}

			.dbqdcl-breadcrumb-icon {
				align-self: center;
			}

			.dbqdcl-breadcrumb-label {
				align-self: center;
				margin-right: 26px;
			}
		}

		&.dbqdcl-breadcrumb-back {
			&:after {
				display: none;
			}
		}

		&.dbqdcl-breadcrumb-home {
			.dbqdcl-breadcrumb-icon {
				margin-right: 0;
			}
		}

		svg {
			fill: $text-color-default;
		}
	}
}