/**
 * Bonnot Consent — Stylesheet matching thebonnotco.com
 *
 * Uses the site's own "Berthold" font (already loaded on the page),
 * primary dark blue (#022d47), copper focus accent (#db801a), light grey
 * borders (#d9d9d9), and square-cornered buttons. Zero remote assets.
 */

.bonnot-consent-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.bonnot-consent-banner,
.bonnot-consent-banner *,
.bonnot-consent-banner *::before,
.bonnot-consent-banner *::after,
.bonnot-consent-backdrop,
.bonnot-consent-backdrop *,
.bonnot-consent-backdrop *::before,
.bonnot-consent-backdrop *::after,
.bonnot-consent-footer,
.bonnot-consent-footer * {
	box-sizing: border-box;
	font-family: "Berthold", sans-serif;
}

.bonnot-consent-banner[hidden],
.bonnot-consent-backdrop[hidden],
.bonnot-consent-footer[hidden] {
	display: none !important;
}

/* First-layer banner: fixed position so the page never shifts */
.bonnot-consent-banner {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 2147483000;
	width: calc(100% - 2.5rem);
	max-width: 26rem;
	background-color: #ffffff;
	color: #022d47;
	border: 1px solid #d9d9d9;
	border-top: 3px solid #022d47;
	border-radius: 0;
	box-shadow: 0 12px 32px rgba(2, 45, 71, 0.18);
	padding: 1.25rem;
}

.bonnot-consent-banner:focus {
	outline: none;
}

.bonnot-consent-banner:focus-visible {
	outline: 2px solid #db801a;
	outline-offset: 2px;
}

.bonnot-consent-banner__title,
.bonnot-consent-modal__title {
	margin: 0 0 0.625rem 0;
	font-size: 1.25rem;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #022d47;
}

.bonnot-consent-banner__text,
.bonnot-consent-modal__intro {
	margin: 0 0 1rem 0;
	font-size: 0.9375rem;
	line-height: 1.45;
	font-weight: 400;
	color: #022d47;
}

.bonnot-consent-link {
	color: #022d47;
	text-decoration: underline;
	text-decoration-color: #db801a;
	text-underline-offset: 2px;
	font-weight: 400;
}

.bonnot-consent-link:hover {
	text-decoration-color: #022d47;
}

.bonnot-consent-link:focus-visible {
	outline: 2px solid #db801a;
	outline-offset: 2px;
}

/* Equal-width grid for Accept all and Reject all */
.bonnot-consent-banner__actions,
.bonnot-consent-modal__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}

/* Square-cornered buttons matching thebonnotco.com */
.bonnot-consent-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.6875rem 0.875rem;
	border-radius: 0;
	border: 1px solid #022d47;
	font-size: 0.875rem;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.bonnot-consent-btn--full {
	grid-column: 1 / -1;
}

.bonnot-consent-btn--primary {
	background-color: #022d47;
	color: #ffffff;
	border-color: #022d47;
}

.bonnot-consent-btn--primary:hover {
	background-color: #ffffff;
	color: #022d47;
}

.bonnot-consent-btn--secondary {
	background-color: #ffffff;
	color: #022d47;
	border-color: #022d47;
}

.bonnot-consent-btn--secondary:hover {
	background-color: #f2f4f6;
	color: #022d47;
}

.bonnot-consent-btn:focus-visible {
	outline: 2px solid #db801a;
	outline-offset: 2px;
}

/* Choices panel modal */
.bonnot-consent-backdrop {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem;
	background-color: rgba(2, 45, 71, 0.55);
}

.bonnot-consent-modal {
	width: 100%;
	max-width: 33rem;
	max-height: calc(100vh - 1.5rem);
	max-height: calc(100dvh - 1.5rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	background-color: #ffffff;
	color: #022d47;
	border: 1px solid #d9d9d9;
	border-top: 3px solid #022d47;
	border-radius: 0;
	box-shadow: 0 16px 40px rgba(2, 45, 71, 0.25);
	padding: 1.25rem;
}

.bonnot-consent-modal:focus {
	outline: none;
}

.bonnot-consent-modal:focus-visible {
	outline: 2px solid #db801a;
	outline-offset: 2px;
}

.bonnot-consent-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.625rem;
}

