/* AxForm palette switcher (fixed toggle). Palette variables are generated inline by inc/dark-mode.php. */

.axf-palette-switch {
	position: fixed;
	bottom: 24px;
	z-index: 1000;
	display: none;
}
.axf-palette-switch.axf-pos-right { right: 24px; }
.axf-palette-switch.axf-pos-left  { left: 24px; }

@media (min-width: 1025px) {
	.axf-palette-switch.axf-vis-lg { display: block; }
}
@media (min-width: 768px) and (max-width: 1024px) {
	.axf-palette-switch.axf-vis-md { display: block; }
}
@media (max-width: 767px) {
	.axf-palette-switch.axf-vis-sm { display: block; }
}

.axf-palette-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	background: var(--global-dark-toggle-switch, #2D3748);
	color: var(--global-light-toggle-switch, #f7fafc);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.axf-palette-toggle:hover,
.axf-palette-toggle:focus-visible {
	transform: translateY(-2px);
	outline: 2px solid var(--global-palette1, #f7e01e);
	outline-offset: 2px;
}
.axf-palette-toggle .axf-icon {
	display: none;
	line-height: 0;
}
.axf-palette-toggle .axf-icon svg {
	display: block;
}

/* Light mode shows the moon (switch to dark); dark mode shows the sun. */
body.color-switch-light .axf-palette-toggle .axf-icon-moon { display: block; }
body.color-switch-dark  .axf-palette-toggle .axf-icon-sun  { display: block; }
body.color-switch-dark  .axf-palette-toggle {
	background: var(--global-light-toggle-switch, #f7fafc);
	color: var(--global-dark-toggle-switch, #2D3748);
}
