/**
 * Header tone (light/dark) and compact auth buttons on tablet-desktop widths.
 */

/* --- Light header: white logo + white nav (hero / subheader bg) --- */
body.rework-header-light:not(.careerfy-sticky-header) .careerfy-logo .logo--light {
	display: block !important;
}

body.rework-header-light:not(.careerfy-sticky-header) .careerfy-logo .logo--dark {
	display: none !important;
}

body.rework-header-light:not(.careerfy-sticky-header) .careerfy-navigation .level-1 > li > a,
body.rework-header-light:not(.careerfy-sticky-header) #menu-general.level-1 > li > a {
	color: #ffffff !important;
}

body.rework-header-light:not(.careerfy-sticky-header) .careerfy-navigation .level-1 > li > a:hover,
body.rework-header-light:not(.careerfy-sticky-header) #menu-general.level-1 > li > a:hover,
body.rework-header-light:not(.careerfy-sticky-header) .careerfy-navigation .level-1 > li.current-menu-item > a,
body.rework-header-light:not(.careerfy-sticky-header) #menu-general.level-1 > li.current-menu-item > a {
	color: var(--cfy-primary) !important;
}

/* --- Dark header: black logo + dark nav (no hero background) --- */
body.rework-header-dark:not(.careerfy-sticky-header) .careerfy-header-two {
	position: absolute;
	background: transparent !important;
	box-shadow: none !important;
	border-bottom: 0;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
}

body.rework-header-dark:not(.careerfy-sticky-header) .header-row {
	background-color: transparent;
}

body.rework-header-dark .careerfy-logo .logo--light {
	display: none !important;
}

body.rework-header-dark .careerfy-logo .logo--dark {
	display: block !important;
}

body.rework-header-dark .careerfy-navigation .level-1 > li > a,
body.rework-header-dark #menu-general.level-1 > li > a {
	color: var(--cfy-dark) !important;
}

body.rework-header-dark .careerfy-navigation .level-1 > li > a:hover,
body.rework-header-dark #menu-general.level-1 > li > a:hover,
body.rework-header-dark .careerfy-navigation .level-1 > li.current-menu-item > a,
body.rework-header-dark #menu-general.level-1 > li.current-menu-item > a {
	color: var(--cfy-primary) !important;
}

body.rework-header-dark.careerfy-sticky-header .careerfy-header-two {
	position: fixed;
	background-color: hsla(0, 0%, 100%, 0.72) !important;
	-webkit-backdrop-filter: saturate(180%) blur(12px) !important;
	backdrop-filter: saturate(180%) blur(12px) !important;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
}

/* Dashboard: solid header bar (no transparent overlay over content) */
body.rework-page-dashboard:not(.careerfy-sticky-header) .careerfy-header-two {
	position: absolute;
	background-color: #f9fafb !important;
	box-shadow: none !important;
	border-bottom: 0;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
}

body.rework-page-dashboard:not(.careerfy-sticky-header) .header-row {
	background-color: transparent;
}

/* Auth buttons: icons hidden on wide desktop, text visible */
.careerfy-user-option .login-btn i,
.careerfy-user-option .register-btn i {
	display: none;
	line-height: 1;
	font-size: 18px;
}

.careerfy-user-option .login-btn .auth-btn__label,
.careerfy-user-option .register-btn .auth-btn__label {
	display: inline;
}

/* Compact auth buttons + tighter header cluster (992–1280px) */
@media (min-width: 992px) and (max-width: 1280px) {
	.careerfy-navigation .level-1.nav.navbar-nav,
	#menu-general.level-1 {
		gap: 12px;
	}

	.careerfy-user-option {
		flex-shrink: 0;
		gap: 8px;
	}

	.careerfy-user-option .login-btn i,
	.careerfy-user-option .register-btn i {
		display: inline-block;
	}

	.careerfy-user-option .login-btn .auth-btn__label,
	.careerfy-user-option .register-btn .auth-btn__label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.careerfy-user-option .login-btn,
	.careerfy-user-option .register-btn {
		position: relative;
		width: 40px;
		min-width: 40px;
		padding: 0;
		border-radius: 50%;
	}
}