.bonnot-consent-modal__header .bonnot-consent-modal__title {
	margin: 0;
}

.bonnot-consent-modal__close {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 1px solid #d9d9d9;
	border-radius: 0;
	background-color: #ffffff;
	color: #022d47;
	font-size: 1.5rem;
	line-height: 1;
	font-weight: 400;
	cursor: pointer;
	transition: background-color 150ms ease, border-color 150ms ease;
}

.bonnot-consent-modal__close:hover {
	background-color: #f2f4f6;
	border-color: #022d47;
}

.bonnot-consent-modal__close:focus-visible {
	outline: 2px solid #db801a;
	outline-offset: 2px;
}

/* Category list */
.bonnot-consent-categories {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0 0 1.25rem 0;
}

.bonnot-consent-category {
	padding: 0.875rem;
	border: 1px solid #d9d9d9;
	background-color: #f7f7f7;
}

.bonnot-consent-category__row {
	display: flex;
	align-items: center;
	gap: 0.625rem;
}

.bonnot-consent-checkbox {
	position: relative;
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	border: 2px solid #022d47;
	border-radius: 0;
	background-color: #ffffff;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.bonnot-consent-checkbox:checked {
	background-color: #022d47;
	border-color: #022d47;
}

.bonnot-consent-checkbox:checked::after {
	content: "";
	position: absolute;
	left: 0.3125rem;
	top: 0.0625rem;
	width: 0.375rem;
	height: 0.6875rem;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.bonnot-consent-checkbox:disabled {
	opacity: 0.72;
	cursor: not-allowed;
}

.bonnot-consent-checkbox:focus-visible {
	outline: 2px solid #db801a;
	outline-offset: 2px;
}

.bonnot-consent-category__label {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	color: #022d47;
}

.bonnot-consent-checkbox:disabled + .bonnot-consent-category__label {
	cursor: default;
}

.bonnot-consent-category__name {
	font-size: 1rem;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.bonnot-consent-category__badge {
	display: inline-block;
	padding: 0.125rem 0.375rem;
	border: 1px solid #022d47;
	font-size: 0.75rem;
	line-height: 1.1;
	font-weight: 400;
	color: #022d47;
	background-color: #ffffff;
}

.bonnot-consent-category__desc {
	margin: 0.5rem 0 0 1.875rem;
	font-size: 0.875rem;
	line-height: 1.4;
	font-weight: 400;
	color: #022d47;
}

/* Automatic footer reopen bar (matches thebonnotco.com dark footer) */
.bonnot-consent-footer {
	background-color: #022d47;
	color: #ffffff;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.bonnot-consent-footer__inner {
	width: 100%;
	max-width: 90rem;
	margin: 0 auto;
	padding: 0.75rem 1rem;
	display: flex;
	justify-content: flex-start;
}

.bonnot-consent-footer__btn {
	padding: 0.25rem 0;
	border: 0;
	background: transparent;
	color: #ffffff;
	font-size: 0.875rem;
	line-height: 1.25;
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.bonnot-consent-footer__btn:hover {
	opacity: 0.8;
}

.bonnot-consent-footer__btn:focus-visible {
	outline: 2px solid #db801a;
	outline-offset: 3px;
}

/* Responsive adjustments down to 360px and up to desktop */
@media (max-width: 540px) {
	.bonnot-consent-banner {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
		padding: 1rem;
	}

	.bonnot-consent-category__desc {
		margin-left: 0;
	}
}

@media (min-width: 541px) {
	.bonnot-consent-modal {
		padding: 1.5rem;
	}
}

@media (min-width: 768px) {
	.bonnot-consent-footer__inner {
		padding: 0.75rem 2rem;
		justify-content: flex-end;
	}

	.bonnot-consent-footer__btn {
		font-size: 1rem;
	}
}

@media (min-width: 1024px) {
	.bonnot-consent-footer__inner {
		padding: 0.75rem 3rem;
	}
}
