$evf-color-primary: #7c3aed;
$evf-color-primary-bg: #f8faff;
$evf-color-text: #383838;
$evf-color-border: #e9e9e9;
$evf-color-divider: #e2e8f0;
$evf-color-orange: #dd6b20;
$evf-color-white: #ffffff;

$evf-header-height: 70px;
$evf-header-z: 10;
$evf-nav-active-bar: 3px;

$evf-font-stack: 'Inter', sans-serif;
$evf-font-size-nav: 15px;
$evf-font-size-version: 12px;

@keyframes evf-skeleton-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.4;
	}
}

#evf-react-header-root {
	min-height: $evf-header-height;
	contain: layout style;
}

.evf-skeleton {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: $evf-header-height;
	width: 100%;
	background: $evf-color-white;
	border-bottom: 1px solid $evf-color-border;
	padding: 0 16px;
	box-sizing: border-box;
	position: relative;
	z-index: $evf-header-z;
	transition: opacity 0.12s ease-out;

	&--hidden {
		opacity: 0;
		pointer-events: none;
		user-select: none;
	}
}

.evf-skeleton__left {
	display: flex;
	align-items: center;
	gap: 28px;
	height: $evf-header-height;
	flex-shrink: 0;
}

.evf-skeleton__logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none !important;
	outline: none;

	&:focus-visible {
		outline: 2px solid $evf-color-primary;
		outline-offset: 2px;
		border-radius: 6px;
	}
}

.evf-skeleton__nav {
	display: flex;
	align-items: stretch;
	list-style: none;
	margin: 0;
	padding: 0;
	height: $evf-header-height;
	gap: 0;
}

.evf-skeleton__nav-item {
	display: flex;
	align-items: center;

	&--active {
		.evf-skeleton__nav-link {
			color: $evf-color-primary;
			border-bottom-color: $evf-color-primary;
		}
	}
}

.evf-skeleton__nav-link {
	display: inline-flex;
	align-items: center;
	height: 100%;
	padding: 0 8px;
	font-size: $evf-font-size-nav;
	font-weight: 600;
	line-height: 1.5;
	font-family: $evf-font-stack;
	color: $evf-color-text;
	text-decoration: none !important;
	border-bottom: $evf-nav-active-bar solid transparent;
	margin-bottom: -1px;
	box-sizing: border-box;
	white-space: nowrap;
	transition: color 0.1s ease;
	outline: none;

	&:hover {
		color: $evf-color-primary;
	}

	&:focus-visible {
		outline: 2px solid $evf-color-primary;
		outline-offset: -2px;
	}
}

.evf-skeleton__right {
	display: flex;
	align-items: center;
	gap: 12px;
	height: $evf-header-height;
	flex-shrink: 0;
}

.evf-skeleton__right-nav {
	display: flex;
	align-items: stretch;
	gap: 4px;
	height: $evf-header-height;
}

.evf-skeleton__right-link {
	display: inline-flex;
	align-items: center;
	height: 100%;
	padding: 0 8px;
	font-size: $evf-font-size-nav;
	font-weight: 600;
	font-family: $evf-font-stack;
	color: $evf-color-text;
	text-decoration: none !important;
	border-bottom: $evf-nav-active-bar solid transparent;
	margin-bottom: -1px;
	white-space: nowrap;
	transition: color 0.1s ease;

	&:hover {
		color: $evf-color-primary;
	}
}

.evf-skeleton__divider {
	width: 1px;
	height: 18px;
	background: $evf-color-divider;
	flex-shrink: 0;
	align-self: center;
}

.evf-skeleton__upgrade {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: $evf-font-size-nav;
	font-weight: 600;
	font-family: $evf-font-stack;
	color: $evf-color-orange;
	text-decoration: none !important;
	white-space: nowrap;
	transition: opacity 0.1s ease;

	&:hover {
		opacity: 0.8;
	}
}

.evf-skeleton__version {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border: 1px solid $evf-color-primary;
	border-radius: 9999px;
	background: $evf-color-primary-bg;
	color: $evf-color-primary;
	font-size: $evf-font-size-version;
	font-weight: 500;
	font-family: $evf-font-stack;
	white-space: nowrap;
	flex-shrink: 0;
}

.evf-skeleton__bell {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid $evf-color-divider;
	background: transparent;
	cursor: default;
	flex-shrink: 0;
	overflow: hidden;
	padding: 0;
	box-sizing: border-box;

	&-inner {
		width: 24px;
		height: 24px;
		border-radius: 50%;
		background: $evf-color-divider;

		body:not(.evf-js-loaded) & {
			animation: evf-skeleton-pulse 1.6s ease-in-out infinite;
		}
	}
}
