@import url("https://fonts.googleapis.com/css?family=Poppins");
@import "../variables.css";

html[theme="light"] {
	.mobile-analyst-nav__btn {
		&.active{
			background-color: #333;
		}
	}
}

.header-content {
	background: var(--header-bg-color);
	padding-block: 7px;
	display: flex;
	align-items: center;
	height: var(--header-height);
}

.header {
	display: flex;
	justify-content: space-between;
	width: 100%;
	background: var(--header-bg-color);
	padding: 0 90px;
	max-width: 100%;
}

header.headerWrapper {

	z-index: 120;
}

.logo-block {
	display: flex;
	align-items: center;

}

.logo {
	height: 32px;
	display: block;
	margin-right: 15px;

	img {
		width: 100%;
		height: 100%;
	}
}

.top-slogan {
	padding-top: 5px;
	color: var(--text-header-color);
	font-family: "Poppins";
	font-style: normal;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;

	&:hover {
		opacity: 1;
	}
}

.header-menu-button,
.search-icon-mobile {
	display: none;
}

/* ------------------- Top Nav ------------------- */
.top-menu-nav-wrapper {
	display: flex;
	align-items: center;
	min-height: 39px;
}

.top-links {
	padding-left: 0;
	display: flex;
	margin: 0;
	height: 100%;
	align-items: center;

	li {
		text-align: center;
		padding-inline: 12px;

		a {
			font-family: "Poppins";
			font-style: normal;
			font-weight: 400;
			font-size: 14px;
			line-height: 1.3125em;
			color: var(--text-header-color);
			text-decoration: none;
			opacity: 0.7;
			transition-duration: 0.3s;
			transition-timing-function: ease-in-out;
		}
	}
}

/* .top-links-not-auth li:last-child {
	padding-right: 0;
} */

.header-subscribe-mobile-button {
	display: none;
}

.top-links a:hover,
.top-links a:focus,
.top-links .topnav_active a {
	opacity: 1;
}

.top-links .submenu a:hover {
	background-color: var(--social-icons-bg);
	border-radius: var(--rounded-lg);
}

.user-name {
	display: none;
	color: var(--color-text);
}

.search-icon-mobile-template {
	display: none;
}


.header_responsive {
	position: fixed;
	background-color: var(--color-white);
	width: 100%;
	height: 0;
	top: var(--header-height);
	left: 0;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	z-index: 101;
	transition: all 0.4s ease-in-out;
	overflow: hidden;
	opacity: 0.4;
}

.header_responsive::-webkit-scrollbar {
	display: none;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.header_responsive.show {
	padding: 18px 32px;
	opacity: 1;
	height: calc(100% - var(--header-height));
}

.mobile-analyst-nav {
	display: none;
}

.close-btn {
	width: 24px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	font-size: 0;
	color: var(--color-icon);

	&::after {
		width: 100%;
		height: 100%;
		display: block;
		content: '';
		-webkit-mask-position: center;
		-webkit-mask-repeat: no-repeat;
		-webkit-mask-size: contain;
		-webkit-mask-image: url('/img/icons/close.svg');
		mask-position: center;
		mask-repeat: no-repeat;
		mask-size: contain;
		mask-image: url('/img/icons/close.svg');
		background-color: currentColor;
		transition: 0.2s ease;
	}
}

.back-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	flex-shrink: 0;
	aspect-ratio: 1;
	background: rgba(67, 67, 67, 0.4);
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
	color: var(--color-icon);
	font-size: 0;
	padding: 6px;
	border-radius: 50%;

	&::before {
		width: 100%;
		height: 100%;
		display: block;
		content: '';
		-webkit-mask-image: url('/img/icons/chevron-left.svg');
		-webkit-mask-size: contain;
		-webkit-mask-repeat: no-repeat;
		-webkit-mask-position: center;
		mask-image: url('/img/icons/chevron-left.svg');
		mask-size: contain;
		mask-repeat: no-repeat;
		mask-position: center;
		background-color: currentColor;
	}
}

/* Smaller than 16 inch Macbook size */
@media screen and (min-width: 1441px) and (max-width: 1700px) {
	.header {
		height: 100%;
		align-items: center;
		padding-inline: 20px;
	}
}

@media screen and (min-width: 1151px) and (max-width: 1440px) {
	.header {
		height: 100%;
		align-items: center;
		padding-inline: 10px;
	}
}

