/*
 * Forte — Consentimento de cookies: banner, central, botão flutuante,
 * placeholder e shortcodes (F-T15.2). Tudo em custom properties --fcc-*:
 * o default (= preset "light") vale em qualquer tema; "dark" abaixo; "store"
 * é mapeado pelo tema para os tokens dele; "custom" sai inline pelo PHP.
 * Sem sobreposição da página (sem cookie wall). Todos os botões de decisão
 * usam .fcc-btn (mesmo peso).
 */

.fcc {
	--fcc-bg: #ffffff;
	--fcc-text: #1f1f1f;
	--fcc-muted: #4a4a4a;
	--fcc-accent: #1f1f1f;
	--fcc-accent-hover: #000000;
	--fcc-btn-text: #ffffff;
	--fcc-toggle-on: #1f7a3d;
	--fcc-toggle-off: #82878f;
	--fcc-line: #e3e5ea;
	--fcc-surface: #f5f6f8;
	--fcc-float-bg: #1f1f1f;
	--fcc-float-icon: #ffffff;
	--fcc-focus: #1f6feb;
	--fcc-radius: 14px;
	--fcc-radius-btn: 10px;
	--fcc-shadow: 0 12px 40px rgba(15, 18, 30, 0.22);
	--fcc-font: inherit;
	--fcc-font-heading: inherit;
	--fcc-z: 70;
	--fcc-gap: 16px;
	--fcc-offset-bottom: 0px;
	--fcc-push-w: 420px;

	box-sizing: border-box;
	font-family: var(--fcc-font);
	color: var(--fcc-text);
	text-align: left;
}

.fcc *,
.fcc *::before,
.fcc *::after {
	box-sizing: inherit;
}

.fcc[hidden] {
	display: none !important;
}

.fcc.fcc--preset-dark {
	--fcc-bg: #16192b;
	--fcc-text: #f4f5f9;
	--fcc-muted: #c4c8d6;
	--fcc-accent: #f4f5f9;
	--fcc-accent-hover: #ffffff;
	--fcc-btn-text: #16192b;
	--fcc-toggle-on: #4ade80;
	--fcc-toggle-off: #7a8099;
	--fcc-line: #2c3048;
	--fcc-surface: #1f2337;
	--fcc-float-bg: #16192b;
	--fcc-float-icon: #f4f5f9;
	--fcc-focus: #8ab4ff;
}

.fcc :focus-visible,
.fcc:focus-visible {
	outline: 3px solid var(--fcc-focus);
	outline-offset: 2px;
}

.fcc:focus:not(:focus-visible) {
	outline: none;
}

/* ── Texto ─────────────────────────────────────────────────────────────── */

.fcc-prose {
	font-size: 14px;
	line-height: 1.55;
	color: var(--fcc-muted);
}

.fcc-prose p {
	margin: 0 0 8px;
}

.fcc-prose p:last-child {
	margin-bottom: 0;
}

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

.fcc-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 8px 0 0;
	font-size: 13.5px;
}

/* ── Botões (mesma classe para aceitar, rejeitar, personalizar e salvar) ── */

.fcc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.fcc-btn {
	flex: 1 1 0;
	min-width: 0;
	min-height: 44px;
	margin: 0;
	padding: 11px 18px;
	border: 2px solid var(--fcc-accent);
	border-radius: var(--fcc-radius-btn);
	background: var(--fcc-accent);
	color: var(--fcc-btn-text);
	font: 700 14.5px/1.2 var(--fcc-font);
	letter-spacing: 0;
	text-align: center;
	text-transform: none;
	cursor: pointer;
	white-space: normal;
	transition: background-color 0.15s, border-color 0.15s;
}

.fcc-btn:hover {
	background: var(--fcc-accent-hover);
	border-color: var(--fcc-accent-hover);
	color: var(--fcc-btn-text);
}

/* ── Banner ────────────────────────────────────────────────────────────── */

.fcc-banner {
	position: fixed;
	z-index: var(--fcc-z);
	left: var(--fcc-gap);
	right: var(--fcc-gap);
	bottom: calc(var(--fcc-gap) + var(--fcc-offset-bottom));
	display: flex;
	justify-content: center;
	pointer-events: none;
}

