.syscofy-auth-preferences {
	position: fixed;
	inset-block-start: max(20px, env(safe-area-inset-top));
	inset-inline-end: max(20px, env(safe-area-inset-right));
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 4px;
}

.syscofy-auth-language {
	position: relative;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 8px;
}

.syscofy-auth-preference-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	color: var(--auth-muted);
	line-height: 1;
	background: transparent;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

.syscofy-auth-preference-button:hover {
	color: var(--auth-text);
}

.syscofy-auth-preference-button:focus-visible {
	outline: 1px solid var(--auth-accent);
	outline-offset: -1px;
}

.syscofy-auth-language:has([aria-expanded="true"]) {
	outline: 1px solid var(--auth-accent);
	outline-offset: -1px;
}

.syscofy-auth-preference-button svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

@media (min-width: 1024px) {
	.syscofy-auth-preference-button svg {
		width: 21px;
		height: 21px;
	}
}

.syscofy-auth-language-menu {
	position: absolute;
	inset-block-start: calc(100% + 8px);
	inset-inline-end: 0;
	display: grid;
	min-width: 144px;
	padding: 4px;
	background: var(--auth-surface);
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	box-shadow: 0 12px 32px rgb(0 0 0 / 12%);
}

.syscofy-auth-language-option {
	min-height: 36px;
	padding: 8px 12px;
	color: var(--auth-text);
	font-size: 13px;
	font-weight: 500;
	text-align: start;
	background: transparent;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.syscofy-auth-language-option:hover,
.syscofy-auth-language-option:focus-visible,
.syscofy-auth-language-option[aria-checked="true"] {
	background: var(--auth-field);
}

.syscofy-auth-theme-sun,
html[data-theme="dark"] .syscofy-auth-theme-moon {
	display: block;
}

.syscofy-auth-theme-moon,
html[data-theme="dark"] .syscofy-auth-theme-sun {
	display: none;
}

@media (max-width: 575px) {
	.syscofy-auth-preferences {
		inset-block-start: max(12px, env(safe-area-inset-top));
		inset-inline-end: max(12px, env(safe-area-inset-right));
	}

	.syscofy-auth-preference-button svg {
		width: 17px;
		height: 17px;
	}
}
