/* WPJobster Header styles */

$notification_icons_url: '../images/sprites/transaction-icons-sprite.webp?v=1.2';

/* Header */
.header-wrapper {
	box-shadow: 0px 5px 10px 0px rgba(18, 28, 144, 0.1);
	background: $whiteColor;
	z-index: 100;
	position: relative;

	&.fixed, .fixed {
		@include card-shadow-big();
		position: fixed;
		will-change: transform;
		top: 0;
		width: 100%;
		z-index: 999;
		left: 0;
		right: 0;
		background-color: $whiteColor;
	}

	&.sticky, .sticky {
		position: sticky;
	}

	.main-content {
		display: flex;
		align-items: center;
	}

	&.header-wrapper-full .main-content {
		width: 100%;
		max-width: 100%;
		padding-left: 10px;
		padding-right: 10px;
	}

	.header-right-wrapper {
		margin-left: auto;
		display: flex;
		align-items: center;

		.authentication-buttons {
			margin-left: 3px;
			display: flex;

			a {
				font-weight: 600;
			}
		}
	}

	.logo-holder {
		margin-right: 80px;

		@include medium-desktop {
			margin-right: 50px;
		}

		.logo-white {
			display: none;
		}
	}

	.header-wrapper-menu-holder {
		height: 40px;
	}
}

.admin-bar {
	.header-wrapper {
		&.fixed, .fixed {
			top: 32px;

			@include mobile {
				top: 0;
			}
		}
	}
}

/* Homepage header */
.home.without-header:not(.logged-in) {
	.header-wrapper {
		background: transparent;
		box-shadow: none;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		box-shadow: none;
		&:not(.fixed) {
			padding-top: 20px;
		}

		&.header-mobile {
			width: 100vw;
			padding-top: 0;
		}
	}

	.header-wrapper-top {
		&:not(.fixed) {
			background: none;
		}

		.logo-holder {
			.logo-white {
				display: inline;
			}
			.logo:not(.logo-white) {
				display: none;
			}
		}
	}

	.text-button-simple {
		color: $whiteColor;
	}

	.header-wrapper-menu {
		background: none;

		&.header-menu-border {
			border-top: 1px solid $borderColor;
		}
	}

	.header-language-and-currency {
		background: $whiteColor;
		box-shadow: 0px 10px 20px 0px rgba(55, 64, 157, 0.15);
		top: -20px; // keep in sync with padding-top of .home.without-header:not(.logged-in) .header-wrapper
	}

	.header-wrapper-top.fixed {
		.logo-holder .logo:not(.logo-white) {
			display: inline !important;
		}

		.logo.logo-white {
			display: none;
		}

		.header-secondary-menu-wrapper a {
			color: $navigationColor;
		}

		.text-button-simple {
			color: $navigationColor;
		}

		.header-language-and-currency {
			top: 0;
		}

		.text-button-simple {
			color: $headlinesColor;
		}
	}

	.header-mobile {
		.header-wrapper-top {
			&:not(.fixed) {
				.menu-right .icon,
				.menu-left .icon {
					color: $whiteColor;
					text-shadow: none;
				}
			}
		}
	}
}

/* Mobile header */
.header-mobile {
	.ui.grid {
		width: 100vw;

		@include mobile {
			margin-left: -20px;
			margin-right: -20px;
		}
	}

	@include mobile {
		.bordered-row {
			box-shadow: 0 1px 5px -1px rgb(0 0 0 / 13%);
			padding: 12px 0 0px 0 !important;
			height: inherit;
		}
	}

	.logo-holder {
		text-align: center;
		margin-right: 0;
	}

	.user-info-menu .header-user-avatar {
		text-align: right;
	}

	.header-wrapper-menu {
		padding: 5px 0 10px;
	}

	.user-notification-icons {
		.nh-submenu {
			transform: translateX(-5%);

			&:before,
			&:after {
				left: 5%;
			}
		}
	}

	i.thick.bars.icon {
		text-shadow: none;
	}

	.menu-left {
		.icon {
			color: $headlinesColor3;
		}
	}

	.menu-right {
		.icon {
			color: $headlinesColor3;
		}
	}

	.left-mobile-menu-image,
	.right-mobile-menu-image {
		width: 50px;
		height: auto;
	}
}