@media screen and (max-width: 1150px) {
	.header {
		height: 100%;
		align-items: center;
		padding-inline: 20px;
		display: grid;
		grid-template-columns: 30% 40% 30%;

		#loginDeskTop {
			display: none;
		}
	}

	.header-content {
		padding-block: 6px;
		height: var(--header-height);
	}

	.logo {
		display: flex;
		align-items: center;
		justify-content: center;
		margin: 0;

		img {
			width: 80%;
			height: auto;
		}
	}

	.header-menu-button {
		margin-left: auto;
		order: 1;
	}
	.header-menu-button,
	.search-icon-mobile ,
	.js-to-news{

		transition: all 0.4s ease-in-out;
	}

	.header-menu-button,
	.search-icon-mobile {
		position: relative;
		display: block;
		width: 24px;
		height: 24px;
		padding: 0;
		background: transparent;
		border: none;
	}
	.header-menu-button.is-hidden-for-news {
		opacity: 0;
		pointer-events: none;
	}

	.search-icon-mobile {
		margin: 0;

	}

	.search-icon-mobile-template {
		display: block;
		opacity: 0;
	}

	.top-slogan {
		position: absolute;
		width: 1px;
		height: 1px;
		opacity: 0;
		font-size: 0;
		outline: none;
	}

	.top-menu {
		position: absolute;
		z-index: 101;
		top: 56px;
		left: 0;
		width: 100%;
		height: 0;
		background-color: var(--color-white);
		opacity: 0.4;
		overflow: hidden;
		transition: all 0.4s ease-in-out;
	}

	.signIn-modal-active .top-menu,
	.signIn-modal-active #MainBody_Overview_pnlSettings {
		transition: none;
	}

	.top-menu-nav-wrapper {
		display: flex;
		flex-direction: column;
		overflow: auto;
		align-items: stretch;
	}

	.top-menu-nav-wrapper>* {
		opacity: 0.3;
		transition: all 0.2s ease-in-out 0.1s;
	}

	.sidebar-close-btn,
	.top-menu-close-btn {
		display: none;
	}

	.burger-animated:before,
	.burger-animated:after,
	.burger-animated {
		content: "";
		position: absolute;
		display: block;
		width: 20px;
		height: 2px;
		background-color: var(--color-icon);
		border-radius: var(--rounded-sm);
		transition: all 0.3s ease-in-out;
	}

	.burger-animated {
		top: 12px;
		left: 2px;
	}

	.burger-animated:before {
		top: -7px;
		left: 0;
	}

	.burger-animated:after {
		top: 7px;
		left: 0;
	}

	.menu-open .burger-animated {
		width: 0;
		height: 0;
		background-color: transparent;
	}

	.menu-open .burger-animated:after {
		top: 0;
		transform: rotate(45deg);
	}

	.menu-open .burger-animated:before {
		top: 0;
		transform: rotate(-45deg);
	}

	.menu-open .burger-animated:before,
	.menu-open .burger-animated:after,
	.menu-open .burger-animated {
		transition: all 0.3s ease-in-out;
	}



	.search-animated {

		&::before,
		&::after {
			content: "";
			position: absolute;
			transition: all 0.3s ease-in-out;

		}

		&::before {
			top: 1px;
			left: 1px;
			width: 12px;
			height: 12px;
			border-radius: 50%;
			border: 2px solid #fff;
			box-sizing: content-box;
		}

		&::after {
			width: 12px;
			height: 2px;
			transform: rotate(45deg);
			bottom: 4px;
			right: 0;
			border-radius: 2px;
			background-color: #fff;
		}
	}

	.sidebar-open .search-animated:before,
	.sidebar-open .search-animated:after {
		border: none;
		width: 20px;
		height: 2px;
		background-color: var(--color-white);
		top: 50%;
		left: 2px;
		transform: rotate(45deg);
		transition: all 0.3s ease-in-out;
	}

	.sidebar-open .search-animated:after {
		transform: rotate(-45deg);
	}

	.menu-open .top-menu {
		height: calc(100dvh - var(--header-height));
		padding: 32px 20px;
		overflow: auto;
		opacity: 1;
	}

	.menu-open .top-menu-nav-wrapper>* {
		opacity: 1;
	}

	.menu-open .top-menu-nav-wrapper>*:last-child {
		flex-grow: 1;
	}

	.menu-open .authorized-user .top-menu-nav-wrapper>*:last-child {
		flex-grow: 0;
	}

	.top-links {
		display: block;
		height: auto;

		li {
			width: 100%;
			margin: 0;

			a {
				position: relative;
				display: flex;
				align-items: center;
				width: 100%;
				padding: 14px;
				margin-bottom: 12px;
				font-size: 18px;
				line-height: 1.67;
				font-weight: 500;
				color: var(--checkbox-text-color);
				background-color: var(--header-mobile-nav-bg-color);
				border-radius: 8px;
				opacity: 1;
				-webkit-tap-highlight-color: transparent;

				&::before,
				&::after {
					content: "";
				}

				&::before {
					position: relative;
					display: inline-block;
					width: 24px;
					height: 24px;
					margin-right: 12px;
					transition: all 0.3s ease-in-out;
					background-position: center;
					background-repeat: no-repeat;
					background-size: contain;
				}

				&::after {
					position: absolute;
					top: 0;
					bottom: 0;
					right: 16px;
					margin: auto 0;
					display: block;
					width: 8px;
					height: 8px;
					transform: rotate(45deg);
					border: var(--grey-arrow) 1px solid;
					border-left-color: transparent;
					border-bottom-color: transparent;
				}

				&.home:before {
					background: url("/img/icons/home-icon.svg");
				}

				&.contact:before {
					background: url("/img/icons/contact-icon.svg");
				}

				&.news:before {
					background: url("/img/icons/news-icon.svg");
				}

				&.leads:before {
					background: url("/img/icons/leads-icon.svg");
				}

				&.database:before {
					background: url("/img/icons/database-icon.svg");
				}

				&:hover {
					background-color: var(--header-mobile-nav-click);
					color: #000;

					&::before {
						filter: invert(1) brightness(0.5) !important;
					}
				}

				&:active {
					background-color: var(--header-mobile-nav-click);
				}

				&.open {
					background-color: var(--color-white);
				}
			}
		}

		&.main-nav {

			li {

				a {

					&:after {
						content: none;
					}
				}
			}
		}
	}

	.authorized-user .top-menu-nav-wrapper {
		flex-direction: column-reverse;
		justify-content: flex-end;
	}

	.sidebar-open .header-menu-button,
	.menu-open .search-icon-mobile {
		pointer-events: none;
		opacity: 0;
		transition: all 0.4s ease-in-out;
	}

	.top-menu-nav-wrapper {
		overflow: auto;
		min-height: 100%;
	}

	.user-name {
		display: block;
	}

	.header-subscribe-mobile-button {
		text-align: center;
		background-color: var(--subscribe-btn-color);
		padding: 6px 13px;
		border-radius: 8px;
		transition: all .2s ease-in-out;
		display: block;
		opacity: 1;
		color: var(--color-white);
		text-align: center;
		font-size: 14px;
		font-family: "Poppins";
		font-weight: 500;
		line-height: 1.43;
		order: -1;

		&:hover {
			background-color: var(--subscribe-btn-color-hover);
		}

		&:active {
			transition: all .1s ease-in-out;
			background-color: var(--subscribe-btn-color-focus);
		}
	}

	.header {
		&>.goToSubscribe {
			margin-right: auto;
		}
	}
}

