/* Модальное окно профиля */
.profile-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	display: none;
	pointer-events: none;
}
.profile-menu-overlay.is-active {
	display: block;
	pointer-events: auto;
}
/* Кнопка профиля всегда должна быть кликабельна, даже когда overlay открыт */
.p-navgroup-link.js-open-profile {
	position: relative;
	z-index: 10002;
	pointer-events: auto;
}
.profile-menu-overlay.is-active .profile-menu {
	opacity: 1;
	transform: translateY(0);
}
.profile-menu {
	position: absolute;
	top: 0;
	left: 0;
	background: #b3b3b3;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	min-width: 400px;
	max-width: 500px;
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 10001;
	margin-top: 8px;
}
/* Стрелка, указывающая на профиль */
.profile-menu::before {
	content: "";
	position: absolute;
	top: -8px;
	left: var(--arrow-offset, 50%);
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-bottom: 8px solid #b3b3b3;
	z-index: 10002;
}
.profile-menu-header {
	display: flex;
	align-items: flex-start;
	padding: 16px;
	gap: 12px;
}
.profile-menu-avatar {
	flex-shrink: 0;
}
.profile-menu-avatar .avatar {
	width: 70px;
	height: 70px;
	font-size: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
}
.profile-menu-info {
	flex: 1;
	min-width: 0;
}
.profile-menu-username {
	font-weight: bold;
	color: #000;
	font-size: 15px;
	margin-bottom: 8px;
	word-break: break-word;
}
.profile-menu-stats {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.profile-menu-stat {
	font-size: 13px;
	color: #000;
}
.profile-menu-divider {
	height: 1px;
	background: rgba(0, 0, 0, 0.2);
	margin: 0;
}
.profile-menu-content {
	padding: 8px 0;
}
.profile-menu-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
}
.profile-menu-item {
	display: block;
	padding: 10px 16px;
	color: #000;
	text-decoration: none;
	font-size: 14px;
	transition: background-color 0.15s ease;
}
.profile-menu-item:hover {
	background-color: rgba(0, 0, 0, 0.05);
	text-decoration: none;
	color: #000;
}
.profile-menu-item--full {
	grid-column: 1 / -1;
}
.profile-menu-footer {
	padding: 8px 0;
}
.profile-menu-item--logout {
	color: #000 !important;
	font-weight: 500;
}
.profile-menu-item--logout:hover {
	background-color: rgba(0, 0, 0, 0.05);
	color: #000 !important;
}
/* Закрытие при клике вне модального окна */
.profile-menu-overlay.is-active::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: transparent;
}