/* Sidebars */
.ui.sidebar {
	.nh-accordion {
		padding-left: 1em;
	}
}

/* Language and currency */
.ui.labeled.icon.buttons > .button.wpj-language-switcher > .icon,
.ui.labeled.icon.button.wpj-language-switcher > .icon,
.ui.labeled.icon.buttons > .button.currency > .icon,
.ui.labeled.icon.button.currency > .icon {
	background-color: rgba(0,0,0,.02);
}

.header-language-and-currency {
	position: absolute;
	top: 0px;
	right: -30px;
	transform: translateX(100%);
	z-index: 100;
	background: $grayBackground3;
	border: 1px solid $borderColor;
	border-bottom-right-radius: 6px;
	border-bottom-left-radius: 6px;

	@include medium-desktop {
		right: -10px;
	}

	@include small-desktop {
		max-width: 60px;
		display: flex;
		flex-wrap: wrap;
	}

	.dropdown-menu {
		border-radius: 0;
		border-bottom-left-radius: 6px;
		background: transparent;

		@include small-desktop {
			width: 100%;
		}

		&.currency {
			border-bottom-right-radius: 6px;
		}

		&.wpj-language-switcher {
			border-bottom-left-radius: 6px;

			> .text > .flag {
				display: none;
			}
		}

		.trigger-text {
			background: none !important;
		}

		.dropdown-menu-list {
			right: 0;
			left: auto;
		}
	}

	> div:last-child {
		border-left: 1px solid $borderColor;

		@include small-desktop {
			border: 0;
			border-top: 1px solid $borderColor;
		}
	}

	.dropdown-menu .trigger-text {
		border-radius: 0;
	}
}

/* User account menu */
.user-info-menu .ui.list > .item .description {
	text-align: left;
	background-color: $mainColor;
	color: $whiteColor;
	font-size: .857rem;
	border-radius: .21428571428rem;
	padding: 3px 3px 1px 3px;
}

/* User account dropdown menu */
.nh-submenu {
	&.nh-accordions {
		a {
			width: 100%;
			display: block;
		}

		ul {
			list-style-type: none;
			padding: 0;
			margin: 0;
		}

		li {
			padding: 0;
			border-bottom: 0;
			position: relative;

			&:not(:first-child):before {
				content: '';
				width: calc(100% - 22px);
				margin: -1px 11px 0;
				height: 1px;
				background: #f1f2f3;
				position: absolute;
				top: 0;
				left: 0;
			}

			a {
				padding: 6px 11px;
				display: block;
			}
		}
	}

	ul {
		list-style-type: none;
		padding: 0;
		margin: 0;
	}

	li {
		padding-bottom: 2px;
		padding-top: 2px;
		border-bottom: 1px solid #eeeeef;

		&:first-child {
			padding-top: 0;
		}

		&:last-child {
			padding-bottom: 0;
			border-bottom: 0;
		}
	}

	a {
		color: #333435;
		text-decoration: none;
	}
}

.nh-accordion-container {
	.nh-accordion-handler {
		&:after {
			content: "\f0d7";
			font-family: Icons !important;
			font-size: .8em;
			color: #747576;
			position: absolute;
			right: 11px;
			top: 15px;
			-webkit-transition: -webkit-transform 0.2s;
			-moz-transition: -moz-transform 0.2s;
			-o-transition: -o-transform 0.2s;
			transition: transform 0.2s;
		}

		&.nh-accordion-selected:after {
			-webkit-transform: rotate(180deg);
			-moz-transform: rotate(180deg);
			-ms-transform: rotate(180deg);
			-o-transform: rotate(180deg);
			transform: rotate(180deg);
		}
	}

	.nh-accordion {
		display: none;
		background: rgba(255, 255, 255, 0.03);
		border-radius: 6px;
	}
}

/* Main menu */
.main-menu-container {
	width: 100%;
	display: flex;
	flex-direction: column;
}

