/* ==========================================================================
   Juice at Home — Header, Accessibility & Third-Party Widget Harmony
   ========================================================================== */

/* Sticky minimalist header with subtle translucency */
.jah-site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.admin-bar .jah-site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .jah-site-header {
		top: 46px;
	}
}

.jah-announcement-bar a {
	color: var(--wp--preset--color--accent-light);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.jah-site-footer a {
	color: inherit;
	transition: opacity 0.2s ease;
}

.jah-site-footer a:hover {
	opacity: 0.72;
}

/* WCAG 2.1 AA Focus Visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* ==========================================================================
   Complianz GDPR Banner & Borvo Agent Non-Collision Rules
   Ensures consent buttons ("Recusar", "Ver preferências") are never covered
   by the floating Borvo Agent launcher on desktop or mobile.
   ========================================================================== */

.cmplz-cookiebanner {
	z-index: 99999 !important;
}

/* Keep Borvo Agent launcher cleanly below cookie banner z-index and well-spaced */
#borvo-agent-root,
.borvo-agent-widget,
[class*="borvo-agent"] {
	z-index: 9000;
}

/* When Complianz cookie banner is open on mobile, lift Borvo launcher out of the way */
@media (max-width: 768px) {
	body:has(.cmplz-cookiebanner.cmplz-show) #borvo-agent-root,
	body:has(.cmplz-cookiebanner.cmplz-show) .borvo-agent-widget {
		bottom: 1.25rem;
		left: 1rem;
		right: auto;
	}
}
