/**
 * Banner de consentimento de cookies.
 * Temático (claro/escuro/auto) e responsivo.
 */

.hero-cc,
.hero-cc-toggle {
	--hcc-bg: #ffffff;
	--hcc-fg: #1d2327;
	--hcc-muted: #50575e;
	--hcc-border: #e0e0e2;
	--hcc-primary: #2160c4;
	--hcc-primary-fg: #ffffff;
	--hcc-link: #1a63c0;
	--hcc-ghost-bg: #f2f4f7;
	--hcc-ghost-fg: #1d2327;
	--hcc-shadow: 0 -2px 24px rgba( 0, 0, 0, 0.14 );
	--hcc-radius: 12px;

	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var( --hcc-fg );
}

.hero-cc *,
.hero-cc *::before,
.hero-cc *::after {
	box-sizing: border-box;
}

/* O atributo [hidden] deve vencer as regras de display do tema e as nossas
 * (.hero-cc__cats grid, .hero-cc-toggle flex, button{display:block} do tema). */
.hero-cc[hidden],
.hero-cc-toggle[hidden],
.hero-cc [hidden] {
	display: none !important;
}

/* Tema escuro: automático pelo sistema… */
@media ( prefers-color-scheme: dark ) {
	.hero-cc.hero-cc--theme-auto,
	.hero-cc-toggle.hero-cc--theme-auto {
		--hcc-bg: #1e1f24;
		--hcc-fg: #f0f0f1;
		--hcc-muted: #b8bcc4;
		--hcc-border: #3a3d45;
		--hcc-primary: #4f8ef0;
		--hcc-primary-fg: #0b1220;
		--hcc-link: #8ab4f8;
		--hcc-ghost-bg: #2c2f37;
		--hcc-ghost-fg: #f0f0f1;
		--hcc-shadow: 0 -2px 28px rgba( 0, 0, 0, 0.5 );
	}
}

/* …ou forçado. */
.hero-cc.hero-cc--theme-dark {
	--hcc-bg: #1e1f24;
	--hcc-fg: #f0f0f1;
	--hcc-muted: #b8bcc4;
	--hcc-border: #3a3d45;
	--hcc-primary: #4f8ef0;
	--hcc-primary-fg: #0b1220;
	--hcc-link: #8ab4f8;
	--hcc-ghost-bg: #2c2f37;
	--hcc-ghost-fg: #f0f0f1;
	--hcc-shadow: 0 -2px 28px rgba( 0, 0, 0, 0.5 );
}

/* ---------------------------------------------------------------- *
 * Contêiner
 * ---------------------------------------------------------------- */

.hero-cc {
	position: fixed;
	z-index: 99999;
	background: var( --hcc-bg );
	box-shadow: var( --hcc-shadow );
	animation: hero-cc-in 0.28s ease;
}

@keyframes hero-cc-in {
	from { opacity: 0; transform: translateY( 12px ); }
	to   { opacity: 1; transform: translateY( 0 ); }
}

@media ( prefers-reduced-motion: reduce ) {
	.hero-cc { animation: none; }
}

/* Barra inferior */
.hero-cc--bar {
	left: 0;
	right: 0;
	bottom: 0;
	border-top: 1px solid var( --hcc-border );
}
.hero-cc--bar .hero-cc__panel {
	max-width: 1160px;
	margin: 0 auto;
	padding: 18px 24px;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "head actions" "cats cats";
	gap: 12px 28px;
	align-items: center;
}
.hero-cc--bar .hero-cc__head { grid-area: head; }
.hero-cc--bar .hero-cc__actions { grid-area: actions; }
.hero-cc--bar .hero-cc__cats { grid-area: cats; }

/* Caixa no canto */
.hero-cc--box {
	left: 20px;
	bottom: 20px;
	width: min( 420px, calc( 100vw - 40px ) );
	border: 1px solid var( --hcc-border );
	border-radius: var( --hcc-radius );
	overflow: hidden;
}
.hero-cc--box .hero-cc__panel {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* ---------------------------------------------------------------- *
 * Conteúdo
 * ---------------------------------------------------------------- */

/* Título: ancorado no ID para vencer o estilo de h2 do tema e do Kit do
 * Elementor (`.elementor-kit-N h2` deixava o título com 48 px, na cor e na
 * fonte dos títulos do site). O banner fica igual em qualquer site. */
#hero-cc .hero-cc__title {
	margin: 0 0 4px;
	padding: 0;
	font-family: inherit;
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	color: var( --hcc-title, var( --hcc-fg ) );
}
.hero-cc__body {
	margin: 0;
	color: var( --hcc-muted );
}
/* Link da política: ancorado no ID + !important para vencer o `a` do tema
 * (que o deixava num azul-marinho ilegível sobre o fundo escuro). Usa o azul
 * claro (--hcc-link) no tema escuro; troque pela cor da marca com --hcc-link. */
#hero-cc .hero-cc__policy,
#hero-cc .hero-cc__policy:link,
#hero-cc .hero-cc__policy:visited {
	color: var( --hcc-link ) !important;
	text-decoration: underline;
	white-space: nowrap;
}
#hero-cc .hero-cc__policy:hover,
#hero-cc .hero-cc__policy:focus {
	color: var( --hcc-link ) !important;
	filter: brightness( 1.12 );
}

.hero-cc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
}

.hero-cc__btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 9px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
	/* Só o filtro anima. O fundo é fixo (mesmo no hover), então animar `background`
	 * só causaria um flash do valor herdado do tema (navy) no carregamento. */
	transition: filter 0.15s ease;
}
.hero-cc__btn:focus-visible {
	outline: 2px solid var( --hcc-primary );
	outline-offset: 2px;
}
/* Cores dos botões: ancoradas no ID + !important em TODOS os estados, para que
 * a regra global do tema `button:hover,[type=button]:hover{background:#cc3366}`
 * (o rosa do Elementor) e o override do fundo-base nunca vençam. */
