/**
 * Account header dropdown — floating popover (do not expand the header).
 * Loaded last so Blocksy lazy CSS cannot leave the menu in document flow.
 */
#header .ct-header-account,
#header [data-id="account"],
#header [data-column="end"] {
	overflow: visible !important;
}

#header .ct-header-account[data-id="account"],
#header [data-id="account"].ct-header-account,
body.logged-in #header [data-id="account"] {
	position: relative !important;
	z-index: 10050 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 auto !important;
	align-self: center !important;
	width: 2.45rem !important;
	min-width: 2.45rem !important;
	max-width: 2.45rem !important;
	height: 2.45rem !important;
	min-height: 2.45rem !important;
	max-height: 2.45rem !important;
	margin: 0 !important;
	padding: 0 !important;
	box-sizing: border-box !important;
}

#header .ct-header-account > .ct-account-item {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

#header .ct-header-account > ul.ct-header-account-dropdown,
#header ul.ct-header-account-dropdown {
	position: absolute !important;
	top: calc(100% + 0.45rem) !important;
	right: 0 !important;
	left: auto !important;
	bottom: auto !important;
	z-index: 10060 !important;
	display: block !important;
	float: none !important;
	width: 280px !important;
	min-width: 240px !important;
	max-width: min(280px, calc(100vw - 1rem)) !important;
	height: auto !important;
	max-height: min(70vh, 28rem) !important;
	margin: 0 !important;
	padding: 0.55rem 0 !important;
	list-style: none !important;
	box-sizing: border-box !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transform: translate3d(0, 6px, 0);
	transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
	border-radius: 12px !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	background: #1a1f29 !important;
	box-shadow:
		0 16px 40px rgba(0, 0, 0, 0.65),
		0 0 0 1px rgba(0, 168, 255, 0.1) !important;
	color: #fff !important;
}

#header .ct-header-account > ul.ct-header-account-dropdown::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 0.55rem;
}

#header .ct-header-account:hover > ul.ct-header-account-dropdown,
#header .ct-header-account:focus-within > ul.ct-header-account-dropdown,
#header [data-id="account"]:hover > ul.ct-header-account-dropdown,
#header [data-id="account"]:focus-within > ul.ct-header-account-dropdown {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translate3d(0, 0, 0);
}

#header .ct-header-account-dropdown .menu-item {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

#header .ct-header-account-dropdown .ct-header-account-divider {
	display: block;
	margin: 0.4rem 0.75rem;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	height: 0;
}

#header .ct-header-account-dropdown .ct-header-account-user-info {
	padding: 0.4rem 0.9rem 0.55rem;
}

#header .ct-header-account-dropdown .ct-header-account-user-info .ct-menu-link {
	display: flex !important;
	align-items: center;
	gap: 0.75rem;
	padding: 0.25rem 0.15rem;
	margin: 0;
	color: #fff !important;
	text-decoration: none;
	pointer-events: none;
}

#header .ct-header-account-dropdown .ct-header-account-user-info .ct-media-container,
#header .ct-header-account-dropdown .ct-header-account-user-info img {
	flex: 0 0 40px;
	width: 40px !important;
	height: 40px !important;
	border-radius: 50%;
	object-fit: cover;
}

#header .ct-header-account-dropdown .ct-header-account-user-info span {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
	line-height: 1.25;
}

#header .ct-header-account-dropdown .ct-header-account-user-info b {
	font-size: 0.92rem;
	font-weight: 700;
	color: #fff;
}

#header .ct-header-account-dropdown .ct-header-account-user-info small {
	display: block;
	color: #a8b0bd;
	font-size: 0.72rem;
	font-weight: 400;
	word-break: break-word;
}

#header .ct-header-account-dropdown a.ct-menu-link {
	display: block !important;
	padding: 0.55rem 1rem !important;
	margin: 0 0.35rem !important;
	border-radius: 8px;
	color: #fff !important;
	text-decoration: none !important;
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.35;
	pointer-events: auto !important;
	cursor: pointer;
	position: static !important;
	background: transparent;
	transition: background-color 0.15s ease, color 0.15s ease;
}

#header .ct-header-account-dropdown a.ct-menu-link:hover,
#header .ct-header-account-dropdown a.ct-menu-link:focus-visible {
	background: rgba(0, 168, 255, 0.14) !important;
	color: #00a8ff !important;
	outline: none;
}

@media (max-width: 689px) {
	#header .ct-header-account > ul.ct-header-account-dropdown,
	#header ul.ct-header-account-dropdown {
		right: auto !important;
		left: 50% !important;
		transform: translate3d(-50%, 6px, 0);
		width: min(280px, calc(100vw - 1.25rem)) !important;
	}

	#header .ct-header-account:hover > ul.ct-header-account-dropdown,
	#header .ct-header-account:focus-within > ul.ct-header-account-dropdown,
	#header [data-id="account"]:hover > ul.ct-header-account-dropdown,
	#header [data-id="account"]:focus-within > ul.ct-header-account-dropdown {
		transform: translate3d(-50%, 0, 0);
	}
}
