/**
 * Banner e painel de preferências de cookies.
 * Paleta alinhada com o tema (--fd-color-*), com valores de reserva.
 */
.fcf-consent {
	--fcf-c-primary: var(--fd-color-primary, #123357);
	--fcf-c-dark: var(--fd-color-dark, #051e33);
	--fcf-c-muted: var(--fd-color-muted, #a2bacc);
	--fcf-c-bg: #fff;
	--fcf-c-text: #1b2733;
	--fcf-c-soft: #e8eef3;
	font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--fcf-c-text);
}

.fcf-consent[hidden],
.fcf-consent [hidden] {
	display: none !important;
}

/* ---------- Banner (barra em pílula, centrada em baixo) ---------- */
.fcf-consent__banner {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	z-index: 99998;
	box-sizing: border-box;
	width: min(820px, calc(100vw - 32px));
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 10px 10px 12px;
	background: rgba(255, 255, 255, 0.96);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-radius: 999px;
	box-shadow: 0 10px 36px rgba(5, 30, 51, 0.22), 0 0 0 1px rgba(18, 51, 87, 0.08);
	animation: fcf-consent-in 0.35s ease-out both;
}

@keyframes fcf-consent-in {
	from {
		opacity: 0;
		transform: translate(-50%, 16px);
	}
	to {
		opacity: 1;
		transform: translate(-50%, 0);
	}
}

.fcf-consent__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--fcf-c-soft);
	color: var(--fcf-c-primary);
}

.fcf-consent__banner .fcf-consent__text {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: var(--fcf-c-dark);
}

.fcf-consent__text a {
	color: var(--fcf-c-primary);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

.fcf-consent__title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.3;
	color: var(--fcf-c-dark);
}

.fcf-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fcf-consent__banner .fcf-consent__actions {
	flex: none;
	flex-wrap: nowrap;
	align-items: center;
}

.fcf-consent__tune {
	appearance: none;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #4a5b6a;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fcf-consent__tune:hover {
	background: var(--fcf-c-soft);
	color: var(--fcf-c-primary);
}

.fcf-consent__tune:focus-visible {
	outline: 3px solid #f0a800;
	outline-offset: 2px;
}

.fcf-consent__banner .fcf-consent__btn {
	min-height: 44px;
	padding: 8px 24px;
	border-radius: 999px;
}

.fcf-consent__btn--reject {
	background: #fff;
	color: var(--fcf-c-dark);
	border-color: #c9d6e0;
}

.fcf-consent__btn--reject:hover {
	background: var(--fcf-c-soft);
	border-color: var(--fcf-c-primary);
}

/* ---------- Botões (Aceitar e Rejeitar têm o mesmo peso visual) ---------- */
.fcf-consent__btn {
	appearance: none;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 2px solid var(--fcf-c-primary);
	border-radius: 8px;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fcf-consent__btn--solid {
	background: var(--fcf-c-primary);
	color: #fff;
}

.fcf-consent__btn--solid:hover {
	background: var(--fcf-c-dark);
	border-color: var(--fcf-c-dark);
	color: #fff;
}

.fcf-consent__btn--outline {
	background: transparent;
	color: var(--fcf-c-primary);
}

.fcf-consent__btn--outline:hover {
	background: var(--fcf-c-soft);
}

.fcf-consent__btn--inline {
	margin: 0.5rem 0;
}

.fcf-consent__btn:focus-visible,
.fcf-consent__close:focus-visible,
.fcf-consent__switch:focus-visible,
.fcf-consent__details summary:focus-visible,
.fcf-consent__text a:focus-visible {
	outline: 3px solid #f0a800;
	outline-offset: 2px;
}

/* ---------- Painel de preferências ---------- */
.fcf-consent__overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(5, 30, 51, 0.5);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.fcf-consent__modal {
	box-sizing: border-box;
	width: min(460px, 100%);
	max-height: min(92vh, 780px);
	background: #fff;
	border-radius: 28px;
	box-shadow: 0 24px 70px rgba(5, 30, 51, 0.4);
	overflow: hidden;
	will-change: transform;
}

.fcf-consent__modal:focus {
	outline: none;
}

.fcf-consent__modal-inner {
	display: flex;
	flex-direction: column;
	max-height: min(92vh, 780px);
}

.fcf-consent__modal-head {
	display: grid;
	grid-template-columns: 44px 1fr 44px;
	align-items: center;
	gap: 8px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--fcf-c-soft);
}

.fcf-consent__modal-head .fcf-consent__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
}

.fcf-consent__close {
	appearance: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--fcf-c-dark);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.fcf-consent__close:hover {
	background: var(--fcf-c-soft);
}

.fcf-consent__modal-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px 22px;
	border-bottom: 1px solid var(--fcf-c-soft);
}

.fcf-consent__modal-body .fcf-consent__text {
	font-size: 0.875rem;
	line-height: 1.6;
	color: #3d4d5b;
}

.fcf-consent__btn--wide {
	width: 100%;
	min-height: 48px;
	border-radius: 999px;
}

.fcf-consent__acc-list {
	flex: 1 1 auto;
	margin: 18px 22px;
	border: 1px solid var(--fcf-c-soft);
	border-radius: 16px;
	overflow-y: auto;
	background: #fafbfc;
}

.fcf-consent__acc + .fcf-consent__acc {
	border-top: 1px solid var(--fcf-c-soft);
}

.fcf-consent__acc-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px 10px 8px;
}

