/* =========================================================
	TALENTHUB PREFERENCES
========================================================= */

.th-header-actions-group{
	display:flex;
	align-items:center;
	gap:10px;
	flex-wrap:wrap;
}

.th-preferences{
	position:relative;
	display:inline-flex;
	align-items:center;
	justify-content:center;
}

.th-preferences-main,
.th-preferences-circle,
.th-preferences-submenu button{
	border:0;
	display:flex;
	align-items:center;
	justify-content:center;
	transition:.24s ease;
}

.th-preferences-main,
.th-preferences-circle{
	width:46px;
	height:46px;
	border-radius:999px;
	background:var(--th-icon-soft-bg);
	color:var(--th-color-text-main);
	border:1px solid var(--th-border-base);
	box-shadow:
		0 10px 24px var(--th-shadow-soft),
		inset 0 1px 0 var(--th-final-box-inset);
	backdrop-filter:blur(14px);
	-webkit-backdrop-filter:blur(14px);
}

.th-preferences-main{
	font-size:1.25rem;
}

.th-preferences-main:hover,
.th-preferences-main.active{
	transform:translateY(-2px);
	color:var(--th-badge-text);
	background:var(--th-badge-bg);
	border-color:var(--th-badge-border);
	box-shadow:
		0 16px 34px var(--th-shadow-hover),
		inset 0 1px 0 var(--th-final-box-inset);
}

.th-preferences-panel{
	position:absolute;
	top:56px;
	right:0;
	z-index:1080;
	display:flex;
	align-items:center;
	gap:9px;
	padding:8px;
	border-radius:999px;
	border:1px solid var(--th-border-base);
	background:var(--th-card-bg-glass);
	box-shadow:0 18px 45px var(--th-shadow-card);
	backdrop-filter:blur(22px);
	-webkit-backdrop-filter:blur(22px);
	opacity:0;
	pointer-events:none;
	transform:translateY(-8px) scale(.96);
	transition:.22s ease;
}

.th-preferences.open .th-preferences-panel{
	opacity:1;
	pointer-events:auto;
	transform:translateY(0) scale(1);
}

.th-preferences-group{
	position:relative;
	display:flex;
	align-items:center;
	justify-content:center;
}

.th-preferences-circle{
	gap:3px;
	font-size:1.1rem;
	background:var(--th-card-bg-soft);
}

.th-preferences-circle span{
	font-size:.68rem;
	font-weight:950;
	letter-spacing:.02em;
}

.th-preferences-circle:hover,
.th-preferences-circle.active{
	color:var(--th-badge-text);
	background:var(--th-badge-bg);
	border-color:var(--th-badge-border);
	transform:translateY(-2px);
}

.th-preferences-submenu{
	position:absolute;
	top:58px;
	right:0;
	display:none;
	flex-direction:column;
	gap:7px;
	min-width:226px;
	padding:10px;
	border-radius:22px;
	border:1px solid var(--th-border-base);
	background:var(--th-card-bg-hover);
	box-shadow:0 22px 54px var(--th-shadow-card);
	backdrop-filter:blur(22px);
	-webkit-backdrop-filter:blur(22px);
}

.th-preferences-group.open .th-preferences-submenu{
	display:flex;
	animation:thPrefMenuShow .18s ease both;
}

.th-preferences-submenu::before{
	content:"";
	position:absolute;
	top:-6px;
	right:18px;
	width:14px;
	height:14px;
	background:inherit;
	border-left:1px solid var(--th-border-base);
	border-top:1px solid var(--th-border-base);
	transform:rotate(45deg);
	border-radius:4px 0 0 0;
}

.th-preferences-submenu button{
	position:relative;
	width:100%;
	min-height:44px;
	padding:8px 10px;
	justify-content:flex-start;
	gap:10px;
	border-radius:15px;
	background:transparent;
	color:var(--th-color-text-main);
	font-size:.9rem;
	font-weight:900;
	text-align:left;
	overflow:hidden;
}

.th-preferences-submenu button:hover{
	background:var(--th-badge-bg);
	transform:translateX(2px);
}