/* --- Header notifications dropdown --- */
.jobsearch-hdernotifics-listitms {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
	overflow: hidden;
	/* Closed by default — plugin hover can stick on sticky/absolute headers */
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transition: opacity 0.18s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.18s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

.jobsearch-hdernotifics-listitms:before {
	border-bottom-color: #fff;
}

.jobsearch-hdernotifics-listitms:after {
	display: none;
}

/* Kill plugin :hover open — open only via .is-open (click) */
ul li.jobsearch-usernotifics-menubtn:hover .jobsearch-hdernotifics-listitms {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

ul li.jobsearch-usernotifics-menubtn.is-open .jobsearch-hdernotifics-listitms {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	top: calc(100% + 8px);
}

@media (prefers-reduced-motion: reduce) {
	.jobsearch-hdernotifics-listitms {
		transition: none !important;
	}
}

.hdernotifics-title-con {
	float: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: #fff;
	text-transform: none;
	border-bottom: 1px solid #e2e8f0;
}

.hder-notifics-title {
	font-size: 15px;
	font-weight: 600;
	color: #1a202c;
}

.hder-notifics-count {
	float: none;
	margin: 0;
	padding: 4px 10px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #f8fafc;
	font-size: 12px;
	font-weight: 500;
	color: #64748b;
	line-height: 1.3;
	text-transform: none;
}

.hder-notifics-count small {
	font-weight: 600;
	color: var(--cfy-primary, #0a65fc);
}

span.hder-notifics-nofound {
	float: none;
	display: block;
	padding: 28px 16px;
	font-size: 14px;
	color: #64748b;
	text-align: center;
	line-height: 1.5;
}

/* --- Logged-in user menu (desktop) --- */
@media (min-width: 993px) {
	.careerfy-header-two .careerfy-header-actions {
		margin-left: auto;
	}

	.careerfy-header-two .careerfy-user-option {
		float: none;
		align-items: center;
		gap: 10px;
	}

	.careerfy-header-two .careerfy-user-option > li {
		float: none !important;
		margin: 0 !important;
		padding: 0 !important;
		display: flex;
		align-items: center;
		position: relative;
	}

	.careerfy-header-two .careerfy-user-option > li.jobsearch-usernotifics-menubtn {
		margin-top: 0 !important;
		padding-bottom: 0 !important;
	}

	.careerfy-user-option .jobsearch-usernotifics-menubtn > a,
	.careerfy-header-two .careerfy-user-option > li.jobsearch-usernotifics-menubtn > a {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		padding: 0 !important;
		border-radius: 30px;
		background-color: #f3f4f6 !important;
		color: #111827 !important;
		text-decoration: none;
		line-height: 1;
		border: 0;
	}

	.careerfy-user-option .jobsearch-usernotifics-menubtn > a i,
	.careerfy-header-two .jobsearch-usernotifics-menubtn > a i {
		color: inherit !important;
		font-size: 18px;
		line-height: 1;
		margin: 0;
	}

	.careerfy-header-two .careerfy-user-option > li.jobsearch-userdash-menumain > a.careerfy-btn-icon,
	.careerfy-user-option .careerfy-btn-icon {
		background-color: #f3f4f6 !important;
		color: #111827 !important;
		text-decoration: none;
		border: 0;
	}

	.careerfy-user-option .careerfy-btn-icon i {
		color: inherit !important;
		font-size: 18px;
		line-height: 1;
	}

	body.rework-header-light:not(.careerfy-sticky-header) .careerfy-header-two .careerfy-user-option > li.jobsearch-usernotifics-menubtn > a,
	body.rework-header-light:not(.careerfy-sticky-header) .careerfy-header-two .careerfy-user-option > li.jobsearch-userdash-menumain > a.careerfy-btn-icon,
	body.rework-header-light:not(.careerfy-sticky-header) .careerfy-header-two .hdr-search-trigger {
		background-color: rgba(255, 255, 255, 0.16) !important;
		color: #fff !important;
	}

	body.rework-header-dark:not(.careerfy-sticky-header) .careerfy-header-two .careerfy-user-option > li.jobsearch-usernotifics-menubtn > a,
	body.rework-header-dark:not(.careerfy-sticky-header) .careerfy-header-two .careerfy-user-option > li.jobsearch-userdash-menumain > a.careerfy-btn-icon,
	body.rework-header-dark:not(.careerfy-sticky-header) .careerfy-header-two .hdr-search-trigger,
	body.careerfy-sticky-header .careerfy-header-two .careerfy-user-option > li.jobsearch-usernotifics-menubtn > a,
	body.careerfy-sticky-header .careerfy-header-two .careerfy-user-option > li.jobsearch-userdash-menumain > a.careerfy-btn-icon,
	body.careerfy-sticky-header .careerfy-header-two .hdr-search-trigger {
		background-color: #f3f4f6 !important;
		color: #111827 !important;
	}

	.careerfy-user-option > li.jobsearch-userdash-menumain > ul.nav-item-children {
		left: auto;
		right: 0;
		top: 100%;
		width: 240px;
		min-width: 240px;
		padding: 8px 0;
		margin-top: 8px;
		border-radius: 12px;
		border: 1px solid #e2e8f0;
		box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.18s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.18s;
	}

	.careerfy-user-option > li.jobsearch-userdash-menumain > ul.nav-item-children::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: -10px;
		height: 10px;
	}

	.careerfy-user-option > li.jobsearch-userdash-menumain:hover > ul.nav-item-children,
	.careerfy-user-option > li.jobsearch-userdash-menumain:focus-within > ul.nav-item-children,
	.careerfy-user-option > li.jobsearch-userdash-menumain.is-open > ul.nav-item-children {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.careerfy-user-option ul.nav-item-children > li {
		float: none;
		width: 100%;
		margin: 0;
		padding: 0;
		border-bottom: none;
	}

	.careerfy-user-option ul.nav-item-children > li + li {
		border-top: 1px solid #f1f5f9;
	}

	.careerfy-user-option ul.nav-item-children > li > a {
		display: flex;
		align-items: center;
		gap: 10px;
		float: none;
		width: 100%;
		padding: 10px 16px;
		font-size: 14px;
		font-weight: 500;
		color: #334155;
		text-decoration: none;
		line-height: 1.3;
		box-sizing: border-box;
	}

	.careerfy-user-option ul.nav-item-children > li > a:hover,
	.careerfy-user-option ul.nav-item-children > li.active > a {
		color: var(--cfy-primary, #0a65fc);
		background: #f8fafc;
	}

	.careerfy-user-option ul.nav-item-children > li > a i {
		float: none;
		margin: 0;
		flex: 0 0 auto;
		font-size: 16px;
		line-height: 1;
	}

	.careerfy-user-option .jobsearch-hdernotifics-listitms,
	.careerfy-header-two .careerfy-user-option .jobsearch-hdernotifics-listitms {
		position: absolute;
		left: auto;
		right: 0;
		top: calc(100% + 8px) !important;
		width: min(400px, calc(100vw - 32px));
	}

	li.jobsearch-usernotifics-menubtn:hover .jobsearch-hdernotifics-listitms {
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	li.jobsearch-usernotifics-menubtn.is-open .jobsearch-hdernotifics-listitms {
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
		top: calc(100% + 8px);
	}
}
