/**
 * Halo Consent Gate — self-contained, theme-agnostic styles.
 * All colors are self-supplied so contrast never depends on the theme.
 * Palette: #171A1F (bg) / #FFFFFF (text) / #FFC84A (focus ring).
 */

.hcg-banner {
	position: fixed;
	inset-block-end: 0;
	inset-inline: 0;
	z-index: 99999;
	background: #171a1f;
	color: #ffffff;
	font-size: 1rem;
	line-height: 1.5;
	padding: 1rem;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.35);
	/* Never exceed the viewport, even at 400% zoom — scroll inside instead. */
	max-height: 100dvh;
	overflow-y: auto;
}

.hcg-banner__inner {
	max-width: 64rem;
	margin-inline: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
}

.hcg-banner__text {
	margin: 0;
	flex: 1 1 20rem;
	color: #ffffff;
}

.hcg-banner__heading {
	color: #ffffff;
}

.hcg-banner__policy {
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hcg-banner__policy:hover {
	text-decoration-thickness: 2px;
}

.hcg-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* Accept and Decline are IDENTICAL — equal prominence, no dark patterns. */
.hcg-btn {
	appearance: none;
	background: transparent;
	border: 2px solid #ffffff;
	border-radius: 4px;
	color: #ffffff;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	min-height: 44px;
	min-width: 44px;
	padding: 0.6em 1.2em;
}

.hcg-btn:hover {
	background: #ffffff;
	color: #171a1f;
}

/* Visible focus indicator that survives theme resets (WCAG 2.4.7). */
.hcg-banner .hcg-btn:focus-visible,
.hcg-banner a:focus-visible,
.hcg-dialog .hcg-btn:focus-visible,
.hcg-dialog input:focus-visible,
.hcg-choices__link:focus-visible {
	outline: 3px solid #ffc84a;
	outline-offset: 2px;
}

/* Fallback for browsers without :focus-visible. */
.hcg-banner .hcg-btn:focus,
.hcg-choices__link:focus {
	outline: 3px solid #ffc84a;
	outline-offset: 2px;
}

/* Preferences dialog (only rendered when a site has >1 category). */
.hcg-dialog {
	background: #171a1f;
	color: #ffffff;
	border: 2px solid #ffffff;
	border-radius: 6px;
	padding: 1.5rem;
	max-width: 28rem;
	font-size: 1rem;
	line-height: 1.5;
}

.hcg-dialog::backdrop {
	background: rgba(0, 0, 0, 0.6);
}

.hcg-dialog__title {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	color: #ffffff;
}

.hcg-dialog__row {
	margin-block-end: 0.75rem;
}

.hcg-dialog__label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: #ffffff;
	cursor: pointer;
}

.hcg-dialog__check {
	width: 24px;
	height: 24px;
	accent-color: #ffc84a;
}

.hcg-dialog__actions {
	display: flex;
	gap: 0.75rem;
	margin-block-start: 1rem;
}

/* Footer "Privacy Choices" reopen control: in normal document flow (never
   fixed, never obscures anything), self-contained colors. */
.hcg-choices {
	text-align: center;
	padding: 0.75rem 1rem;
}

.hcg-choices__link {
	appearance: none;
	background: #171a1f;
	border: 2px solid #171a1f;
	border-radius: 4px;
	color: #ffffff;
	cursor: pointer;
	font: inherit;
	font-size: 0.9375rem;
	min-height: 44px;
	padding: 0.5em 1em;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hcg-choices__link:hover {
	background: #ffffff;
	color: #171a1f;
	border-color: #171a1f;
}

/* Screen-reader-only status node. */
.hcg-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Stack cleanly on narrow viewports / 400% zoom (WCAG 1.4.10 Reflow). */
@media (max-width: 40em) {
	.hcg-banner__inner {
		flex-direction: column;
		align-items: stretch;
	}

	.hcg-banner__actions {
		flex-direction: column;
	}

	.hcg-btn {
		width: 100%;
	}
}

/* No non-essential motion; and none at all for reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
	.hcg-banner,
	.hcg-dialog,
	.hcg-btn,
	.hcg-choices__link {
		transition: none !important;
		animation: none !important;
	}
}
