/* First-visit cookie banner. Hidden until consent is missing. */

.he-cookie {
	position: fixed;
	z-index: 100000;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	max-width: 100%;
	padding-bottom: env(safe-area-inset-bottom);
	pointer-events: auto;
}

html.he-cookie-chosen #he-cookie-banner {
	display: none !important;
}

.he-cookie[hidden] {
	display: none !important;
}

.he-cookie__panel {
	max-height: none;
	overflow: visible;
	background: var(--color-hilaire-ivory);
	border-top: 1px solid var(--color-border-strong);
	box-shadow: 0 -8px 24px rgba(10, 27, 42, 0.08);
	color: var(--color-text);
}

.he-cookie__panel:focus {
	outline: none;
}

.he-cookie__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.65rem 1.5rem;
	align-items: center;
	width: min(var(--container-max), calc(100% - (var(--container-gutter) * 2)));
	margin-inline: auto;
	padding-block: 0.7rem 0.75rem;
}

.he-cookie__eyebrow {
	margin: 0 0 0.2rem;
	color: var(--color-hilaire-navy);
	font-family: var(--font-body);
	font-size: 0.64rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.he-cookie__text {
	max-width: 70ch;
	margin: 0;
	color: var(--color-text-soft);
	font-size: 0.8rem;
	line-height: 1.4;
}

.he-cookie__policy {
	display: inline-block;
	margin-top: 0.28rem;
	color: var(--color-hilaire-navy);
	font-size: 0.74rem;
	text-decoration: underline;
	text-underline-offset: 0.16em;
}

.he-cookie__policy:hover,
.he-cookie__policy:focus-visible {
	color: var(--color-hilaire-navy-deep);
}

.he-cookie__actions {
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.4rem;
	width: auto;
	max-width: 100%;
	justify-self: end;
}

.he-cookie__prefs-actions {
	display: flex;
	justify-self: start;
}

.he-cookie button.he-cookie__btn {
	position: relative;
	z-index: 1;
	width: auto;
	flex: 0 0 auto;
	justify-content: center;
	cursor: pointer;
	pointer-events: auto;
	touch-action: manipulation;
	min-height: 34px;
	padding: 0.4rem 0.72rem;
	border: 1px solid var(--color-hilaire-navy);
	border-radius: var(--radius-sm);
	background: var(--color-hilaire-navy);
	color: #fff;
	font-size: 0.66rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.15;
	text-transform: uppercase;
	white-space: nowrap;
}

.he-cookie button.he-cookie__btn:hover,
.he-cookie button.he-cookie__btn:focus-visible {
	background: var(--color-hilaire-navy-mid);
	transform: translateY(-1px);
}

.he-cookie button.he-cookie__btn--text {
	background: transparent;
	color: var(--color-hilaire-navy);
	text-decoration: none;
}

.he-cookie button.he-cookie__btn--text:hover,
.he-cookie button.he-cookie__btn--text:focus-visible {
	background: transparent;
	color: var(--color-hilaire-navy-deep);
	transform: none;
}

.he-cookie__prefs {
	grid-column: 1 / -1;
	display: grid;
	gap: 0.85rem;
	margin-top: 0.15rem;
	padding-top: 1rem;
	border-top: 1px solid var(--color-border);
}

.he-cookie__prefs[hidden] {
	display: none !important;
}

.he-cookie__choice {
	display: flex;
	gap: 1.5rem;
	align-items: center;
	justify-content: flex-start;
	width: min(100%, 46rem);
}

.he-cookie__choice-copy {
	display: grid;
	gap: 0.2rem;
	min-width: 0;
}

.he-cookie__choice-title {
	color: var(--color-hilaire-navy);
	font-size: 0.92rem;
	font-weight: 600;
}

.he-cookie__choice-text {
	color: var(--color-text-soft);
	font-size: 0.84rem;
	line-height: 1.45;
}

.he-cookie__always,
.he-cookie__switch {
	flex: 0 0 auto;
	margin-left: auto;
}

.he-cookie__always {
	padding: 0.35rem 0.55rem;
	border: 1px solid var(--color-border-strong);
	color: var(--color-hilaire-navy-soft);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.he-cookie__switch {
	position: relative;
	flex: 0 0 auto;
	width: 44px;
	height: 26px;
}

.he-cookie__switch input {
	position: absolute;
	inset: 0;
	z-index: 1;
	margin: 0;
	cursor: pointer;
	opacity: 0;
}

.he-cookie__switch-ui {
	display: block;
	width: 44px;
	height: 26px;
	border-radius: 999px;
	background: #d4cdc3;
	position: relative;
	transition: background-color var(--duration-fast) var(--easing-luxury);
}

.he-cookie__switch-ui::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform var(--duration-fast) var(--easing-luxury);
}

.he-cookie__switch input:checked + .he-cookie__switch-ui {
	background: var(--color-hilaire-navy);
}

.he-cookie__switch input:checked + .he-cookie__switch-ui::after {
	transform: translateX(18px);
}

.he-cookie__switch input:focus-visible + .he-cookie__switch-ui {
	outline: 2px solid var(--color-hilaire-navy);
	outline-offset: 3px;
}

.site-footer button.footer-cookie-settings {
	display: inline;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: rgba(250, 248, 245, 0.9);
	font-size: 0.88rem;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.35;
	text-align: left;
	text-transform: none;
}

.site-footer .footer-links button.footer-cookie-settings {
	display: inline-block;
}

.site-footer .footer-bottom-strip button.footer-cookie-settings {
	color: rgba(250, 248, 245, 0.65);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
}

.site-footer .footer-bottom-strip button.footer-cookie-settings::before {
	content: "·";
	display: inline-block;
	margin-right: 0.65rem;
	text-decoration: none;
}

.site-footer button.footer-cookie-settings:hover,
.site-footer button.footer-cookie-settings:focus-visible {
	background: transparent;
	color: #fff;
	transform: translateX(2px);
}

.footer-bottom-strip__row--copy {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: center;
	justify-content: center;
}

.he-cookie__prefs-actions {
	justify-self: start;
}

@media (max-width: 1600px) {
	.he-cookie__inner {
		grid-template-columns: 1fr;
		align-items: stretch;
		gap: 0.7rem;
		padding-block: 0.85rem 0.95rem;
	}

	.he-cookie__actions {
		justify-content: flex-start;
	}
}

@media (max-height: 700px) {
	.he-cookie__panel {
		max-height: 60vh;
		overflow-y: auto;
	}
}

@media (max-width: 420px) {
	.he-cookie__actions {
		flex-wrap: wrap;
	}

	.he-cookie button.he-cookie__btn {
		padding: 0.38rem 0.55rem;
		font-size: 0.62rem;
		letter-spacing: 0.06em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.he-cookie button.he-cookie__btn:hover,
	.he-cookie button.he-cookie__btn:focus-visible,
	.site-footer button.footer-cookie-settings:hover,
	.site-footer button.footer-cookie-settings:focus-visible {
		transform: none;
	}

	.he-cookie__switch-ui,
	.he-cookie__switch-ui::after {
		transition: none;
	}
}