.th-preferences-submenu button.active{
	background:var(--th-gradient-card);
	color:var(--th-color-text-main);
	box-shadow:
		0 8px 18px var(--th-shadow-soft),
		inset 3px 0 0 var(--th-badge-text);
}

.th-preferences-submenu button.active::after{
	content:"\F26E";
	font-family:"bootstrap-icons";
	margin-left:auto;
	color:var(--th-badge-text);
	font-size:1rem;
}

.th-pref-code,
.th-preferences-theme-menu button i{
	width:36px;
	height:36px;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	flex:0 0 36px;
	border-radius:13px;
	background:var(--th-icon-soft-bg);
	color:var(--th-badge-text);
	border:1px solid var(--th-badge-border);
	font-size:.76rem;
	font-weight:950;
}

.th-pref-name{
	font-weight:950;
	letter-spacing:-.01em;
}

.th-preferences-theme-menu button i{
	font-size:1.05rem;
}

.th-preferences-submenu button.active .th-pref-code,
.th-preferences-theme-menu button.active i{
	background:var(--th-gradient-cta);
	color:var(--th-color-white);
	border-color:transparent;
	box-shadow:0 10px 22px var(--th-glow-indigo);
}

/* =========================================================
	DARK MODE
========================================================= */

html[data-theme="dark"] .th-preferences-main,
html[data-theme="dark"] .th-preferences-circle{
	background:rgba(255, 255, 255, .06);
	border-color:var(--th-border-glass);
	color:var(--th-color-text-main);
}

html[data-theme="dark"] .th-preferences-main:hover,
html[data-theme="dark"] .th-preferences-main.active,
html[data-theme="dark"] .th-preferences-circle:hover,
html[data-theme="dark"] .th-preferences-circle.active{
	background:var(--th-badge-bg);
	color:var(--th-badge-text);
	border-color:var(--th-badge-border);
}

html[data-theme="dark"] .th-preferences-panel{
	background:rgba(5, 46, 22, .72);
	border-color:var(--th-border-glass);
	box-shadow:0 24px 60px rgba(0, 0, 0, .38);
}

html[data-theme="dark"] .th-preferences-submenu{
	background:rgba(3, 24, 13, .96);
	border-color:var(--th-border-glass);
	box-shadow:0 24px 60px rgba(0, 0, 0, .46);
}

html[data-theme="dark"] .th-preferences-submenu button{
	color:var(--th-color-text-main);
}

html[data-theme="dark"] .th-preferences-submenu button:hover{
	background:rgba(34, 197, 94, .12);
}

html[data-theme="dark"] .th-preferences-submenu button.active{
	background:rgba(34, 197, 94, .16);
	color:var(--th-color-text-main);
}

/* =========================================================
	RESPONSIVE
========================================================= */

@media(max-width:767px){
	.th-header-actions-group{
		justify-content:flex-end;
	}

	.th-preferences-panel{
		right:0;
	}

	.th-preferences-submenu{
		right:0;
	}

	.th-header-actions-group > .th-btn{
		width:auto;
	}
}

@keyframes thPrefMenuShow{
	from{
		opacity:0;
		transform:translateY(-6px) scale(.98);
	}

	to{
		opacity:1;
		transform:translateY(0) scale(1);
	}
}

.th-ui-tooltip.left::before{
	left:auto;
	right:-6px;
}

@media(max-width:991px){
	.th-sidebar-mobile-actions .th-preferences-panel{
		left:50% !important;
		right:auto !important;
		transform:translateX(-50%) translateY(-8px) scale(.96) !important;
	}

	.th-sidebar-mobile-actions .th-preferences.open .th-preferences-panel{
		transform:translateX(-50%) translateY(0) scale(1) !important;
	}

	.th-sidebar-mobile-actions .th-preferences-submenu{
		left:0 !important;
		right:auto !important;
	}

	.th-sidebar-mobile-actions .th-preferences-submenu::before{
		left:22px !important;
		right:auto !important;
	}
}