@import "../../style/vars";

.navTheme(@name, @nav-bg, @selected-bg, @select-border) {
	.z-layout-@{name} .z-scroll-color {
		.iScrollIndicator {
			// background-color: rgba(@color: lighten(@color: @nav-bg, @amount: 40%), @alpha: 0.7);
			background-image: @--defatul-ScrollbarColor;
		}
	}

	&.is-@{name} {
		background-color: @nav-bg;

		.ant-menu-dark .ant-menu-inline.ant-menu-sub {
			box-shadow: none;
		}

		.ant-menu-dark .ant-menu-item:hover,
		.ant-menu-dark.ant-menu-inline-collapsed .ant-menu-submenu-title:hover {
			background-color: #1c3e5f;
		}
		.ant-menu.ant-menu-root.ant-menu-dark .ant-menu-item-selected {
			color: lighten(@nav-bg, 90%);
			background-color: @selected-bg;
			&:after {
				border-right: 4px solid @select-border;
				transform: scaleY(1);
				opacity: 1;
			}
		}
		.ant-menu-dark .ant-menu-sub {
			background-color: @nav-bg;
		}

		.ant-menu-dark.ant-menu-inline-collapsed .ant-menu-submenu-selected {
			background-color: #1c3e5f;
		}
	}
}

.logoTheme(@name, @nav-bg) {
	&.is-@{name} {
		background-color: @nav-bg;
		border-bottom: 1px solid @nav-bg;
		color: lighten(@nav-bg, 90%);
	}
}

.z-main-left {
	position: relative;
	z-index: 3;

	user-select: none;
	&.is-dark {
		box-shadow: none;
	}
	&.is-light {
		box-shadow: 2px 0px 6px #dbdbdb;
	}
}

.z-main-logo {
	white-space: nowrap;
	overflow: hidden;
	.logoTheme(light, @--main-logo-light-bg);
	.logoTheme(dark, @--main-logo-dark-bg);
	.logoTheme(mazarine, @--main-logo-mazarine-bg);
	&.is-light {
		background-color: @--main-logo-light-bg;
		border-bottom: 1px solid #e3e6ea;
		color: #333333;
	}
}
.z-main-nav {
	.ant-menu-dark {
		background-color: transparent;
	}

	.navTheme(light, @--main-nav-light-bg, @--blue-deep, @--yellow-color);
	.navTheme(dark, @--main-nav-dark-bg, @--blue-deep, @--yellow-color);
	.navTheme(mazarine, @--main-nav-mazarine-bg, @--blue-deep, @--yellow-color);
	&.is-light {
		.ant-menu-submenu.ant-menu-submenu-open .ant-menu-submenu-title {
			color: @primary-color;
		}
	}

	.ant-menu-inline,
	.ant-menu-vertical,
	.ant-menu-vertical-left {
		border-right: 0;
	}
}

.z-main-header {
	background-color: white;
	border-bottom: 1px solid #e3e6ea;
}