#hero-cc .hero-cc__btn--primary,
#hero-cc .hero-cc__btn--primary:hover,
#hero-cc .hero-cc__btn--primary:focus,
#hero-cc .hero-cc__btn--primary:active {
	background: var( --hcc-primary ) !important;
	color: var( --hcc-primary-fg ) !important;
	border-color: transparent !important;
}
#hero-cc .hero-cc__btn--ghost,
#hero-cc .hero-cc__btn--ghost:hover,
#hero-cc .hero-cc__btn--ghost:focus,
#hero-cc .hero-cc__btn--ghost:active,
#hero-cc .hero-cc__btn--save,
#hero-cc .hero-cc__btn--save:hover,
#hero-cc .hero-cc__btn--save:focus,
#hero-cc .hero-cc__btn--save:active {
	background: var( --hcc-ghost-bg ) !important;
	color: var( --hcc-ghost-fg ) !important;
	border-color: var( --hcc-border ) !important;
}
/* Feedback de hover próprio (sem tocar na cor): leve realce. */
#hero-cc .hero-cc__btn--primary:hover,
#hero-cc .hero-cc__btn--primary:focus,
#hero-cc .hero-cc__btn--ghost:hover,
#hero-cc .hero-cc__btn--ghost:focus,
#hero-cc .hero-cc__btn--save:hover,
#hero-cc .hero-cc__btn--save:focus {
	filter: brightness( 1.08 );
}
/* Sem sombra nos botões do banner, em nenhum estado. O estilo global de botão do Kit do Elementor
 * (no Copas, `.elementor-kit-58 button { box-shadow: 0 0 10px rgba(0,0,0,.5) }`) vazava para cá
 * e deixava os botões com um halo escuro forte, principalmente no celular. */
#hero-cc .hero-cc__btn,
#hero-cc .hero-cc__btn:hover,
#hero-cc .hero-cc__btn:focus,
#hero-cc .hero-cc__btn:active {
	box-shadow: none !important;
}

/* Categorias */
.hero-cc__cats {
	display: grid;
	gap: 8px;
	margin-top: 4px;
	padding-top: 12px;
	border-top: 1px solid var( --hcc-border );
}
.hero-cc--bar .hero-cc__cats {
	grid-template-columns: repeat( auto-fit, minmax( 220px, 1fr ) );
	gap: 8px 24px;
}
.hero-cc__cat {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	cursor: pointer;
}
.hero-cc__cat-input {
	margin-top: 3px;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	accent-color: var( --hcc-primary );
}
.hero-cc__cat-input:disabled { opacity: 0.55; cursor: not-allowed; }
.hero-cc__cat-text { display: flex; flex-direction: column; }
.hero-cc__cat-label { font-weight: 600; color: var( --hcc-fg ); }
.hero-cc__cat-desc { color: var( --hcc-muted ); font-size: 12.5px; }

/* ---------------------------------------------------------------- *
 * Botão flutuante
 * ---------------------------------------------------------------- */

.hero-cc-toggle {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 99998;
	width: 46px;
	height: 46px;
	padding: 0 !important; /* neutraliza o padding de <button> do tema, que descentralizava o ícone */
	border-radius: 50%;
	border: 1px solid var( --hcc-border );
	background: var( --hcc-bg );
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.18 );
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}
.hero-cc-toggle__icon { display: block; width: 24px; height: 24px; }
.hero-cc-toggle:hover { transform: scale( 1.08 ); }
.hero-cc-toggle:focus-visible {
	outline: 2px solid var( --hcc-primary );
	outline-offset: 2px;
}

@media ( prefers-color-scheme: dark ) {
	.hero-cc-toggle.hero-cc--theme-auto {
		background: #1e1f24;
		border-color: #3a3d45;
	}
}
.hero-cc-toggle.hero-cc--theme-dark {
	background: #1e1f24;
	border-color: #3a3d45;
}

/* Toggle 🍪: impede o hover rosa global de vazar (mantém o fundo do tema).
 * O ID vence a regra `button:hover` do tema; o fundo certo por tema é
 * reafirmado abaixo. */
#hero-cc-toggle:hover,
#hero-cc-toggle:focus {
	background: var( --hcc-bg );
}
@media ( prefers-color-scheme: dark ) {
	#hero-cc-toggle.hero-cc--theme-auto:hover,
	#hero-cc-toggle.hero-cc--theme-auto:focus {
		background: #1e1f24;
	}
}
#hero-cc-toggle.hero-cc--theme-dark:hover,
#hero-cc-toggle.hero-cc--theme-dark:focus {
	background: #1e1f24;
}
/* A sombra leve do botão 🍪 também perdia para o estilo global de botão do Kit (classe + tag vence
 * só classe): o ID devolve a sombra própria. */
#hero-cc-toggle,
#hero-cc-toggle:hover,
#hero-cc-toggle:focus {
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.18 );
}

/* ---------------------------------------------------------------- *
 * Responsivo
 * ---------------------------------------------------------------- */

@media ( max-width: 782px ) {
	.hero-cc--bar .hero-cc__panel {
		grid-template-columns: 1fr;
		grid-template-areas: "head" "cats" "actions";
		padding: 16px;
	}
	.hero-cc--bar .hero-cc__actions { justify-content: stretch; }
	.hero-cc__btn { flex: 1 1 auto; text-align: center; }
}
