/**
 * Account menu.
 */

/* Buttons --------------------------------------------------------------- */

.hw-account-menu {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* Toggle ---------------------------------------------------------------- */

.hw-account-details {
	position: relative;
}

.hw-account-summary {
	display: block;
	list-style: none;
	border-radius: 100px;
	cursor: pointer;
}

.hw-account-summary::-webkit-details-marker {
	display: none;
}

.hw-account-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border: 1px solid color-mix(in srgb, var(--e-global-color-3dbc0c7) 10%, transparent);
	border-radius: 100px;
	background-color: var(--e-global-color-cd032c6);
	color: var(--e-global-color-f11010d);
}

.hw-account-avatar {
	display: block;
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 50% !important;
	object-fit: cover;
}

.hw-account-name {
	max-width: 160px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hw-account-chevron {
	display: inline-flex;
	margin-left: 6px;
	transition: transform 0.3s ease;
}

.hw-account-chevron svg {
	width: 12px;
	fill: currentColor;
}

.hw-account-details[open] .hw-account-chevron {
	transform: rotate(180deg);
}

/* Dropdown -------------------------------------------------------------- */

.hw-account-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 100;
	min-width: 100%;
	margin: 0;
	padding: 8px;
	list-style: none;
	border: 1px solid color-mix(in srgb, var(--e-global-color-3dbc0c7) 10%, transparent);
	border-radius: 16px;
	background-color: var(--e-global-color-cd032c6);
}

.hw-account-dropdown li {
	margin: 0;
	padding: 0;
}

.hw-account-dropdown a {
	display: block;
	padding: 10px 16px;
	border-radius: 10px;
	color: var(--e-global-color-f11010d);
	white-space: nowrap;
}

.hw-account-dropdown a:hover,
.hw-account-dropdown a:focus {
	background-color: var(--e-global-color-accent, #F5F5F5);
	color: var(--e-global-color-f11010d, #121212);
}

/* Mobile */

@media (max-width: 767px) {
	.hw-account-name {
		display: none;
	}

	.hw-account-toggle {
		position: relative;
		padding: 5px;
	}

	.hw-account-chevron {
		position: absolute;
		top: 0;
		bottom: 0;
		left: 100%;
		align-items: center;
	}

	.hw-account-avatar {
		width: 32px;
		height: 32px;
	}

	.hw-account-dropdown {
		right: auto;
		left: 50%;
		transform: translateX(-50%);
		border-radius: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hw-account-chevron {
		transition: none;
	}
}

/* Visibility ------------------------------------------------------------ */

@media (min-width: 1367px) {
	body:not(.elementor-editor-active) .hw-account-menu.hw-hide-desktop {
		display: none;
	}

	body:not(.elementor-editor-active) .elementor-widget-shortcode:has(.hw-account-menu.hw-hide-desktop) {
		display: none;
	}
}

@media (max-width: 1366px) and (min-width: 1025px) {
	body:not(.elementor-editor-active) .hw-account-menu.hw-hide-laptop {
		display: none;
	}

	body:not(.elementor-editor-active) .elementor-widget-shortcode:has(.hw-account-menu.hw-hide-laptop) {
		display: none;
	}
}

@media (max-width: 1024px) and (min-width: 768px) {
	body:not(.elementor-editor-active) .hw-account-menu.hw-hide-tablet {
		display: none;
	}

	body:not(.elementor-editor-active) .elementor-widget-shortcode:has(.hw-account-menu.hw-hide-tablet) {
		display: none;
	}
}

@media (max-width: 767px) {
	body:not(.elementor-editor-active) .hw-account-menu.hw-hide-mobile {
		display: none;
	}

	body:not(.elementor-editor-active) .elementor-widget-shortcode:has(.hw-account-menu.hw-hide-mobile) {
		display: none;
	}
}
