/**
 * BAURIE preset target proof glow — activated targets only.
 * Uses --baurie-preset-color and --baurie-preset-intensity when set by presets-bridge.js.
 */

.baurie-preset-target-active {
	position: relative;
	outline: 1px solid rgba(255, 255, 255, 0.35);
	outline-offset: 0;
	box-shadow:
		0 0 8px rgba(255, 255, 255, 0.22),
		inset 0 0 6px rgba(255, 255, 255, 0.08);
	background-color: rgba(255, 255, 255, 0.03);
	transition: box-shadow 0.4s ease, outline-color 0.4s ease, background-color 0.4s ease;
}

@supports (color: color-mix(in srgb, white 50%, transparent)) {
	.baurie-preset-target-active {
		outline-color: color-mix(in srgb, var(--baurie-preset-color, #ffffff) 55%, transparent);
		box-shadow:
			0 0 calc(8px * var(--baurie-preset-intensity, 1))
				color-mix(in srgb, var(--baurie-preset-color, #ffffff) 35%, transparent),
			inset 0 0 calc(6px * var(--baurie-preset-intensity, 1))
				color-mix(in srgb, var(--baurie-preset-color, #ffffff) 12%, transparent);
		background-color: color-mix(in srgb, var(--baurie-preset-color, #ffffff) 6%, transparent);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.baurie-preset-target-active[data-baurie-preset-target][style*="--baurie-preset-motion: soft"],
	.baurie-preset-target-active[style*="--baurie-preset-motion: soft"] {
		animation: baurie-preset-soft-glow 6s ease-in-out infinite;
	}
}

@keyframes baurie-preset-soft-glow {
	0%,
	100% {
		box-shadow:
			0 0 8px rgba(255, 255, 255, 0.18),
			inset 0 0 6px rgba(255, 255, 255, 0.06);
	}
	50% {
		box-shadow:
			0 0 14px rgba(255, 255, 255, 0.28),
			inset 0 0 8px rgba(255, 255, 255, 0.1);
	}
}

@media (prefers-reduced-motion: no-preference) {
	@supports (color: color-mix(in srgb, white 50%, transparent)) {
		.baurie-preset-target-active[style*="--baurie-preset-motion: soft"] {
			animation: baurie-preset-soft-glow-mix 6s ease-in-out infinite;
		}
	}
}

@keyframes baurie-preset-soft-glow-mix {
	0%,
	100% {
		box-shadow:
			0 0 calc(8px * var(--baurie-preset-intensity, 1))
				color-mix(in srgb, var(--baurie-preset-color, #ffffff) 28%, transparent),
			inset 0 0 calc(6px * var(--baurie-preset-intensity, 1))
				color-mix(in srgb, var(--baurie-preset-color, #ffffff) 10%, transparent);
	}
	50% {
		box-shadow:
			0 0 calc(14px * var(--baurie-preset-intensity, 1))
				color-mix(in srgb, var(--baurie-preset-color, #ffffff) 42%, transparent),
			inset 0 0 calc(8px * var(--baurie-preset-intensity, 1))
				color-mix(in srgb, var(--baurie-preset-color, #ffffff) 14%, transparent);
	}
}
