/* Elite Consent: banner, janela de preferências e botão flutuante.
   Cores vêm das variáveis --ec-* (tela de ajustes do plugin), definidas em #elite-consent-root. */

/* ---------- Banner ---------- */
.elite-consent {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 2147483000;
	max-width: 1040px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 16px 24px;
	padding: 16px 20px;
	border-radius: 12px;
	background: var(--ec-bg, #1f2933);
	color: var(--ec-text, #ffffff);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
}

.elite-consent[hidden],
.elite-consent-modal[hidden],
.elite-consent-revisit[hidden] {
	display: none !important;
}

.elite-consent__text {
	margin: 0;
	flex: 1 1 auto;
	color: inherit;
}

.elite-consent__text a {
	color: inherit;
	text-decoration: underline;
}

.elite-consent__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

/* Aceitar e Rejeitar com o mesmo peso visual (boa prática da ANPD). */
.elite-consent__btn {
	min-width: 112px;
	padding: 10px 18px;
	border-radius: 8px;
	border: 1px solid var(--ec-accept-bg, #ffffff);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.elite-consent__btn:hover {
	opacity: 0.88;
}

.elite-consent__btn--accept {
	background: var(--ec-accept-bg, #ffffff);
	color: var(--ec-accept-text, #1f2933);
}

.elite-consent__btn--reject {
	background: transparent;
	color: var(--ec-text, #ffffff);
}

.elite-consent__link {
	padding: 10px 8px;
	border: 0;
	background: transparent;
	color: var(--ec-text, #ffffff);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.elite-consent button:focus-visible {
	outline: 2px solid var(--ec-accept-bg, #ffffff);
	outline-offset: 2px;
}

/* ---------- Janela de preferências ---------- */
html.elite-consent-lock,
html.elite-consent-lock body {
	overflow: hidden;
}

.elite-consent-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(17, 24, 39, 0.55);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
}

.elite-consent-modal__dialog {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	border-radius: 14px;
	background: #ffffff;
	color: #1f2933;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
	overflow: hidden;
}

.elite-consent-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px 12px;
	border-bottom: 1px solid #e5e7eb;
}

.elite-consent-modal__title {
	margin: 0;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: #1f2933;
}

.elite-consent-modal__close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #4b5563;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.elite-consent-modal__close:hover {
	background: #f3f4f6;
}

.elite-consent-modal__body {
	padding: 14px 20px;
	overflow-y: auto;
}

.elite-consent-modal__intro {
	margin: 0 0 12px;
	color: #4b5563;
}

.elite-consent-modal__intro a {
	color: var(--ec-bg, #1f2933);
	text-decoration: underline;
}

.elite-consent-cat {
	padding: 12px 0;
	border-top: 1px solid #f0f1f3;
}

.elite-consent-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.elite-consent-cat__title {
	font-weight: 700;
	color: #1f2933;
	cursor: pointer;
}

.elite-consent-cat__always {
	font-size: 13px;
	font-weight: 600;
	color: var(--ec-bg, #1f2933);
}

.elite-consent-cat__desc {
	margin: 4px 0 0;
	font-size: 13px;
	color: #6b7280;
}

/* Interruptor liga/desliga */
.elite-consent-switch {
	position: relative;
	display: inline-flex;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
}

.elite-consent-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

.elite-consent-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #d1d5db;
	transition: background 0.15s ease;
}

.elite-consent-switch__track::after {
	content: "";
	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 ease;
}

.elite-consent-switch input:checked + .elite-consent-switch__track {
	background: var(--ec-bg, #1f2933);
}

.elite-consent-switch input:checked + .elite-consent-switch__track::after {
	transform: translateX(20px);
}

.elite-consent-switch input:focus-visible + .elite-consent-switch__track {
	outline: 2px solid var(--ec-bg, #1f2933);
	outline-offset: 2px;
}

.elite-consent-modal__footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
	padding: 14px 20px 18px;
	border-top: 1px solid #e5e7eb;
}

/* Rejeitar todos e Aceitar todos com o mesmo peso; Salvar em destaque. */
.elite-consent-modal__btn {
	padding: 10px 16px;
	border: 1px solid var(--ec-bg, #1f2933);
	border-radius: 8px;
	background: #ffffff;
	color: var(--ec-bg, #1f2933);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.elite-consent-modal__btn--primary {
	background: var(--ec-bg, #1f2933);
	color: #ffffff;
}

.elite-consent-modal__btn:hover {
	opacity: 0.88;
}

.elite-consent-modal button:focus-visible {
	outline: 2px solid var(--ec-bg, #1f2933);
	outline-offset: 2px;
}

/* ---------- Botão flutuante (opcional) ---------- */
.elite-consent-revisit {
	position: fixed;
	bottom: 18px;
	z-index: 2147482999;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--ec-bg, #1f2933);
	color: var(--ec-text, #ffffff);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	cursor: pointer;
}

.elite-consent-revisit--left {
	left: 18px;
}

.elite-consent-revisit--right {
	right: 18px;
}

/* ---------- Celular ---------- */
@media (max-width: 640px) {
	.elite-consent {
		left: 8px;
		right: 8px;
		bottom: 8px;
		flex-direction: column;
		align-items: stretch;
		padding: 14px 16px;
		font-size: 13px;
	}

	.elite-consent__actions {
		flex-wrap: wrap;
		width: 100%;
	}

	.elite-consent__btn {
		flex: 1 1 0;
		min-width: 0;
	}

	.elite-consent__link {
		order: 3;
		flex: 1 1 100%;
		padding: 4px;
	}

	.elite-consent-modal {
		align-items: flex-end;
		padding: 0;
	}

	.elite-consent-modal__dialog {
		max-width: none;
		max-height: 92vh;
		max-height: 92dvh;
		border-radius: 14px 14px 0 0;
	}

	.elite-consent-modal__footer {
		flex-direction: column-reverse;
	}

	.elite-consent-modal__btn {
		width: 100%;
	}
}