.fcc-banner__inner {
	pointer-events: auto;
	width: min(1180px, 100%);
	max-height: calc(100vh - 2 * var(--fcc-gap));
	overflow-y: auto;
	display: flex;
	align-items: center;
	gap: 20px 28px;
	padding: 20px 24px;
	background: var(--fcc-bg);
	color: var(--fcc-text);
	border: 1px solid var(--fcc-line);
	border-radius: var(--fcc-radius);
	box-shadow: var(--fcc-shadow);
}

.fcc-banner:focus {
	outline: none;
}

.fcc-banner:focus-visible .fcc-banner__inner {
	outline: 3px solid var(--fcc-focus);
	outline-offset: 2px;
}

.fcc-banner__body {
	flex: 1 1 auto;
	min-width: 0;
}

.fcc-banner__title {
	margin: 0 0 6px;
	font: 700 17px/1.25 var(--fcc-font-heading);
	color: var(--fcc-text);
}

.fcc-banner__google {
	margin-top: 8px;
	font-size: 12.5px;
}

.fcc-banner__actions {
	flex: 0 0 auto;
	width: min(480px, 42%);
}

.fcc-banner__cats {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 12px 0 0;
	padding: 0;
}

.fcc-banner__cat {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	font-weight: 600;
}

.fcc-banner--top {
	top: var(--fcc-gap);
	bottom: auto;
}

/* Caixa no canto: o canto direito tem o WhatsApp — sobe acima dele. */
.fcc-banner--box,
.fcc-banner--popup {
	left: auto;
	right: auto;
}

.fcc-banner--box .fcc-banner__inner,
.fcc-banner--popup .fcc-banner__inner {
	width: min(420px, calc(100vw - 2 * var(--fcc-gap)));
	flex-direction: column;
	align-items: stretch;
}

.fcc-banner--box .fcc-banner__actions,
.fcc-banner--popup .fcc-banner__actions {
	width: 100%;
}

.fcc-banner--box.fcc-banner--bottom,
.fcc-banner--box.fcc-banner--bottom-left {
	left: var(--fcc-gap);
}

.fcc-banner--box.fcc-banner--bottom-right {
	right: var(--fcc-gap);
	bottom: calc(96px + var(--fcc-offset-bottom));
}

.fcc-banner--box.fcc-banner--top {
	left: var(--fcc-gap);
}

.fcc-banner--popup {
	inset: 0;
	align-items: center;
	padding: var(--fcc-gap);
}

.fcc-banner--popup .fcc-banner__inner {
	width: min(520px, 100%);
}

/* ── Central de preferências ───────────────────────────────────────────── */

.fcc-center {
	position: fixed;
	z-index: calc(var(--fcc-z) + 10);
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--fcc-gap);
	pointer-events: none;
}

.fcc-center:focus {
	outline: none;
}

.fcc-center__panel {
	pointer-events: auto;
	width: min(640px, 100%);
	max-height: calc(100vh - 2 * var(--fcc-gap));
	display: flex;
	flex-direction: column;
	background: var(--fcc-bg);
	color: var(--fcc-text);
	border: 1px solid var(--fcc-line);
	border-radius: var(--fcc-radius);
	box-shadow: var(--fcc-shadow);
	overflow: hidden;
}

.fcc-center:focus-visible .fcc-center__panel {
	outline: 3px solid var(--fcc-focus);
	outline-offset: 2px;
}

.fcc-center--sidebar,
.fcc-center--push {
	justify-content: flex-start;
	align-items: stretch;
	padding: 0;
}

.fcc-center--sidebar .fcc-center__panel,
.fcc-center--push .fcc-center__panel {
	width: min(var(--fcc-push-w), 100vw);
	max-height: none;
	height: 100%;
	border-radius: 0;
	border-width: 0 1px 0 0;
}

.fcc-center__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--fcc-line);
}

.fcc-center__logo {
	display: block;
	height: 28px;
	width: auto;
	max-width: 120px;
}

