/* Hexato UI - modo escuro automatico (so nas paginas do site novo, que tem .hx-hd)
   O atributo data-hx-theme="dark" e ligado por hx-pg-dark.js quando anoitece
   (por do sol de Sao Paulo ate o nascer do sol). Sem botao: o parametro hx-tema=escuro ou claro forca para teste.
   Estrategia: inverte as variaveis do design system. Cores fixas do CSS do Elementor sao reescritas pelo hx-pg-dark.js. */

html[data-hx-theme="dark"]:has(.hx-hd) {
	color-scheme: dark;
	--primary: #4A40DB;
	--primary-hover: #3D33C9;
	--primary-tint: #241F5A;
	--primary-tint-2: #1B1747;
	--accent-text: #6FE0A2;
	--accent-tint: #133627;
	--ink: #EEEDF8;
	--bg: #0E0C22;
	--surface: #17143A;
	--surface-2: #1E1A47;
	--text-2: #B9B6DA;
	--text-3: #A9A5C8;
	--text-4: #8E8AB8;
	--line: #2C2856;
	--line-soft: #231F4B;
	--line-strong: #3B3760;
	--guide: #2C2856;
	--danger-text: #FF8A8E;
	--danger-tint: #3D1720;
	--warning-text: #F2B65A;
	--warning-tint: #3A2A0E;
	--shadow-card-hover: 0 24px 48px -24px rgba(0, 0, 0, .6);
	--shadow-float: 0 40px 80px -40px rgba(0, 0, 0, .7);
}
html[data-hx-theme="dark"]:has(.hx-hd),
html[data-hx-theme="dark"] body:has(.hx-hd) {
	background-color: #0E0C22;
}

/* --ink deixa de ser fundo escuro: paineis que o usavam como fundo ficam com o tom escuro de antes */
html[data-hx-theme="dark"] body .elementor .hx-panel-ink,
html[data-hx-theme="dark"] body .elementor .hx-persona-card,
html[data-hx-theme="dark"] body .elementor .hx-log,
html[data-hx-theme="dark"] body .elementor .hx-mm-card {
	background-color: #1A1640;
}
html[data-hx-theme="dark"] body .elementor .hx-panel-ink,
html[data-hx-theme="dark"] body .elementor .hx-persona-card {
	box-shadow: inset 0 0 0 1px #2C2760;
}

/* Header com vidro escuro */
html[data-hx-theme="dark"] body .elementor .hx-hd::before {
	background: rgba(14, 12, 34, 0.86);
}

/* Estados em primary precisam de mais luz sobre fundo escuro */
html[data-hx-theme="dark"] body .elementor .hx-hd-trigger[aria-expanded='true'],
html[data-hx-theme="dark"] body .elementor .hx-mm-item:hover .hx-mm-t,
html[data-hx-theme="dark"] body .elementor .hx-faq-head:hover .hx-faq-q,
html[data-hx-theme="dark"] body .elementor .hx-rk-head:hover .hx-rk-t {
	color: #A9A2FF;
}

/* Cores fixas dos estados ligados por JS */
html[data-hx-theme="dark"] body .elementor .hx-scn .hx-tile:nth-child(3),
html[data-hx-theme="dark"] body .elementor .hx-scn .hx-tile:nth-child(9),
html[data-hx-theme="dark"] body .elementor .hx-scn .hx-tile:nth-child(16),
html[data-hx-theme="dark"] body .elementor .hx-scn .hx-tile:nth-child(18),
html[data-hx-theme="dark"] body .elementor .hx-scn .hx-tile:nth-child(23) {
	background-color: #5A4210;
}
html[data-hx-theme="dark"] body .elementor .hx-scn[data-mode='ok'] .hx-tile {
	background-color: #2A2570;
	border-color: #3B3490;
}
html[data-hx-theme="dark"] body .elementor .hx-scn[data-mode='ok'] .hx-tile:nth-child(5),
html[data-hx-theme="dark"] body .elementor .hx-scn[data-mode='ok'] .hx-tile:nth-child(14),
html[data-hx-theme="dark"] body .elementor .hx-scn[data-mode='ok'] .hx-tile:nth-child(20) {
	background-color: var(--accent);
	border-color: var(--accent);
}
html[data-hx-theme="dark"] body .elementor .hx-fo[data-down='1'] .hx-fo-l1 { border-color: #5A2530; }
html[data-hx-theme="dark"] body .elementor .hx-fo[data-down='1'] .hx-fo-l2 { border-color: #1E5A3A; }
html[data-hx-theme="dark"] body .elementor details[open].hx-rk-item { border-color: #4A44A0; }
html[data-hx-theme="dark"] body .elementor .hx-sign:hover,
html[data-hx-theme="dark"] body .elementor .hx-sim-sc:hover,
html[data-hx-theme="dark"] body .elementor .hx-sim-fl:hover,
html[data-hx-theme="dark"] body .elementor .hx-au-u:hover { border-color: #7A72E8; }
html[data-hx-theme="dark"] body .elementor .hx-as-row:hover,
html[data-hx-theme="dark"] body .elementor .hx-as-row[aria-pressed='true'] { border-color: #4A44A0; }
html[data-hx-theme="dark"] body .elementor .hx-as-row[aria-pressed='true'] { background-color: var(--surface-2); }
html[data-hx-theme="dark"] body .elementor .hx-sim-res[data-tone='good'],
html[data-hx-theme="dark"] body .elementor .hx-sim-res[data-tone='ok'] { border-color: #1E5A3A; }
html[data-hx-theme="dark"] body .elementor .hx-sim-res[data-tone='bad'] { border-color: #5A2530; }
html[data-hx-theme="dark"] body .elementor .hx-sim-res[data-tone='warn'] {
	background-color: var(--warning-tint);
	border-color: #6B4E14;
}
/* chip branco dentro de painel escuro: o texto continua escuro */
html[data-hx-theme="dark"] body .elementor .hx-sim-fl[aria-pressed='true'],
html[data-hx-theme="dark"] body .elementor .hx-au-seg-b[aria-pressed='true']:not(:last-child) {
	color: #100D2E;
}

/* Fotos um pouco mais suaves sobre fundo escuro */
html[data-hx-theme="dark"] body .elementor img:not(.hx-logo) {
	filter: brightness(0.88) contrast(1.03);
}
