/*
  Стили для блока аккаунта пользователя (замена кнопки "Войти")
  и выбора роли в форме регистрации.
  Подстройте цвета/шрифты под остальной сайт — здесь взяты
  нейтральные значения, ориентируйтесь на класс .button-header
  как образец.
*/

.header-auth {
	position: relative;
}

/* ---------- Блок аккаунта ---------- */

.user-account {
	position: relative;
}

.user-account-toggle {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	background-color: #366ee6;
	border: none;
	border-radius: 8px;
	padding: 6px 14px;
	cursor: pointer;
	font-family: inherit;
	transition:
		background-color 0.4s ease,
		transform 0.2s ease;
}

.user-account-toggle:hover {
	background-color: #074ce0;
	transform: translateY(-2px);
}

.user-account-name {
	display: inline-block;
	max-width: 100px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	vertical-align: middle;
	font-weight: 500;
	font-size: 14px;
	line-height: 1.2;
	color: #fff;
}

.user-account-role {
	font-size: 12px;
	opacity: 0.65;
	line-height: 1.2;
	color: #fff;
}

.user-account-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 220px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 12px;
	list-style: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	z-index: 50;
}

/* Строка с полным ФИО внутри попапа — не обрезается, может переноситься на 2 строки */
.user-account-menu-fullname {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
	padding: 4px 10px 10px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	margin-bottom: 6px;
	white-space: normal;
	word-break: break-word;
}

.user-account-menu.open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.user-account-menu-item a,
.user-account-menu-item button {
	display: block;
	width: 100%;
	text-align: left;
	padding: 8px 10px;
	border: none;
	background: none;
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
}

.user-account-menu-item a:hover,
.user-account-menu-item button:hover {
	background: rgba(0, 0, 0, 0.05);
}

/* ---------- Выбор роли в форме регистрации ---------- */

.auth-role-options {
	display: flex;
	gap: 12px;
	margin-top: 6px;
}

.auth-radio {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 14px;
}

.auth-radio input[type='radio'] {
	accent-color: currentColor;
	width: 16px;
	height: 16px;
}