.parslms-header-account {
	--parslms-account-accent: var(--pars-primary-color, #3157d5);
	position: relative;
	display: inline-flex;
	direction: rtl;
	font: inherit;
	color: inherit;
}

.parslms-header-account,
.parslms-header-account * {
	box-sizing: border-box;
}

.parslms-header-account--guest {
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 13px;
	border: 1px solid currentColor;
	border-radius: 10px;
	color: inherit;
	text-decoration: none;
}

.parslms-header-account--guest:hover {
	color: var(--parslms-account-accent);
}

.parslms-header-account__guest-icon,
.parslms-header-account__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.parslms-header-account__summary {
	display: flex;
	align-items: center;
	gap: 9px;
	min-height: 44px;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.parslms-header-account__summary::-webkit-details-marker {
	display: none;
}

.parslms-header-account__avatar {
	flex: 0 0 auto;
	border-radius: 50%;
	object-fit: cover;
	object-position: center;
}

.parslms-header-account__name {
	max-width: 180px;
	overflow: hidden;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.parslms-header-account__arrow {
	transition: transform .18s ease;
}

.parslms-header-account[open] .parslms-header-account__arrow {
	transform: rotate(180deg);
}

.parslms-header-account__menu {
	position: absolute;
	z-index: 999999;
	top: calc(100% + 10px);
	inset-inline-end: 0;
	display: block;
	visibility: hidden;
	width: min(290px, calc(100vw - 24px));
	max-height: min(70vh, 560px);
	padding: 8px;
	overflow: auto;
	border: 1px solid rgba(0, 0, 0, .09);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .14);
	color: #20242c;
	opacity: 0;
	transform: translateY(-5px);
	pointer-events: none;
	transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.parslms-header-account__menu::before {
	position: absolute;
	top: -11px;
	inset-inline: 0;
	height: 11px;
	content: "";
}

.parslms-header-account[open] .parslms-header-account__menu,
.parslms-header-account:focus-within .parslms-header-account__menu {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

@media (hover: hover) {
	.parslms-header-account:hover .parslms-header-account__menu {
		visibility: visible;
		opacity: 1;
		transform: translateY(0);
		pointer-events: auto;
	}
}

.parslms-header-account__list,
.parslms-header-account__children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.parslms-header-account__item > a,
.parslms-header-account__group-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 10px 11px;
	border-radius: 8px;
	color: inherit;
	line-height: 1.55;
	text-decoration: none;
}

.parslms-header-account__item > a:hover,
.parslms-header-account__item > a:focus-visible {
	background: rgba(49, 87, 213, .08);
	color: var(--parslms-account-accent);
}

.parslms-header-account__group-title {
	padding-bottom: 5px;
	font-size: .85em;
	font-weight: 700;
	opacity: .65;
}

.parslms-header-account__children {
	padding-inline-start: 10px;
}

.parslms-header-account__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding-inline: 6px;
	border-radius: 999px;
	background: var(--parslms-account-accent);
	color: #fff;
	font-size: 11px;
}

.parslms-header-account__item--logout {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid rgba(0, 0, 0, .08);
}

.parslms-header-account__item--logout > a {
	color: #b42318;
}

@media (max-width: 520px) {
	.parslms-header-account__name {
		max-width: 120px;
	}
}
