:root {
	--gprl-brand-yellow: #ffc400;
}

#gprl-theme-toggle {
	position: fixed;
	right: max(12px, env(safe-area-inset-right));
	bottom: calc(88px + env(safe-area-inset-bottom));
	z-index: 99990;
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 999px;
	background: rgba(16, 16, 18, 0.92);
	color: var(--gprl-brand-yellow);
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	cursor: pointer;
	transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
	-webkit-tap-highlight-color: transparent;
}

#gprl-theme-toggle.gprl-is-visible {
	display: inline-flex;
}

#gprl-theme-toggle:hover {
	transform: translateY(-1px);
	box-shadow: 0 7px 22px rgba(0, 0, 0, 0.3);
}

#gprl-theme-toggle:active {
	transform: translateY(0) scale(0.96);
}

#gprl-theme-toggle:focus-visible {
	outline: 3px solid rgba(255, 196, 0, 0.42);
	outline-offset: 3px;
}

#gprl-theme-toggle[aria-busy="true"] {
	cursor: wait;
	opacity: 0.72;
}

#gprl-theme-toggle svg {
	display: block;
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

#gprl-theme-toggle .gprl-icon-sun {
	display: none;
}

body.bb-rl-dark-mode #gprl-theme-toggle {
	border-color: rgba(0, 0, 0, 0.12);
	background: rgba(248, 248, 248, 0.94);
	color: #171719;
}

body.bb-rl-dark-mode #gprl-theme-toggle .gprl-icon-moon {
	display: none;
}

body.bb-rl-dark-mode #gprl-theme-toggle .gprl-icon-sun {
	display: block;
}

@media (min-width: 900px) {
	#gprl-theme-toggle {
		right: 18px;
		bottom: 92px;
	}
}

@media print {
	#gprl-theme-toggle {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	#gprl-theme-toggle {
		transition: none;
	}
}
