/* BC Cookie — front-end. Todas as regras são escopadas por prefixo .bc- / #bc-cookie. */

:root {
	--bc-fundo: #fff;
	--bc-texto: #475569;
	--bc-titulo: #0f172a;
	--bc-link: #1d4ed8;
	--bc-borda: #e2e8f0;
	--bc-toggle: #1d5fd0;
	--bc-fonte: inherit;
	--bc-fonte-tam: 14px;
	--bc-raio: 16px;
	--bc-largura: 440px;
	--bc-espaco: 24px;
	--bc-overlay: rgba(15, 23, 42, .55);
}

#bc-cookie,
#bc-cookie-prefs,
#bc-cookie-revisit,
.bc-bloqueado {
	font-family: var(--bc-fonte);
	font-size: var(--bc-fonte-tam);
	line-height: 1.55;
	color: var(--bc-texto);
	box-sizing: border-box;
}

#bc-cookie *,
#bc-cookie-prefs *,
.bc-bloqueado * {
	box-sizing: border-box;
}

#bc-cookie[hidden],
#bc-cookie-prefs[hidden],
#bc-cookie-revisit[hidden],
.bc-overlay[hidden],
.bc-root [hidden] {
	display: none !important;
}

.bc-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.bc-icone {
	display: block;
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

/* ---------------------------------------------------------------- Banner */

.bc-cookie {
	position: fixed;
	z-index: 999999;
	background: var(--bc-fundo);
	color: var(--bc-texto);
	border: 1px solid var(--bc-borda);
	border-radius: var(--bc-raio);
	box-shadow: 0 20px 50px -12px rgba(15, 23, 42, .35);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .35s ease, transform .35s ease;
	outline: none;
}

.bc-cookie.bc-visivel {
	opacity: 1;
	transform: none;
}

.bc-cookie.bc-sem-sombra {
	box-shadow: none;
}

.bc-cookie__inner {
	position: relative;
	padding: var(--bc-espaco);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.bc-titulo {
	text-wrap: balance;
	margin: 0 0 6px;
	padding: 0;
	font-family: inherit;
	font-size: 1.2em;
	line-height: 1.3;
	font-weight: 700;
	color: var(--bc-titulo);
}

.bc-msg {
	margin: 0;
	font-size: 1em;
}

.bc-link {
	color: var(--bc-link);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bc-link:hover {
	text-decoration-thickness: 2px;
}

.bc-logo {
	display: block;
	width: var(--bc-logo-largura, 160px);
	height: var(--bc-logo-altura, 34px);
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
}

.bc-acoes {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Botões */
.bc-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	margin: 0;
	border: 2px solid transparent;
	border-radius: calc(var(--bc-raio) * .65);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: filter .15s ease, background-color .15s ease, transform .1s ease;
}

.bc-btn--personalizar {
	white-space: normal;
	text-wrap: balance;
}

.bc-btn:hover {
	filter: brightness(1.12);
}

.bc-btn:active {
	transform: translateY(1px);
}

.bc-btn--aceitar { --b: var(--bc-aceitar-bg, #0b2a4a); --t: var(--bc-aceitar-txt, #fff); }
.bc-btn--rejeitar { --b: var(--bc-rejeitar-bg, #0b2a4a); --t: var(--bc-rejeitar-txt, #fff); }
.bc-btn--personalizar { --b: var(--bc-personalizar-bg, #1d4ed8); --t: var(--bc-personalizar-txt, #fff); }

.bc-btn--solid {
	background: var(--b);
	border-color: var(--b);
	color: var(--t);
}

.bc-btn--outline {
	background: transparent;
	border-color: var(--b);
	color: var(--b);
}

.bc-btn--outline:hover {
	background: color-mix(in srgb, var(--b) 8%, transparent);
	filter: none;
}

.bc-btn--link {
	background: transparent;
	border-color: transparent;
	color: var(--b);
	text-decoration: underline;
	text-underline-offset: 3px;
	padding-inline: 8px;
}

.bc-btn:focus-visible,
.bc-fechar:focus-visible,
.bc-cat__ver:focus-visible,
.bc-revisit:focus-visible,
.bc-link:focus-visible,
.bc-switch__input:focus-visible + .bc-switch__trilho {
	outline: 3px solid color-mix(in srgb, var(--bc-link) 55%, transparent);
	outline-offset: 2px;
}

.bc-btn-inline {
	display: inline-flex;
}

.bc-fechar {
	appearance: none;
	position: absolute;
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--bc-texto);
	cursor: pointer;
	transition: background-color .15s ease;
}

.bc-fechar:hover {
	background: color-mix(in srgb, var(--bc-texto) 12%, transparent);
}

/* Layouts */
.bc-layout-barra {
	left: 0;
	right: 0;
	border-radius: 0;
	border-width: 1px 0;
}

.bc-layout-barra.bc-pos-rodape { bottom: 0; }
.bc-layout-barra.bc-pos-topo { top: 0; transform: translateY(-14px); }
.bc-layout-barra.bc-visivel { transform: none; }

.bc-layout-barra .bc-cookie__inner {
	max-width: 1240px;
	margin: 0 auto;
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px 32px;
}

.bc-layout-barra .bc-cookie__texto {
	flex: 1 1 420px;
}

.bc-layout-barra .bc-acoes {
	flex: 0 0 auto;
	flex-wrap: wrap;
}

.bc-layout-barra .bc-fechar {
	top: 6px;
	right: 6px;
}

.bc-layout-caixa,
.bc-layout-popup {
	width: min(var(--bc-largura), calc(100vw - 24px));
}

.bc-layout-caixa.bc-pos-inferior-esquerda { left: 16px; bottom: 16px; }
.bc-layout-caixa.bc-pos-inferior-direita { right: 16px; bottom: 16px; }
.bc-layout-caixa.bc-pos-superior-esquerda { left: 16px; top: 16px; }
.bc-layout-caixa.bc-pos-superior-direita { right: 16px; top: 16px; }

.bc-layout-caixa .bc-acoes .bc-btn--aceitar,
.bc-layout-caixa .bc-acoes .bc-btn--rejeitar {
	flex: 1 1 140px;
}

.bc-layout-caixa .bc-acoes .bc-btn--personalizar {
	flex: 1 1 100%;
	order: 3;
	min-height: 36px;
}

.bc-layout-popup {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -46%);
}

.bc-layout-popup.bc-visivel {
	transform: translate(-50%, -50%);
}

.bc-layout-popup .bc-cookie__inner {
	text-align: center;
	align-items: center;
}

.bc-layout-popup .bc-acoes {
	justify-content: center;
	width: 100%;
}

.bc-overlay {
	position: fixed;
	inset: 0;
	z-index: 999998;
	background: var(--bc-overlay);
}

/* ------------------------------------------------- Central de preferências */

.bc-modal-wrap {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: var(--bc-overlay);
	animation: bc-fade .25s ease;
}

.bc-modal {
	display: flex;
	flex-direction: column;
	width: min(680px, 100%);
	max-height: min(88vh, 760px);
	background: var(--bc-fundo);
	color: var(--bc-texto);
	border-radius: var(--bc-raio);
	box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .5);
	overflow: hidden;
	outline: none;
	animation: bc-subir .3s ease;
}

.bc-pref-lateral {
	justify-content: flex-end;
	padding: 0;
}

.bc-pref-lateral .bc-modal {
	width: min(460px, 100%);
	max-height: 100vh;
	height: 100%;
	border-radius: var(--bc-raio) 0 0 var(--bc-raio);
	animation: bc-lateral .3s ease;
}

.bc-modal__topo {
	position: relative;
	padding: 20px calc(var(--bc-espaco) + 28px) 16px var(--bc-espaco);
	border-bottom: 1px solid var(--bc-borda);
}

.bc-modal__topo .bc-titulo {
	margin: 0;
	font-size: 1.3em;
}

.bc-modal__topo .bc-fechar {
	top: 14px;
	right: 14px;
}

.bc-modal__corpo {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px var(--bc-espaco);
	overscroll-behavior: contain;
}

.bc-intro {
	margin-bottom: 18px;
}

.bc-intro p {
	margin: 0 0 .6em;
}

.bc-cat {
	padding: 14px 16px;
	margin-bottom: 10px;
	border: 1px solid var(--bc-borda);
	border-radius: calc(var(--bc-raio) * .75);
	background: color-mix(in srgb, var(--bc-borda) 22%, var(--bc-fundo));
}

.bc-cat__topo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.bc-cat__nome {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 1.05em;
	font-weight: 700;
	color: var(--bc-titulo);
}

.bc-cat__desc {
	margin: 6px 0 8px;
	font-size: .95em;
}

.bc-cat__desc p {
	margin: 0;
}

.bc-sempre {
	padding: 3px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--bc-toggle) 14%, transparent);
	color: var(--bc-toggle);
	font-size: .82em;
	font-weight: 700;
	white-space: nowrap;
}

.bc-cat__ver {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	padding: 7px 14px;
	border: 1px solid color-mix(in srgb, var(--bc-link) 28%, transparent) !important; /* !important: temas estilizam <button> com mais força */
	border-radius: 999px;
	background: color-mix(in srgb, var(--bc-link) 8%, transparent) !important;
	color: var(--bc-link) !important;
	box-shadow: none !important;
	font: inherit;
	font-size: .92em;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.bc-cat__ver:hover,
.bc-cat__ver:focus,
.bc-cat__ver[aria-expanded="true"] {
	background: color-mix(in srgb, var(--bc-link) 15%, transparent) !important;
	border-color: color-mix(in srgb, var(--bc-link) 45%, transparent) !important;
	color: var(--bc-link) !important;
}

.bc-cat__ver .bc-icone {
	width: 1em;
	height: 1em;
	transition: transform .2s ease;
}

.bc-cat__ver[aria-expanded="true"] .bc-icone {
	transform: rotate(180deg);
}

.bc-cat__qtd {
	min-width: 20px;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--bc-link);
	color: #fff;
	font-size: .8em;
	text-align: center;
}

.bc-cat__cookies {
	margin-top: 12px;
	padding: 12px 14px;
	border: 1px solid var(--bc-borda);
	border-radius: calc(var(--bc-raio) * .6);
	background: color-mix(in srgb, var(--bc-link) 3%, var(--bc-fundo));
}

.bc-vazio {
	margin: 0;
	font-style: italic;
}

.bc-tabela-wrap {
	overflow-x: auto;
}

.bc-tabela {
	width: 100%;
	border-collapse: collapse;
	font-size: .92em;
}

.bc-tabela th,
.bc-tabela td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--bc-borda);
	text-align: left;
	vertical-align: top;
}

.bc-tabela th {
	color: var(--bc-titulo);
	font-weight: 700;
}

.bc-tabela code {
	padding: 1px 6px;
	border-radius: 6px;
	background: var(--bc-borda);
	color: var(--bc-titulo);
	font-size: .92em;
	word-break: break-all;
}

.bc-modal__rodape {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	padding: 14px var(--bc-espaco);
	border-top: 1px solid var(--bc-borda);
	background: var(--bc-fundo);
}

/* Chave liga/desliga */
.bc-switch {
	position: relative;
	display: inline-block;
	flex: none;
	cursor: pointer;
}

.bc-switch__input {
	position: absolute;
	inset: -6px;
	width: calc(100% + 12px);
	height: calc(100% + 12px);
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.bc-switch__trilho {
	position: relative;
	display: block;
	width: 52px;
	height: 30px;
	border-radius: 999px;
	background: #cbd5e1;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, .18);
	transition: background-color .2s ease;
}

.bc-switch__trilho::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 5px rgba(15, 23, 42, .3);
	transition: transform .2s ease;
}

.bc-switch:hover .bc-switch__trilho {
	background: #b6c2d2;
}

.bc-switch__input:checked + .bc-switch__trilho,
.bc-switch:hover .bc-switch__input:checked + .bc-switch__trilho {
	background: var(--bc-toggle);
}

.bc-switch__input:checked + .bc-switch__trilho::after {
	transform: translateX(22px);
}

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

.bc-revisit {
	appearance: none;
	position: fixed;
	bottom: 16px;
	z-index: 999990;
	display: grid;
	place-items: center;
	width: var(--bc-revisit-tam, 48px);
	height: var(--bc-revisit-tam, 48px);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--bc-revisit-bg, #0b2a4a) !important; /* !important: temas e Elementor estilizam <button> com mais força */
	color: var(--bc-revisit-fg, #fff) !important;
	box-shadow: 0 8px 24px -6px rgba(15, 23, 42, .5);
	cursor: pointer;
	transition: transform .2s ease;
}

.bc-revisit:hover,
.bc-revisit:focus,
.bc-revisit:active {
	background: var(--bc-revisit-bg, #0b2a4a) !important;
	color: var(--bc-revisit-fg, #fff) !important;
	transform: scale(1.08);
}

.bc-revisit .bc-icone {
	width: 52%;
	height: 52%;
}

.bc-revisit--esquerda { left: 16px; }
.bc-revisit--direita { right: 16px; }

/* ----------------------------------------------- Conteúdo bloqueado (iframe) */

.bc-bloqueado {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 220px;
	margin: 12px 0;
	padding: 24px;
	border: 1px dashed var(--bc-borda);
	border-radius: var(--bc-raio);
	background: #f8fafc;
	text-align: center;
}

.bc-bloqueado strong {
	color: var(--bc-titulo);
	font-size: 1.1em;
}

.bc-bloqueado p {
	max-width: 420px;
	margin: 0 0 6px;
}

/* ------------------------------------------------------ Política e status */

.bc-politica h3 {
	margin-top: 1.6em;
}

.bc-politica .bc-tabela-wrap {
	margin: 12px 0 20px;
}

.bc-status {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 8px;
	background: #f1f5f9;
	font-size: .9em;
}

/* ------------------------------------------------------------ Animações */

@keyframes bc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bc-subir { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes bc-lateral { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	.bc-cookie,
	.bc-modal,
	.bc-modal-wrap,
	.bc-btn,
	.bc-switch__trilho,
	.bc-switch__trilho::after,
	.bc-revisit {
		animation: none !important;
		transition: none !important;
	}
}

@media (max-width: 600px) {
	.bc-layout-caixa.bc-pos-inferior-esquerda,
	.bc-layout-caixa.bc-pos-inferior-direita { left: 12px; right: 12px; bottom: 12px; width: auto; }
	.bc-layout-caixa.bc-pos-superior-esquerda,
	.bc-layout-caixa.bc-pos-superior-direita { left: 12px; right: 12px; top: 12px; width: auto; }
	.bc-layout-barra .bc-acoes,
	.bc-modal__rodape { flex-direction: column; }
	.bc-layout-barra .bc-acoes .bc-btn,
	.bc-modal__rodape .bc-btn { width: 100%; }
	.bc-modal__rodape { flex-direction: column-reverse; }
	.bc-cookie__inner { max-height: 78vh; overflow-y: auto; }
}

/* --------------------------------------------- Prévia dentro do painel */

.bcc-preview .bc-cookie,
.bcc-preview .bc-modal-wrap,
.bcc-preview .bc-overlay,
.bcc-preview .bc-revisit {
	position: absolute;
}

.bcc-preview .bc-overlay { z-index: 1; }
.bcc-preview .bc-cookie { z-index: 2; }
.bcc-preview .bc-revisit { z-index: 2; }
.bcc-preview .bc-modal-wrap { z-index: 5; animation: none; }
.bcc-preview .bc-cookie { transition: none; }
.bcc-preview .bc-modal { max-height: 94%; animation: none; }
.bcc-preview .bc-cookie__inner { max-height: none; }