.fcc-center__title {
	flex: 1 1 auto;
	margin: 0;
	font: 700 18px/1.25 var(--fcc-font-heading);
	color: var(--fcc-text);
}

.fcc-center__close {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--fcc-text);
	cursor: pointer;
}

.fcc-center__close:hover {
	background: var(--fcc-surface);
}

.fcc-center__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px 20px;
	overscroll-behavior: contain;
}

.fcc-center__google {
	margin-top: 10px;
	font-size: 12.5px;
}

.fcc-center__actions {
	padding: 14px 20px;
	border-top: 1px solid var(--fcc-line);
	background: var(--fcc-bg);
}

.fcc-cats,
.fcc-svcs {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fcc-cats {
	margin-top: 14px;
	display: grid;
	gap: 10px;
}

.fcc-cat {
	padding: 14px 16px;
	border: 1px solid var(--fcc-line);
	border-radius: calc(var(--fcc-radius) - 4px);
	background: var(--fcc-bg);
}

.fcc-cat__head,
.fcc-svc__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.fcc-cat__title {
	flex: 1 1 auto;
	margin: 0;
	font: 700 15px/1.3 var(--fcc-font);
	color: var(--fcc-text);
}

.fcc-cat__always {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--fcc-toggle-on);
	white-space: nowrap;
}

.fcc.fcc--preset-dark .fcc-cat__always {
	color: var(--fcc-toggle-on);
}

.fcc-cat__desc {
	margin: 6px 0 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--fcc-muted);
}

.fcc-cat__services {
	margin-top: 10px;
}

.fcc-cat__summary {
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
	color: var(--fcc-text);
	padding: 4px 0;
}

.fcc-svcs {
	display: grid;
	gap: 8px;
	margin-top: 8px;
}

.fcc-svc {
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--fcc-surface);
}

.fcc-svc__name {
	flex: 1 1 auto;
	font-size: 14px;
	font-weight: 700;
}

.fcc-svc__meta {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 2px 12px;
	margin: 6px 0 0;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--fcc-muted);
}

.fcc-svc__meta dt {
	font-weight: 700;
}

.fcc-svc__meta dd {
	margin: 0;
	overflow-wrap: anywhere;
}

/* ── Chave (role=switch) ───────────────────────────────────────────────── */

.fcc-switch {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--fcc-toggle-off);
	cursor: pointer;
	transition: background-color 0.15s;
}

.fcc-switch__knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s;
}

.fcc-switch[aria-checked="true"] {
	background: var(--fcc-toggle-on);
}

.fcc-switch[aria-checked="true"] .fcc-switch__knob {
	transform: translateX(20px);
}

.fcc-switch[disabled] {
	cursor: not-allowed;
	opacity: 0.6;
}

.fcc-switch--sm {
	width: 40px;
	height: 22px;
}

.fcc-switch--sm .fcc-switch__knob {
	width: 16px;
	height: 16px;
}

.fcc-switch--sm[aria-checked="true"] .fcc-switch__knob {
	transform: translateX(18px);
}

/* ── Botão flutuante ───────────────────────────────────────────────────── */

.fcc-float {
	position: fixed;
	z-index: calc(var(--fcc-z) - 9);
	bottom: calc(20px + var(--fcc-offset-bottom));
	left: 20px;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--fcc-float-bg);
	color: var(--fcc-float-icon);
	box-shadow: var(--fcc-shadow);
	cursor: pointer;
	transition: transform 0.15s;
}

.fcc-float:hover {
	transform: scale(1.06);
}

.fcc-float--right {
	left: auto;
	right: 20px;
	bottom: calc(92px + var(--fcc-offset-bottom));
}

/* ── Placeholder de conteúdo bloqueado ─────────────────────────────────── */

.fcc-placeholder {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 220px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 1px solid var(--fcc-line);
	border-radius: var(--fcc-radius);
	background: var(--fcc-surface);
	color: var(--fcc-text);
}

.fcc-placeholder__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.18;
}

.fcc-placeholder__body {
	position: relative;
	max-width: 440px;
	padding: 20px;
	text-align: center;
}

.fcc-placeholder__title {
	margin: 0 0 6px;
	font: 700 16px/1.3 var(--fcc-font-heading);
}

