.auth-menu {
	position: relative;
	flex: 0 0 auto;
}

.auth-menu-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	white-space: nowrap;
}

.auth-menu-chevron {
	width: 7px;
	height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 160ms ease;
}

.auth-menu[data-open="true"] .auth-menu-chevron,
.auth-menu:hover .auth-menu-chevron {
	transform: translateY(2px) rotate(225deg);
}

.auth-menu-panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 120;
	width: min(350px, calc(100vw - 24px));
	padding: 16px;
	border: 1px solid var(--line, #e2e8f0);
	border-radius: 12px;
	background: var(--surface, #fff);
	color: var(--ink, #172033);
	box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-6px);
	transition:
		opacity 150ms ease,
		transform 150ms ease,
		visibility 150ms ease;
}

.auth-menu-panel::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -11px;
	height: 11px;
}

.auth-menu:hover .auth-menu-panel,
.auth-menu[data-open="true"] .auth-menu-panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.auth-menu-view[hidden] {
	display: none !important;
}

.auth-menu-title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 750;
}

.auth-menu-copy {
	margin: 0 0 13px;
	color: var(--muted, #64748b);
	font-size: 12px;
	line-height: 1.55;
}

.auth-menu-form {
	display: grid;
	gap: 11px;
}

.auth-menu-turnstile {
	width: 100%;
	min-height: 65px;
}

.auth-menu-field {
	display: grid;
	gap: 5px;
	color: var(--muted-strong, #334155);
	font-size: 11px;
	font-weight: 700;
}

.auth-menu-field input {
	width: 100%;
	height: 39px;
	padding: 8px 10px;
	border: 1px solid var(--line, #e2e8f0);
	border-radius: 8px;
	background: var(--surface, #fff);
	color: var(--ink, #172033);
	font-size: 13px;
	font-weight: 500;
	outline: none;
}

.auth-menu-field input:focus {
	border-color: #60a5fa;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.auth-menu-submit {
	min-height: 39px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 13px;
	border: 1px solid #2563eb;
	border-radius: 8px;
	background: #2563eb;
	color: #fff;
	cursor: pointer;
	font-size: 12px;
	font-weight: 750;
	text-align: center;
	text-decoration: none;
}

.auth-menu-submit:hover {
	border-color: #1d4ed8;
	background: #1d4ed8;
	color: #fff;
	text-decoration: none;
}

.auth-menu-submit:disabled {
	cursor: wait;
	opacity: 0.68;
}

.auth-menu-message {
	margin: 0;
	padding: 9px 10px;
	border: 1px solid #fecdd3;
	border-radius: 7px;
	background: #fff1f2;
	color: #9f1239;
	font-size: 11px;
	line-height: 1.45;
}

.auth-menu-message[hidden] {
	display: none !important;
}

.auth-menu-register-prompt {
	margin: 13px 0 0;
	color: var(--muted, #64748b);
	font-size: 11px;
	text-align: center;
}

.auth-menu-register-prompt a {
	color: #3b82f6;
	font-weight: 750;
	text-decoration: none;
}

.auth-menu-register-prompt a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.auth-menu-user-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--line, #e2e8f0);
}

.auth-menu-avatar {
	width: 42px;
	height: 42px;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: #2563eb;
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	text-transform: uppercase;
}

.auth-menu-user-name,
.auth-menu-user-handle {
	margin: 0;
}

.auth-menu-user-name {
	color: var(--ink, #172033);
	font-size: 15px;
	font-weight: 750;
	overflow-wrap: anywhere;
}

.auth-menu-user-handle {
	margin-top: 2px;
	color: var(--muted, #64748b);
	font-size: 11px;
	overflow-wrap: anywhere;
}

.auth-menu-user-details {
	margin: 0 0 14px;
}

.auth-menu-user-details > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 12px 0;
	border-bottom: 1px solid var(--line, #e2e8f0);
}

.auth-menu-user-details dt {
	color: var(--muted, #64748b);
	font-size: 11px;
}

.auth-menu-user-details dd {
	margin: 0;
	color: var(--ink, #172033);
	font-size: 11px;
	font-weight: 700;
	text-align: right;
}

.auth-menu-account-link,
.auth-menu-signout {
	min-height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 750;
}

.auth-menu-account-link {
	width: 100%;
	border: 1px solid #2563eb;
	background: #2563eb;
	color: #fff;
	text-decoration: none;
}

.auth-menu-account-link:hover {
	border-color: #1d4ed8;
	background: #1d4ed8;
	color: #fff;
	text-decoration: none;
}

.auth-menu-signout {
	width: 100%;
	margin-top: 8px;
	border: 1px solid var(--line, #e2e8f0);
	background: transparent;
	color: var(--muted-strong, #334155);
	cursor: pointer;
}

.auth-menu-signout:hover {
	border-color: var(--line-strong, #cbd5e1);
	color: var(--ink, #172033);
}

.auth-menu-signout:disabled {
	cursor: wait;
	opacity: 0.68;
}

.auth-menu-announcer {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

body[data-ui="dense"] .auth-menu-panel {
	border-color: #1e293b;
	background: #0f172a;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

body[data-ui="dense"] .auth-menu-field input {
	border-color: #334155;
	background: #020617;
	color: #f1f5f9;
}

body[data-ui="dense"] .auth-menu-signout {
	border-color: #334155;
	color: #cbd5e1;
}

@media (max-width: 720px) {
	.auth-menu-panel {
		position: fixed;
		top: var(--auth-menu-mobile-top, 72px);
		left: 12px;
		right: 12px;
		width: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.auth-menu-chevron,
	.auth-menu-panel {
		transition: none;
	}
}
