#alem-cookie-consent[hidden],
.alem-cookie-preferences[hidden] {
	display: none !important;
}

#alem-cookie-consent {
	position: fixed;
	z-index: 100000;
	left: 50%;
	bottom: max(16px, env(safe-area-inset-bottom));
	transform: translateX(-50%);
	width: min(1080px, calc(100vw - 32px));
	box-sizing: border-box;
	padding: 20px 22px;
	border: 1px solid color-mix(in srgb, var(--alem-tinta, #111213) 18%, transparent);
	border-top: 1px solid var(--alem-rule, #c8c1b6);
	background: var(--alem-paper, #f6f3ee);
	color: var(--alem-ink, #181d21);
	box-shadow: 0 8px 28px color-mix(in srgb, var(--alem-sombra, #111213) 16%, transparent), 0 2px 6px color-mix(in srgb, var(--alem-sombra, #111213) 8%, transparent);
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr) auto;
	gap: 18px 16px;
	align-items: center;
	font: 400 14px/1.5 var(--alem-sans, Arial, sans-serif);
}

#alem-cookie-consent::before {
	content: "05";
	grid-column: 1;
	grid-row: 1;
	align-self: start;
	width: 28px;
	padding: 3px 0 7px;
	border-bottom: 1px solid var(--alem-accent, #067378);
	color: var(--alem-accent, #067378);
	font: 700 10px/1.2 var(--alem-sans, Arial, sans-serif);
	letter-spacing: .08em;
	text-align: center;
}

.alem-cookie-consent-copy {
	grid-column: 2;
	grid-row: 1;
	padding-left: 16px;
	border-left: 1px solid var(--alem-rule, #c8c1b6);
}

.alem-cookie-consent-actions { grid-column: 3; grid-row: 1; }

.alem-cookie-consent-copy > p:not(.alem-cookie-consent-kicker) {
	max-width: 760px;
	margin: 0 0 5px;
	color: var(--alem-muted, #555);
}

.alem-cookie-consent-copy > a,
.alem-cookie-footer-links > a,
.alem-cookie-footer-links > button {
	color: var(--alem-accent, #067378);
	font: 600 12px/1.4 var(--alem-sans, Arial, sans-serif);
	letter-spacing: .035em;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.alem-cookie-consent-kicker {
	margin: 0 0 5px;
	color: var(--alem-accent, #067378);
	font: 700 10px/1.3 var(--alem-sans, Arial, sans-serif);
	letter-spacing: .15em;
}

.alem-cookie-consent-actions,
.alem-cookie-preference-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
}

.alem-cookie-button {
	min-height: 42px;
	padding: 10px 13px;
	border: 1px solid currentColor;
	border-radius: 0;
	background: transparent;
	color: var(--alem-ink, #181d21);
	cursor: pointer;
	font: 700 10px/1.2 var(--alem-sans, Arial, sans-serif);
	letter-spacing: .08em;
	text-transform: uppercase;
	transition: color .18s ease, background-color .18s ease, opacity .18s ease;
}

.alem-cookie-button:hover,
.alem-cookie-button:focus-visible {
	background: var(--alem-accent-soft, #b9e0df);
	color: var(--alem-ink, #181d21);
}

.alem-cookie-button-accept {
	border-color: var(--alem-accent, #067378);
	background: var(--alem-accent, #067378);
	color: var(--alem-branco, #ffffff);
}

.alem-cookie-button-accept:hover,
.alem-cookie-button-accept:focus-visible {
	background: var(--alem-accent-hover, #05565a);
	color: var(--alem-branco, #ffffff);
}

.alem-cookie-preferences {
	grid-column: 1 / -1;
	padding-top: 14px;
	border-top: 1px solid var(--alem-rule, #c8c1b6);
}

.alem-cookie-preference-row {
	min-height: 54px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	padding: 8px 0;
	border-bottom: 1px solid var(--alem-rule, #c8c1b6);
	cursor: pointer;
}

.alem-cookie-preference-row span:first-child { display: grid; gap: 2px; }
.alem-cookie-preference-row strong { font-size: 13px; }
.alem-cookie-preference-row small { color: var(--alem-muted, #555); font-size: 12px; }
.alem-cookie-always-on { color: var(--alem-muted, #555); font-size: 11px; }
.alem-cookie-preference-row input { width: 20px; height: 20px; accent-color: var(--alem-accent, #067378); }
.alem-cookie-preference-actions { padding-top: 12px; }

.alem-cookie-footer-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	margin-top: 0;
	padding: 16px clamp(16px, 2vw, 30px) 20px;
	border-top: 1px solid var(--alem-rule, #c8c1b6);
	background: var(--alem-ink, #181d21);
}

.alem-cookie-footer-links > a,
.alem-cookie-footer-links > button {
	font: 600 11px/1.45 var(--alem-sans, Arial, sans-serif);
	letter-spacing: .075em;
	text-transform: uppercase;
	text-decoration: none;
	text-underline-offset: 4px;
	color: var(--alem-paper, #f6f3ee);
	transition: color .18s ease, opacity .18s ease;
}

.alem-cookie-footer-links > a:hover,
.alem-cookie-footer-links > button:hover,
.alem-cookie-footer-links > a:focus-visible,
.alem-cookie-footer-links > button:focus-visible {
	color: var(--alem-accent-on-dark, #36aeb0);
	text-decoration: underline;
}

.alem-cookie-footer-links > button {
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.alem-footer .alem-footer-brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font: 600 58px/.85 var(--alem-display, Georgia, serif);
	letter-spacing: -.055em;
}

.alem-footer-eclipse {
	display: block;
	width: 44px;
	height: 44px;
	object-fit: contain;
	opacity: .88;
	filter: brightness(0) invert(.92);
}

.alem-cookie-embed {
	position: relative;
	width: 100%;
	min-height: 220px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--alem-ink, #181d21);
	color: var(--alem-paper, #f6f3ee);
}

.alem-cookie-embed-message {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 10px;
	padding: clamp(18px, 4vw, 44px);
	box-sizing: border-box;
	background: radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--alem-verde, #067378) 30%, transparent), transparent 62%), var(--alem-ink, #181d21);
	color: var(--alem-paper, #f6f3ee);
}

.alem-cookie-embed-message strong { font: 600 clamp(18px, 2vw, 24px)/1.15 var(--alem-display, Georgia, serif); }
.alem-cookie-embed-message p { max-width: 560px; margin: 0; color: color-mix(in srgb, var(--alem-texto-tela, #f6f3ee) 82%, transparent); font: 400 13px/1.5 var(--alem-sans, Arial, sans-serif); }
.alem-cookie-embed-message button { padding: 11px 14px; border: 1px solid var(--alem-accent, #067378); background: var(--alem-accent, #067378); color: var(--alem-branco, #ffffff); cursor: pointer; font: 700 10px/1.2 var(--alem-sans, Arial, sans-serif); letter-spacing: .08em; text-transform: uppercase; }
.alem-cookie-embed-message button:hover,
.alem-cookie-embed-message button:focus-visible { background: var(--alem-accent-hover, #05565a); }
.alem-cookie-embed-message a { color: var(--alem-paper, #f6f3ee); font: 500 12px/1.4 var(--alem-sans, Arial, sans-serif); text-underline-offset: 3px; }
.alem-cookie-embed.is-loaded { min-height: 0; }
.alem-cookie-embed iframe { display: block; width: 100%; height: 100%; min-height: 220px; border: 0; }
.alem-core-video-media > .alem-cookie-embed { position: absolute; inset: 0; height: 100%; min-height: 0; }
.alem-core-video-media > .alem-cookie-embed iframe { min-height: 0; }

@media (max-width: 760px) {
	.alem-cookie-footer-links { gap: 10px 20px; padding: 14px 16px max(18px, env(safe-area-inset-bottom)); }
	.alem-cookie-footer-links > a,
	.alem-cookie-footer-links > button { font-size: 10px; }
	.alem-cookie-preference-row { gap: 12px; }
	.alem-cookie-preference-row small { max-width: 290px; }
	.alem-cookie-embed { min-height: 190px; }
	.alem-cookie-embed iframe { min-height: 190px; }
}

/* Full-bleed cyan opening and adaptive fixed masthead on the support page. */
body.alem-support-page .alem-support-page-main {
	--alem-support-top-overlap: 128px;
	padding-top: 24px;
}

body.alem-support-page .alem-support-hero {
	width: auto;
	margin-top: calc(-1 * var(--alem-support-top-overlap));
	margin-right: calc((min(1320px, calc(100vw - 48px)) - 100vw) / 2);
	margin-left: calc((min(1320px, calc(100vw - 48px)) - 100vw) / 2);
	padding-top: calc(clamp(44px, 7vw, 96px) + var(--alem-support-top-overlap));
	margin-bottom: 56px;
}

/* Numbered folios and soft paper shadows unify support tiers with editorial cards. */
body.alem-support-page .alem-support-tier-grid { counter-reset: alem-support-tier; }
body.alem-support-page .alem-support-method-grid { counter-reset: alem-support-method; }

body.alem-support-page .alem-support-methods--dark .alem-support-method-grid article {
	position: relative;
	counter-increment: alem-support-method;
	border: 1px solid color-mix(in srgb, var(--alem-texto-tela, #f6f3ee) 24%, transparent);
	padding-top: 58px;
	box-shadow: 0 3px 12px color-mix(in srgb, var(--alem-preto, #000000) 22%, transparent);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.alem-support-page .alem-support-methods--dark .alem-support-method-grid article::before {
	content: counter(alem-support-method, decimal-leading-zero);
	position: absolute;
	top: 18px;
	left: 32px;
	min-width: 26px;
	padding: 3px 4px 5px;
	border-bottom: 1px solid var(--alem-tela-8ccfd0, #8ccfd0);
	color: var(--alem-tela-8ccfd0, #8ccfd0);
	font: 700 10px/1.2 var(--alem-sans, Arial, sans-serif);
	letter-spacing: .08em;
	text-align: center;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	body.alem-support-page .alem-support-methods--dark .alem-support-method-grid article:hover,
	body.alem-support-page .alem-support-methods--dark .alem-support-method-grid article:focus-within {
		border-color: color-mix(in srgb, var(--alem-tela-8ccfd0, #8ccfd0) 58%, transparent);
		box-shadow: 0 8px 22px color-mix(in srgb, var(--alem-preto, #000000) 30%, transparent);
		transform: translateY(-2px);
	}
}

body.alem-support-page .alem-support-tier {
	position: relative;
	counter-increment: alem-support-tier;
	border: 1px solid color-mix(in srgb, var(--alem-rule, #b8afa1) 68%, transparent);
	padding: 58px 24px 24px;
	box-shadow: 0 2px 8px color-mix(in srgb, var(--alem-sombra, #111213) 9%, transparent), 0 1px 2px color-mix(in srgb, var(--alem-sombra, #111213) 5%, transparent);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.alem-support-page .alem-support-tier::before {
	content: counter(alem-support-tier, decimal-leading-zero);
	position: absolute;
	top: 18px;
	left: 24px;
	min-width: 26px;
	padding: 3px 4px 5px;
	border-bottom: 1px solid var(--alem-accent, #067378);
	color: var(--alem-accent, #067378);
	font: 700 10px/1.2 var(--alem-sans, Arial, sans-serif);
	letter-spacing: .08em;
	text-align: center;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	body.alem-support-page .alem-support-tier:hover,
	body.alem-support-page .alem-support-tier:focus-within {
		border-color: color-mix(in srgb, var(--alem-verde, #067378) 42%, transparent);
		box-shadow: 0 8px 22px color-mix(in srgb, var(--alem-sombra, #111213) 14%, transparent), 0 2px 5px color-mix(in srgb, var(--alem-sombra, #111213) 7%, transparent);
		transform: translateY(-2px);
	}
}

body.alem-support-page .alem-support-hero .alem-support-cta {
	min-height: 54px;
	align-items: center;
	box-shadow: 0 0 0 transparent;
	transform: translateY(0);
	transition: transform .22s cubic-bezier(.2,.7,.25,1), box-shadow .22s ease, background-color .22s ease;
}

body.alem-support-page .alem-support-hero .alem-support-cta:hover,
body.alem-support-page .alem-support-hero .alem-support-cta:focus-visible {
	background-color: var(--alem-branco, #ffffff);
	box-shadow: 0 9px 24px color-mix(in srgb, var(--alem-preto, #000000) 20%, transparent);
	transform: translateY(-3px);
}

body.alem-support-page .alem-support-hero .alem-support-cta:active {
	box-shadow: 0 3px 10px color-mix(in srgb, var(--alem-preto, #000000) 16%, transparent);
	transform: translateY(-1px) scale(.985);
}

body.alem-support-page .alem-site-header {
	transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

body.alem-support-page.alem-support-hero-active .alem-site-header {
	background: var(--alem-accent, #067378) !important;
	color: var(--alem-paper, #f6f3ee) !important;
	border-bottom-color: transparent !important;
}

body.alem-support-page.alem-support-methods-active .alem-site-header {
	background: var(--alem-ink, #111213) !important;
	color: var(--alem-paper, #f6f3ee) !important;
	border-bottom-color: color-mix(in srgb, var(--alem-texto-tela, #f6f3ee) 18%, transparent) !important;
}

body.alem-support-page:is(.alem-support-hero-active, .alem-support-methods-active) .alem-site-header :is(.alem-primary-nav, .alem-menu-toggle, .alem-brand-lockup, .alem-topline-actions, .alem-header-socials),
body.alem-support-page:is(.alem-support-hero-active, .alem-support-methods-active) .alem-site-header :is(.alem-primary-nav a, .alem-menu-toggle, .alem-topline-actions a, .alem-header-socials a) {
	color: var(--alem-paper, #f6f3ee) !important;
}

body.alem-support-page:is(.alem-support-hero-active, .alem-support-methods-active) .alem-site-header .alem-brand-logo {
	background-image: url("/wp-content/themes/alem-editorial/assets/images/alem-logo-light-v7.png") !important;
}

body.alem-support-page:is(.alem-support-hero-active, .alem-support-methods-active) .alem-site-header .alem-brand-logo-dark,
body.alem-support-page:is(.alem-support-hero-active, .alem-support-methods-active) .alem-site-header .alem-header-socials .alem-social-icon-dark {
	display: none !important;
}

body.alem-support-page:is(.alem-support-hero-active, .alem-support-methods-active) .alem-site-header .alem-brand-logo-light,
body.alem-support-page:is(.alem-support-hero-active, .alem-support-methods-active) .alem-site-header .alem-header-socials .alem-social-icon-light {
	display: block !important;
}

body.alem-support-page:is(.alem-support-hero-active, .alem-support-methods-active) .alem-site-header .alem-topline-actions a:hover,
body.alem-support-page:is(.alem-support-hero-active, .alem-support-methods-active) .alem-site-header .alem-topline-actions a:focus-visible {
	color: var(--alem-ink, #111213) !important;
	background-color: var(--alem-paper, #f6f3ee) !important;
}

body :is(a, button, summary, [role="button"]):active {
	opacity: .46 !important;
	filter: brightness(1.12);
	transition: opacity .09s ease, filter .09s ease, transform .09s ease;
}

body :is(button, [role="button"]):active {
	transform: translateY(1px) scale(.985);
}

@media (max-width: 780px) {
	body.alem-support-page .alem-support-page-main {
		--alem-support-top-overlap: 130px;
		padding-top: 16px;
	}
	body.alem-support-page .alem-support-hero {
		padding-top: calc(38px + var(--alem-support-top-overlap));
		margin-bottom: 32px;
	}
	body.alem-support-page .alem-support-tier { padding: 54px 24px 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.alem-cookie-button,
	body.alem-support-page .alem-support-hero .alem-support-cta,
	body.alem-support-page .alem-site-header,
	body :is(a, button, summary, [role="button"]) { transition: none !important; }
}

/* Consent panel — compacto, sólido, no ritmo da home (forma 22/6, botões em pílula). */
#alem-cookie-consent {
	left: 50%;
	bottom: max(16px, env(safe-area-inset-bottom));
	width: min(720px, calc(100vw - 24px));
	max-height: min(82vh, calc(100dvh - 32px));
	overflow-y: auto;
	padding: 14px 16px;
	border: 1px solid color-mix(in srgb, var(--alem-ink, #181d21) 14%, transparent);
	border-radius: 22px 6px 6px 6px;
	background: var(--alem-paper, #f6f3ee);
	box-shadow: 0 10px 32px color-mix(in srgb, var(--alem-sombra, #111213) 18%, transparent), 0 2px 6px color-mix(in srgb, var(--alem-sombra, #111213) 8%, transparent);
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px 18px;
	align-items: center;
}

#alem-cookie-consent::before { display: none; }
.alem-cookie-consent-copy { grid-column: 1; grid-row: 1; padding-left: 0; border-left: 0; }
.alem-cookie-consent-copy > p { max-width: 460px; margin: 0; font-size: 13px; line-height: 1.45; }
.alem-cookie-consent-copy > p a { display: inline; color: var(--alem-accent, #067378); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.alem-cookie-consent-copy > p a:hover,
.alem-cookie-consent-copy > p a:focus-visible { color: var(--alem-accent-hover, #05565a); }
.alem-cookie-consent-actions { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 8px; }
.alem-cookie-button { min-height: 40px; padding: 9px 16px; border-radius: 999px; transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.alem-cookie-button:hover,.alem-cookie-button:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--alem-accent, #067378) 15%, transparent); }
.alem-cookie-button-quiet { border-color: color-mix(in srgb, var(--alem-ink, #181d21) 24%, transparent); background: transparent; }
.alem-cookie-button-quiet:hover,.alem-cookie-button-quiet:focus-visible { border-color: var(--alem-accent, #067378); background: color-mix(in srgb, var(--alem-accent, #067378) 10%, transparent); }
.alem-cookie-button-accept { border-color: var(--alem-ink, #181d21); background: var(--alem-ink, #181d21); color: var(--alem-paper, #f6f3ee); }
.alem-cookie-button-accept:hover,.alem-cookie-button-accept:focus-visible { border-color: var(--alem-accent-hover, #05565a); background: var(--alem-accent-hover, #05565a); color: var(--alem-branco, #ffffff); }
.alem-cookie-preferences { grid-column: 1 / -1; padding-top: 14px; border-top-color: color-mix(in srgb, var(--alem-accent, #067378) 22%, var(--alem-rule, #c8c1b6)); }
.alem-cookie-preference-row { border-bottom-color: color-mix(in srgb, var(--alem-rule, #c8c1b6) 72%, transparent); }
.alem-cookie-preference-row input { accent-color: var(--alem-accent, #067378); }
.alem-cookie-preference-actions { gap: 9px; padding-top: 14px; }

@media (max-width: 640px) {
	#alem-cookie-consent {
		bottom: max(10px, env(safe-area-inset-bottom));
		width: calc(100vw - 20px);
		max-height: min(84vh, calc(100dvh - 20px));
		padding: 12px;
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}
	.alem-cookie-consent-copy > p { max-width: none; font-size: 12.5px; }
	.alem-cookie-consent-actions { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 6px; }
	.alem-cookie-consent-actions [data-alem-cookie-accept] { grid-column: auto; grid-row: auto; }
	.alem-cookie-consent-actions .alem-cookie-button { width: 100%; min-height: 40px; padding: 8px 4px; font-size: 9.5px; letter-spacing: .05em; }
	.alem-cookie-preferences { grid-column: 1; }
	.alem-cookie-preference-actions { display: grid; grid-template-columns: 1fr 1.4fr; }
}

/* Rodapé: links de privacidade na mesma linha do copyright (desktop) e sem divisória própria. */
.alem-footer { position: relative; }
.alem-cookie-footer-links { padding: 0 clamp(16px, 2vw, 30px) 22px; border-top: 0; background: transparent; }
/* O rodapé é de papel: os links seguem a tinta (antes eram papel sobre papel e o botão "Privacidade" ficava invisível). */
.alem-cookie-footer-links > a, .alem-cookie-footer-links > button { color: var(--alem-tinta, #111213); }
.alem-cookie-footer-links > a:is(:hover, :focus-visible), .alem-cookie-footer-links > button:is(:hover, :focus-visible) { color: var(--alem-verde, #067378); }
@media (min-width: 821px) {
	.alem-cookie-footer-links { position: absolute; right: 0; bottom: 0; flex-wrap: nowrap; padding: 0 24px 24px 0; }
}

/* Rodapé: os dois links ("Política de cookies" e "Privacidade") têm sempre o mesmo tamanho e jeito.
   Antes, a regra geral do rodapé do tema (.alem-footer a) vencia no link e não no botão. */
html body .alem-footer .alem-cookie-footer-links > a,
html body .alem-footer .alem-cookie-footer-links > button { font: 600 11px/1.45 var(--alem-f-interface, "Source Sans 3", sans-serif); letter-spacing: .075em; text-transform: uppercase; text-decoration: none; }
@media (max-width: 760px) {
	html body .alem-footer .alem-cookie-footer-links > a,
	html body .alem-footer .alem-cookie-footer-links > button { font-size: 10px; }
}
