.bm-cookie-banner {
	position: fixed;
	right: 24px;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: var(--z-cookie);
	width: min(380px, calc(100vw - 32px));
	padding: var(--space-5);
	background: var(--theme-palette-color-8);
	border: 1px solid var(--theme-palette-color-6);
	border-radius: var(--radius-card);
	box-shadow:
		0 24px 48px -24px color-mix(in srgb, var(--theme-palette-color-4) 24%, transparent),
		0 8px 20px -12px color-mix(in srgb, var(--theme-palette-color-4) 12%, transparent);
	color: var(--theme-palette-color-4);
	animation: bmCookieBannerIn 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.bm-cookie-banner__content {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.bm-cookie-banner__title {
	margin: 0;
	font-size: var(--fs-sm);
	font-weight: var(--fw-semibold);
	line-height: var(--lh-snug);
	letter-spacing: -0.005em;
	color: var(--theme-palette-color-4);
}

.bm-cookie-banner__text {
	margin: 0;
	font-size: var(--fs-xs);
	line-height: var(--lh-relaxed);
	color: var(--theme-palette-color-3);
}

.bm-cookie-banner__text a {
	color: var(--theme-palette-color-2);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
	transition: color var(--transition-fast);
}

.bm-cookie-banner__text a:hover {
	color: var(--theme-palette-color-5);
}

.bm-cookie-banner__text a:focus-visible {
	outline: var(--focus-width) solid var(--theme-palette-color-1);
	outline-offset: var(--focus-offset-tight);
	border-radius: 2px;
}

.bm-cookie-banner__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-2);
	margin-top: var(--space-1);
}

.bm-cookie-banner__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--action-size-standard);
	margin: 0;
	padding: var(--space-2) var(--space-3);
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	background: transparent;
	font-family: inherit;
	font-size: var(--fs-xs);
	font-weight: var(--fw-semibold);
	line-height: 1;
	white-space: nowrap;
	text-align: center;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition:
		background-color var(--transition-fast),
		border-color var(--transition-fast),
		color var(--transition-fast),
		transform var(--transition-fast);
}

.bm-cookie-banner__button:active {
	transform: scale(0.97);
}

.bm-cookie-banner__button:focus-visible {
	outline: var(--focus-width) solid var(--theme-palette-color-1);
	outline-offset: var(--focus-offset-tight);
}

.bm-cookie-banner__button--accept {
	background: var(--theme-palette-color-2);
	border-color: var(--theme-palette-color-2);
	color: var(--theme-palette-color-8);
}

.bm-cookie-banner__button--accept:hover {
	background: var(--theme-palette-color-5);
	border-color: var(--theme-palette-color-5);
	color: var(--theme-palette-color-8);
}

.bm-cookie-banner__button--reject {
	border-color: var(--theme-palette-color-6);
	color: var(--theme-palette-color-3);
}

.bm-cookie-banner__button--reject:hover {
	border-color: var(--theme-palette-color-3);
	color: var(--theme-palette-color-4);
}

@keyframes bmCookieBannerIn {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Full-width notice on compact phones. */
@media (max-width: 479.98px) {
	.bm-cookie-banner {
		right: 12px;
		left: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		width: auto;
		padding: var(--space-4);
	}

	.bm-cookie-banner__actions {
		gap: 6px;
	}

	.bm-cookie-banner__button {
		padding: 10px var(--space-2);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bm-cookie-banner {
		animation: none;
	}

	.bm-cookie-banner__button,
	.bm-cookie-banner__text a {
		transition: none;
	}
}