.fcc-placeholder__provider {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--fcc-muted);
}

.fcc-placeholder__text {
	margin: 0 0 14px;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--fcc-muted);
}

.fcc-placeholder__actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	font-size: 13px;
}

.fcc-placeholder__actions .fcc-btn {
	flex: 0 0 auto;
}

/* ── Shortcodes ────────────────────────────────────────────────────────── */

.fcc-sc-revoke .fcc-btn {
	flex: 0 0 auto;
}

.fcc-sc-status,
.fcc-history__status {
	margin: 8px 0 0;
	font-size: 14px;
	color: var(--fcc-muted);
}

.fcc-history {
	overflow-x: auto;
}

.fcc-history__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

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

/* ── Empurrar a página (center_layout = push) ──────────────────────────── */

@media (min-width: 900px) {
	html.fcc-push-open body {
		margin-left: var(--fcc-push-w);
		transition: margin-left 0.2s;
	}
}

/* ── Animações ─────────────────────────────────────────────────────────── */

@keyframes fcc-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes fcc-slide {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

@keyframes fcc-slide-side {
	from { transform: translateX(-24px); opacity: 0; }
	to { transform: none; opacity: 1; }
}

.fcc--anim-fade.is-in .fcc-banner__inner,
.fcc--anim-fade.is-in .fcc-center__panel {
	animation: fcc-fade 0.2s ease-out;
}

.fcc--anim-slide.is-in .fcc-banner__inner,
.fcc--anim-slide.fcc-center--center.is-in .fcc-center__panel {
	animation: fcc-slide 0.24s ease-out;
}

.fcc--anim-slide.fcc-center--sidebar.is-in .fcc-center__panel,
.fcc--anim-slide.fcc-center--push.is-in .fcc-center__panel {
	animation: fcc-slide-side 0.24s ease-out;
}

@media (prefers-reduced-motion: reduce) {
	.fcc *,
	.fcc,
	html.fcc-push-open body {
		animation: none !important;
		transition: none !important;
	}
}

/* ── Exemplos do styleguide (estáticos, no fluxo) ──────────────────────── */

.fcc--demo.fcc-banner,
.fcc--demo.fcc-center,
.fcc--demo.fcc-float {
	position: relative;
	inset: auto;
	z-index: auto;
}

.fcc--demo.fcc-banner {
	left: auto;
	right: auto;
	bottom: auto;
	justify-content: flex-start;
}

.fcc--demo.fcc-banner--popup {
	padding: 0;
}

.fcc--demo.fcc-center {
	padding: 0;
	justify-content: flex-start;
}

.fcc--demo .fcc-center__panel {
	max-height: 560px;
}

/* ── Mobile ────────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
	.fcc {
		--fcc-gap: 10px;
	}

	.fcc-banner__inner {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
		max-height: min(75vh, calc(100vh - 2 * var(--fcc-gap)));
	}

	.fcc-banner__actions {
		width: 100%;
	}

	.fcc-banner--box,
	.fcc-banner--box.fcc-banner--bottom-right {
		left: var(--fcc-gap);
		right: var(--fcc-gap);
		bottom: calc(var(--fcc-gap) + var(--fcc-offset-bottom));
	}

	.fcc-banner--box .fcc-banner__inner {
		width: 100%;
	}

	.fcc-actions {
		flex-direction: column;
	}

	.fcc-btn {
		flex: 0 0 auto;
		width: 100%;
	}

	.fcc-center {
		padding: 0;
		align-items: flex-end;
	}

	.fcc-center__panel {
		width: 100%;
		max-height: 92vh;
		border-radius: var(--fcc-radius) var(--fcc-radius) 0 0;
	}

	.fcc-center--sidebar .fcc-center__panel,
	.fcc-center--push .fcc-center__panel {
		border-radius: 0;
	}

	.fcc-float {
		left: 14px;
		bottom: calc(14px + var(--fcc-offset-bottom));
	}

	.fcc-float--right {
		left: auto;
		right: 14px;
		bottom: calc(86px + var(--fcc-offset-bottom));
	}
}