.main-menu-container,
.header-secondary-menu-wrapper {
	&.slider {
		ul {
			white-space: nowrap;
			overflow: hidden;
			flex-flow: initial;
		}

		.arrows-wrapper {
			display: none;

			&.visible {
				display: block;
			}

			a {
				margin-top: 12px;

				i {
					font-size: 16px;
					cursor: pointer;
				}
			}

			.menu-direction-left {
				margin-left: -5px;
				padding-right: 10px;
			}

			.menu-direction-right {
				margin-right: -5px;
				padding-left: 10px
			}
		}
	}

	ul {
		display: flex;
		justify-content: space-between;
		list-style: none;
		flex-flow: row wrap;

		li {
			margin: 0;
			padding: 0;
			position: relative;
			white-space: nowrap;

			a {
				font-size: 14px;

				&:hover {
					color: $mainColor;
				}
			}
		}
	}

	.menu-list-with-children {
		> * {
			box-sizing: border-box;
		}

		> li {
			> a {
				padding: 10px 20px 10px;
				display: inline-block;
				font-size: 14px;
				font-weight: 400;
				color: $navigationColor;
				padding-left: 0;

				@include small-desktop {
					padding: 10px 5px;
				}

				&:hover {
					color: $mainColor;
				}
			}

			> .ul-single-column {
				li {
					&.menu-item-has-children {
						&:first-child {
							&:after, &:before {
								top: 13px;
							}
						}
					}
				}
			}

			&:last-child > a {
				padding-right: 0;
			}
		}

		.menu-item-has-children {
			&:hover {
				> .sub-menu {
					display: grid;
				}
			}

			.sub-menu {
				@include card-shadow-big();
				@include default-shape();

				display: none;
				position: absolute;
				background: $whiteColor;
				z-index: 99;
				padding: 0;
				margin: 0;
				top: 100%;

				li {
					display: block;
					width: 100%;
					position: relative;
					white-space: nowrap;
					border: none;
					padding: 5px 20px;

					&:first-child {
						padding-top: 10px;
					}

					&:last-child {
						padding-bottom: 10px;
					}

					&.menu-item-has-children {
						&:after, &:before {
							font-family: "Icons";
							font-size: 10px;
							position: absolute;
							top: 8px;
						}
					}

					&:first-child {
						> .sub-menu {
							top: 0;
						}
					}

					.sub-menu {
						top: -5px;
					}
				}

				&.right0 {
					&:not(.text-left):not(.text-right) {
						text-align: right;
					}

					li {
						&.menu-item-has-children {
							&:before {
								content: "\f053";
								left: 6px;
							}
						}

						.sub-menu {
							margin-right: 100%;
							right: 0;
						}
					}
				}

				&.left0 {
					&:not(.text-left):not(.text-right) {
						text-align: left;
					}

					li {
						&.menu-item-has-children {
							&:after {
								content: "\f054";
								right: 6px;
							}
						}

						.sub-menu {
							margin-left: 100%;
							left: 0;
						}
					}
				}

				&.ul-multiple-columns {
					list-style-type: disc;
					list-style-position: inside;
					padding: 5px;
					margin-top: 0;

					@for $i from 2 through 10 {
						&--#{$i} {
							grid-template-columns: repeat(#{$i}, 1fr);
						}
					}

					li {
						&:first-child {
							padding-top: 5px;
						}

						&:last-child {
							padding-bottom: 5px;
						}

						.sub-menu {
							top: 0px;
						}
					}
				}
			}
		}
	}
}

/* Secondary menu */
.header-secondary-menu-wrapper {
	margin-left: 10px;
	margin-right: 10px;

	> .menu-list-with-children {
		list-style-type: none;
		margin: 0;
		padding: 0;
		width: 100%;
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		text-align: center;
		justify-content: unset;

		> li {
			position: relative;
			display: inline;
			list-style-type: none;
			padding-top: 15px;
			padding-bottom: 15px;
			padding-right: 5px;

			&:not(:first-child) {
				padding-left: 5px;
				margin-left: 20px;

				@include medium-desktop {
					margin-left: 10px;
				}
			}

			&.menu-item-has-children {
				> .sub-menu {
					top: 92%;
				}
			}

			> a {
				display: inline-block;
				font-size: 14px;
				color: $navigationColor;
				font-weight: 600;
				padding: 0;

				@include small-desktop {
					font-size: 13px;
				}

				&:hover {
					color: $mainColor;
				}
			}

			> .sub-menu {
				text-align: left;
			}
		}
	}
}

