/* Cookie consent — first-party only.
 *
 * One card, bottom centre, the way SellAuth ships theirs: a single rounded
 * panel with the copy on the left and two neutral pills on the right. Plain
 * DOM with no framework: consent.js shows it when no choice is stored, hides
 * it on choice, and re-opens it from the footer button.
 *
 * Colour is ink on paper and inverts with body.dark. The accept button is the
 * same indigo primary the rest of the site uses; the decline button is the
 * canonical outline.
 */

.hbg-consent {
	/* Same values as hbg-ui.css: the account shell does not load that sheet,
	   and this card rides every route. */
	--hb-btn-radius: 12px;
	--hb-btn-radius-sm: 10px;
	--hb-btn-primary: #6571ff;
	--hb-btn-primary-hi: #7a85ff;
	--hb-btn-primary-lo: #515df3;
	--hb-btn-primary-ink: #ffffff;
	--hb-accent: #6571ff;
	--hb-card: #ffffff;
	--hb-ink: #16181d;
	--hb-line-strong: #d5d8e1;
	--hb-soft: #e9eaed;
	--hb-soft-2: #e1e2e6;
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 2147483000;
	width: min(680px, calc(100vw - 32px));
	transform: translate(-50%, 0);
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 18px 20px;
	border: 1px solid #e6e8ec;
	border-radius: 16px;
	background: #ffffff;
	box-shadow:
		0 24px 60px -24px rgba(16, 18, 24, 0.28),
		0 2px 8px rgba(16, 18, 24, 0.06);
	color: #16181d;
	font-family: "Proxima Nova", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 13.5px;
	line-height: 1.55;
	transition: opacity 0.24s ease, transform 0.24s ease;
}

body.dark .hbg-consent {
	--hb-card: #1a1c20;
	--hb-ink: #f2f2f2;
	--hb-line-strong: #363a43;
	--hb-soft: #202329;
	--hb-soft-2: #272a31;
	border-color: #2b2d33;
	background: #1a1c20;
	box-shadow:
		0 24px 60px -24px rgba(0, 0, 0, 0.7),
		0 2px 8px rgba(0, 0, 0, 0.4);
	color: #f2f2f2;
}

.hbg-consent[hidden] {
	display: none;
}

.hbg-consent.is-leaving {
	opacity: 0;
	transform: translate(-50%, 10px);
	pointer-events: none;
}

.hbg-consent-body {
	min-width: 0;
	flex: 1 1 auto;
}

.hbg-consent-title {
	margin: 0 0 3px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.hbg-consent-copy {
	margin: 0;
	color: #5f646d;
	font-size: 13px;
	line-height: 1.55;
}

body.dark .hbg-consent-copy {
	color: rgba(255, 255, 255, 0.62);
}

.hbg-consent-copy a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(22, 24, 29, 0.28);
}

body.dark .hbg-consent-copy a {
	text-decoration-color: rgba(255, 255, 255, 0.3);
}

.hbg-consent-copy a:hover {
	color: inherit;
	text-decoration-color: currentColor;
}

.hbg-consent-actions {
	display: flex;
	flex: none;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin: 0;
}

/* Shape from the hbg-ui button system, one step down (40px, 10px radius)
   because this sits inside a compact card. Tokens flip with body.dark. */

.hbg-consent-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--hb-line-strong);
	border-radius: var(--hb-btn-radius-sm);
	background-color: var(--hb-card);
	color: var(--hb-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(16, 18, 24, 0.04);
	transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.18s ease,
		background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, filter 0.18s ease;
}

.hbg-consent-btn:hover {
	transform: translateY(-1px);
	background-color: var(--hb-soft);
	border-color: color-mix(in srgb, var(--hb-ink) 22%, var(--hb-line-strong));
	color: var(--hb-ink);
	box-shadow: 0 2px 6px rgba(16, 18, 24, 0.06), 0 10px 20px -16px rgba(16, 18, 24, 0.4);
}

.hbg-consent-btn:active {
	transform: translateY(0);
	background-color: var(--hb-soft-2);
	box-shadow: inset 0 1px 3px rgba(16, 18, 24, 0.08);
}

.hbg-consent-btn--primary {
	border-color: transparent;
	background-color: var(--hb-btn-primary);
	background-image: linear-gradient(180deg, var(--hb-btn-primary-hi), var(--hb-btn-primary) 55%, var(--hb-btn-primary-lo));
	color: var(--hb-btn-primary-ink);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(33, 38, 120, 0.18),
		0 1px 2px rgba(16, 18, 24, 0.1), 0 8px 18px -10px rgba(101, 113, 255, 0.65);
}

.hbg-consent-btn--primary:hover {
	transform: translateY(-1px);
	background-color: var(--hb-btn-primary);
	background-image: linear-gradient(180deg, var(--hb-btn-primary-hi), var(--hb-btn-primary) 55%, var(--hb-btn-primary-lo));
	border-color: transparent;
	color: var(--hb-btn-primary-ink);
	filter: saturate(1.06) brightness(1.03);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -1px 0 rgba(33, 38, 120, 0.18),
		0 3px 6px rgba(16, 18, 24, 0.12), 0 14px 26px -12px rgba(101, 113, 255, 0.75);
}

.hbg-consent-btn--primary:active {
	transform: translateY(0);
	filter: none;
	box-shadow: inset 0 2px 6px rgba(24, 28, 90, 0.24), 0 1px 2px rgba(16, 18, 24, 0.12);
}

.hbg-consent-btn:focus-visible {
	outline: 2px solid var(--hb-accent);
	outline-offset: 2px;
}

@media (max-width: 720px) {
	.hbg-consent {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
		transform: none;
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 18px;
	}

	.hbg-consent.is-leaving {
		transform: translateY(10px);
	}

	.hbg-consent-actions {
		width: 100%;
	}

	/* Three choices on a phone: two per row, the primary keeps the second
	   row on its own so the default is never mistaken for a paired option. */
	.hbg-consent-actions .hbg-consent-btn {
		flex: 1 1 46%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hbg-consent,
	.hbg-consent.is-leaving {
		transition: none;
	}
}