.close-menu-btn {
	display: none;
}

@media screen and (max-width: 1150px) {

	.close-menu-btn {
		display: flex;
		font-size: 0;
		align-items: center;
		justify-content: center;
		width: 24px;
		height: 24px;
		color: var(--color-icon);
		flex-shrink: 0;

		&::before {
			content: '';
			display: block;
			width: 100%;
			height: 100%;
			mask: url('/img/icons/close.svg') center/contain no-repeat;
			background-color: currentColor;
		}
	}

	.top-slogan {
		display: none;
	}

	.top-links li {
		margin-right: 12px;
	}

	.mobile-analyst-nav {
		display: block;
		background-color: var(--header-bg-color);
		margin-top: var(--header-height);
		position: relative;
		z-index: 15;
	}

	.mobile-analyst-nav__list {
		display: flex;
		padding: 4px;
		gap: 4px;
	}

	.analytic-panel__news {
		&.leads__news {
			display: flex;
		}
	}

	.mobile-analyst-nav__btn {
		flex: 1;
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 4px 16px;
		height: 38px;
		background: rgba(37, 37, 37, 0.62);
		border-radius: var(--rounded-md);
		color: var(--color-icon-inactive);

		&::before {
			content: '';
			display: block;
			width: 24px;
			aspect-ratio: 1;
			flex-shrink: 0;
			background-color: currentColor;
			-webkit-mask-position: center;
			-webkit-mask-repeat: no-repeat;
			-webkit-mask-size: contain;
			mask-position: center;
			mask-repeat: no-repeat;
			mask-size: contain;
		}

		&.active {

			background: var(--color-bg3);
			box-shadow: 2px 3px 8px rgba(31, 32, 36, 0.63);

			color: #fff;
		}

		&.mobile-analyst-nav__btn--news {
			&::before {

				-webkit-mask-image: url("/img/icons/news.svg");
				mask-image: url("/img/icons/news.svg");
			}
		}

		&.mobile-analyst-nav__btn--filter {
			&::before {

				-webkit-mask-image: url("/img/icons/score.svg");
				mask-image: url("/img/icons/score.svg");
			}
		}

		&.mobile-analyst-nav__btn--preview {
			&::before {

				-webkit-mask-image: url("/img/icons/profile.svg");
				mask-image: url("/img/icons/profile.svg");
			}
		}
	}
}

@media (hover: hover) and (pointer: fine) {
	.close-btn {
		&:hover {
			&::after {
				rotate: 90deg;
			}
		}
	}
}
