/*
 * Esquemas de cor — dark (padrão do tema) e light automático.
 *
 * O dark vive no theme.json. Aqui, quando o navegador do visitante prefere
 * tema claro (prefers-color-scheme: light), as variáveis de preset geradas
 * pelo theme.json são sobrescritas com a paleta clara equivalente.
 *
 * Os !important são necessários por dois motivos:
 *  - as variáveis de preset são definidas no <style> das global styles do WP,
 *    cuja ordem de impressão não é garantida em relação a este arquivo;
 *  - vários patterns têm cores inline (style="border-color:rgba(255,255,255,…)")
 *    que só perdem para regra com !important.
 *
 * Tons neon ajustados no claro para manter contraste legível (WCAG):
 *  azul  #18E1FF -> #0891B2 | laranja #FF7A18 -> #E8630A
 */

/* Controles nativos (inputs, scrollbar) seguem o esquema em vigor */
body {
	color-scheme: dark;
}

@media (prefers-color-scheme: light) {
	body {
		color-scheme: light;

		/* paleta clara */
		--wp--preset--color--base: #F7F8FC !important;
		--wp--preset--color--surface: #FFFFFF !important;
		--wp--preset--color--surface-2: #ECEEF6 !important;
		--wp--preset--color--contrast: #10141F !important;
		--wp--preset--color--muted: #555C74 !important;
		--wp--preset--color--neon-blue: #0891B2 !important;
		--wp--preset--color--neon-orange: #E8630A !important;

		/* gradientes equivalentes */
		--wp--preset--gradient--neon: linear-gradient(135deg, #0891B2 0%, #E8630A 100%) !important;
		--wp--preset--gradient--glow-blue: radial-gradient(60% 60% at 50% 0%, rgba(8, 145, 178, 0.14) 0%, rgba(247, 248, 252, 0) 70%) !important;
		--wp--preset--gradient--glow-orange: radial-gradient(60% 60% at 50% 100%, rgba(232, 99, 10, 0.12) 0%, rgba(247, 248, 252, 0) 70%) !important;
		--wp--preset--gradient--surface-fade: linear-gradient(180deg, #FFFFFF 0%, #F7F8FC 100%) !important;
	}

	/* Bordas brancas translúcidas (inline nos patterns) viram escuras suaves */
	.wp-block-details,
	.wp-block-group,
	.wp-block-column,
	.is-style-outline .wp-block-button__link {
		border-color: rgba(16, 20, 31, 0.12) !important;
	}

	hr.wp-block-separator {
		background-color: rgba(16, 20, 31, 0.1) !important;
		color: rgba(16, 20, 31, 0.1) !important;
	}

	/* Recria os efeitos do theme.json (header, glows, cards) para fundo claro */
	.sw-header {
		background: rgba(247, 248, 252, 0.8) !important;
		border-bottom: 1px solid rgba(16, 20, 31, 0.08) !important;
	}

	.sw-glow {
		border: 1px solid rgba(16, 20, 31, 0.08) !important;
		box-shadow: 0 10px 40px rgba(8, 145, 178, 0.1) !important;
	}

	.sw-glow:hover {
		border-color: rgba(8, 145, 178, 0.45) !important;
		box-shadow: 0 10px 40px rgba(8, 145, 178, 0.16) !important;
	}

	.sw-card {
		border: 1px solid rgba(16, 20, 31, 0.1) !important;
	}

	.sw-card:hover {
		border-color: rgba(232, 99, 10, 0.5) !important;
	}

	.wp-element-button:hover,
	.wp-block-button__link:hover {
		box-shadow: 0 8px 28px rgba(8, 145, 178, 0.28) !important;
	}

	.is-style-outline .wp-block-button__link:hover,
	.wp-block-button.is-style-outline .wp-block-button__link:hover {
		box-shadow: 0 8px 28px rgba(8, 145, 178, 0.15) !important;
	}
}