body:not(.home.without-header):not(.logged-in) {
	.header-secondary-menu-wrapper {
		margin-left: 20px;
		margin-right: 0;
	}
}

/* Dropdown menu */
.user-info-menu {
	padding-left: 20px;
	position: relative;

	.header-user {
		display: block;
	}

	.header-user-avatar {
		position: relative;
	}

	.header-user-credit {
		@include round(10px);

		position: absolute;
		right: -3px;
		bottom: -5px;
		font-size: 11px;
		font-weight: 600;
		color: $whiteColor;
		background: $mainColor;
		border: 2px solid $whiteColor;
		padding: 3px 5px;
		letter-spacing: 0.5px;
		white-space: nowrap;
		line-height: 1;
		min-width: 50px;
		text-align: center;
	}
}

/* User notification icons */
.user-notification-icons {
	display: flex;
	align-items: center;
	cursor: pointer;

	.icon-img {
		height: 20px;
		width: 20px;
	}

	i.icon {
		font-size: 20px;
	}

	.unread-label {
		@include round(7px);

		position: absolute;
		top: 0;
		right: 0;
		transform: translate(50%, -50%);
		width: 14px;
		height: 14px;
		display: flex;
		align-items: center;
		align-content: center;
		justify-content: center;
		color: $whiteColor;
		background: $redColor;
		font-size: 10px;
		font-weight: 600;
		line-height: 14px;
		text-align: center;
		vertical-align: middle;

		span {
			color: $whiteColor;
			font-size: inherit;
			font-weight: inherit;
			line-height: 14px;
			width: 100%;
			height: 100%;
			text-align: center;
			vertical-align: middle;
		}
	}

	.user-notification-icon {
		margin-right: 15px;
		position: relative;
	}

	.user-notification-icon-link {
		display: block;
		cursor: pointer;
		width: 100%;
		height: 100%;
		position: absolute;
		bottom: 0;
	}

	.nh-submenu {
		@include default-shape();
		@include dropdown-shadow();

		position: absolute;
		top: calc(100% + 9px);
		left: 50%;
		display: none;
		z-index: 100;
		background: $whiteColor;
		padding: 10px 10px 0 10px;
		min-width: 300px;
		max-width: 350px;
		text-align: left;
		box-sizing: border-box;
		transform: translateX(-50%);

		&:before,
		&:after {
			content: "";
			position: absolute;
			top: -9px;
			left: 50%;
			transform: translateX(-50%);
			width: 0;
			height: 0;
			border-left: 9px solid transparent;
			border-right: 9px solid transparent;
			border-bottom: 9px solid $whiteColor;
		}

		&.preview-dropdown {
			.antiscroll-wrap {
				display: block;
				position: relative;
				overflow: hidden;

				.antiscroll-inner {
					width: 100%;
					max-height: 350px;
				}

				.wpj-view-all-cnt {
					padding: 10px 0;
					text-align: center;
				}
			}
		}

		.mCSB_container {
			ul {
				list-style: none;

				li {
					margin: 0;
					padding: 0;
					background: none;
					border-bottom: 1px solid $borderColor;

					> a {
						display: flex;
						text-decoration: none;
						align-items: center;
						padding: 5px 20px;
						background: $whiteColor;

						&:hover {
							background: $grayBackground3;
						}
					}

					&.unread {
						> a {
							background: $grayBackground3;
						}
					}
				}
			}

			p {
				text-align: center;
			}
		}

		.pm-preview-link {
			display: flex;
			text-decoration: none;
			align-items: center
		}

		.nh-notification-icon {
			margin: 0;
			background: url('../images/notification/sent.png') no-repeat;
			background-size: contain;
			width: 50px;
			height: 50px;
			flex-shrink: 0;

			img {
				max-height: 100%;
				max-width: 100%;
			}
		}

		.nh-notification-right {
			padding-left: 10px;
			font-size: 14px;
			font-weight: 400;
			flex-grow: 1;
		}

		.nh-notification-content {
			font-size: 14px;
		}

		.nh-notification-username {
			font-size: 13px;
			font-weight: 600;
			color: $secondaryColor;
			margin-bottom: 3px;
		}

		.nh-notification-date {
			margin-top: 3px;
			font-size: 10px;
			text-transform: uppercase;
			color: $mainTextColor;
		}
	}
}