.fcf-consent__acc-btn {
	appearance: none;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 40px;
	padding: 0 8px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--fcf-c-dark);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.fcf-consent__acc-btn:hover {
	background: var(--fcf-c-soft);
}

.fcf-consent__acc-btn:focus-visible {
	outline: 3px solid #f0a800;
	outline-offset: 2px;
}

/* ícone + / − */
.fcf-consent__acc-icon {
	position: relative;
	flex: none;
	width: 16px;
	height: 16px;
}

.fcf-consent__acc-icon::before,
.fcf-consent__acc-icon::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 14px;
	height: 2px;
	margin: -1px 0 0 -7px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.25s ease;
}

.fcf-consent__acc-icon::after {
	transform: rotate(90deg);
}

.fcf-consent__acc-btn[aria-expanded="true"] .fcf-consent__acc-icon::after {
	transform: rotate(0deg);
}

.fcf-consent__acc-panel {
	padding: 0 20px 16px 44px;
	font-size: 0.875rem;
	animation: fcf-consent-fade 0.25s ease both;
}

@keyframes fcf-consent-fade {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.fcf-consent__cat-desc {
	margin: 0;
	line-height: 1.6;
	color: #3d4d5b;
}

.fcf-consent__cookie-list {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.fcf-consent__cookie-list li {
	display: flex;
	flex-direction: column;
	padding: 7px 0;
	border-top: 1px solid var(--fcf-c-soft);
	font-size: 0.8125rem;
	word-break: break-word;
}

.fcf-consent__cookie-list li span {
	color: #5a6a78;
}

/* Interruptor */
.fcf-consent__switch {
	appearance: none;
	flex: none;
	position: relative;
	width: 46px;
	height: 26px;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: #d3dae0;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.fcf-consent__switch::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease;
}

.fcf-consent__switch:checked {
	background: var(--fcf-c-primary);
}

.fcf-consent__switch:checked::before {
	transform: translateX(20px);
}

.fcf-consent__switch:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.fcf-consent__actions--modal {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 14px 22px 20px;
	border-top: 1px solid var(--fcf-c-soft);
}

.fcf-consent__actions--modal .fcf-consent__btn {
	min-height: 48px;
	border-radius: 999px;
}

html.fcf-consent-lock,
html.fcf-consent-lock body {
	overflow: hidden;
}

/* ---------- Conteúdo de terceiros bloqueado ---------- */
iframe.fcf-consent-blocked {
	background: var(--fcf-c-soft, #e8eef3);
}

.fcf-consent-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px;
	background: #e8eef3;
	color: #051e33;
	font-size: 0.875rem;
	text-align: center;
}

/* ---------- Tabela de cookies (políticas) ---------- */
.fcf-cookie-table-wrap {
	margin: 1.25rem 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.fcf-cookie-table {
	width: 100%;
	min-width: 860px;
	border-collapse: collapse;
	font-size: 0.875rem;
	line-height: 1.45;
}

.fcf-cookie-table th,
.fcf-cookie-table td {
	padding: 10px 12px;
	border: 1px solid #c9d6e0;
	text-align: left;
	vertical-align: top;
}

.fcf-cookie-table thead th {
	background: #123357;
	color: #fff;
	font-weight: 600;
}

.fcf-cookie-table tbody th {
	font-weight: 600;
	word-break: break-word;
}

.fcf-cookie-table tbody tr:nth-child(even) {
	background: #f6f9fb;
}

.fcf-cookie-table code {
	background: none;
	padding: 0;
	font-size: inherit;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.fcf-consent__banner {
		bottom: 10px;
		width: calc(100vw - 20px);
		flex-wrap: wrap;
		border-radius: 24px;
		padding: 14px;
		gap: 10px 12px;
	}

	.fcf-consent__banner .fcf-consent__text {
		flex-basis: calc(100% - 60px);
		font-size: 0.875rem;
	}

	.fcf-consent__banner .fcf-consent__actions {
		flex: 1 1 100%;
	}

	.fcf-consent__banner .fcf-consent__btn {
		flex: 1 1 0;
		padding: 8px 12px;
	}

	.fcf-consent__modal-body,
	.fcf-consent__actions--modal {
		padding-left: 16px;
		padding-right: 16px;
	}

	.fcf-consent__acc-list {
		margin-left: 16px;
		margin-right: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fcf-consent__banner,
	.fcf-consent__acc-panel {
		animation: none;
	}

	.fcf-consent__btn,
	.fcf-consent__switch,
	.fcf-consent__switch::before {
		transition: none;
	}
}

@media print {
	.fcf-consent {
		display: none !important;
	}
}

/* ---------- Tipografia única (Poppins, como nas páginas legais) ---------- */
.fcf-consent,
.fcf-consent *,
.fcf-consent__btn {
	font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
	letter-spacing: normal;
	text-transform: none;
}

.fcf-consent__banner {
	width: min(900px, calc(100vw - 32px));
}

.fcf-consent__banner .fcf-consent__text {
	font-size: 0.8125rem;
	line-height: 1.5;
}

/* «Saber mais» com respiração em relação ao texto */
.fcf-consent__text a {
	margin-left: 0.5em;
}

.fcf-consent__btn {
	font-size: 0.8125rem;
	font-weight: 600;
}

.fcf-consent__modal-head .fcf-consent__title {
	font-size: 0.9375rem;
}

/* Scroll do painel não "passa" para a página (Lenis ignora via data-lenis-prevent) */
.fcf-consent__overlay,
.fcf-consent__acc-list {
	overscroll-behavior: contain;
}

.fcf-consent__acc-list {
	-webkit-overflow-scrolling: touch;
}