/* Notification icons */
.nh-notification-icon {
	&.accepted {
		background: url($notification_icons_url) -50px -50px no-repeat;
		&.white {
			background: url($notification_icons_url) -50px -200px no-repeat;
		}
		&.green {
			background: url($notification_icons_url) -50px -100px no-repeat;
		}
		&.orange {
			background: url($notification_icons_url) -50px -150px no-repeat;
		}
		&.red {
			background: url($notification_icons_url) -50px -200px no-repeat;
		}
	}
	&.delivered {
		background: url($notification_icons_url) -100px -50px no-repeat;
		&.white {
			background: url($notification_icons_url) -100px -200px no-repeat;
		}
		&.green {
			background: url($notification_icons_url) -100px -100px no-repeat;
		}
		&.orange {
			background: url($notification_icons_url) -100px -150px no-repeat;
		}
		&.red {
			background: url($notification_icons_url) -100px -200px no-repeat;
		}
	}
	&.declined {
		background: url($notification_icons_url) -150px -50px no-repeat;
		&.white {
			background: url($notification_icons_url) -150px -200px no-repeat;
		}
		&.green {
			background: url($notification_icons_url) -150px -100px no-repeat;
		}
		&.orange {
			background: url($notification_icons_url) -150px -150px no-repeat;
		}
		&.red {
			background: url($notification_icons_url) -150px -200px no-repeat;
		}
	}
	&.declined2 {
		background: url($notification_icons_url) -200px -50px no-repeat;
		&.white {
			background: url($notification_icons_url) -200px -200px no-repeat;
		}
		&.green {
			background: url($notification_icons_url) -200px -100px no-repeat;
		}
		&.orange {
			background: url($notification_icons_url) -200px -150px no-repeat;
		}
		&.red {
			background: url($notification_icons_url) -200px -200px no-repeat;
		}
	}
	&.modification {
		background: url($notification_icons_url) -250px -50px no-repeat;
		&.white {
			background: url($notification_icons_url) -250px -200px no-repeat;
		}
		&.green {
			background: url($notification_icons_url) -250px -100px no-repeat;
		}
		&.orange {
			background: url($notification_icons_url) -250px -150px no-repeat;
		}
		&.red {
			background: url($notification_icons_url) -250px -200px no-repeat;
		}
	}
	&.admin-action {
		background: url($notification_icons_url) -300px -50px no-repeat;
		&.white {
			background: url($notification_icons_url) -300px -200px no-repeat;
		}
		&.green {
			background: url($notification_icons_url) -300px -100px no-repeat;
		}
		&.orange {
			background: url($notification_icons_url) -300px -150px no-repeat;
		}
		&.red {
			background: url($notification_icons_url) -300px -200px no-repeat;
		}
	}
	&.star {
		background: url($notification_icons_url) -350px -50px no-repeat;
		&.white {
			background: url($notification_icons_url) -350px -200px no-repeat;
		}
		&.green {
			background: url($notification_icons_url) -350px -100px no-repeat;
		}
		&.orange {
			background: url($notification_icons_url) -350px -150px no-repeat;
		}
		&.red {
			background: url($notification_icons_url) -350px -200px no-repeat;
		}
	}
	&.arbitration {
		background: url($notification_icons_url) -400px -200px no-repeat;
		&.white {
			background: url($notification_icons_url) -400px -200px no-repeat;
		}
		&.green {
			background: url($notification_icons_url) -400px -200px no-repeat;
		}
		&.orange {
			background: url($notification_icons_url) -400px -200px no-repeat;
		}
		&.red {
			background: url($notification_icons_url) -400px -200px no-repeat;
		}
	}
	&.sent {
		background: url($notification_icons_url) 0 -50px no-repeat;
		&.green {
			background: url($notification_icons_url) 0 -100px no-repeat;
		}
		&.orange {
			background: url($notification_icons_url) 0 -150px no-repeat;
		}
		&.red {
			background: url($notification_icons_url) 0 -200px no-repeat;
		}
	}
}

/* Responsive */
@media (min-width: 768px) and (max-width: 772px) {
	.header-wrapper .ui.grid > .column:not(.row),
	.header-wrapper .ui.grid > .row > .column {
		padding-left: 0.8rem;
		padding-right: 0.8rem;
	}
}