/* Complianz stays inside the Room in Valencia palette and contrast targets. */
body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner {
	--cmplz_banner_background_color: #ffffff;
	--cmplz_banner_border_color: #d9d9d9;
	--cmplz_banner_border_width: 1px;
	--cmplz_banner_border_radius: 0;
	--cmplz_text_color: #1c1c1c;
	--cmplz_hyperlink_color: #b3400a;
	--cmplz_button_accept_background_color: #cc4400;
	--cmplz_button_accept_border_color: #cc4400;
	--cmplz_button_accept_text_color: #ffffff;
	--cmplz_button_deny_background_color: #ffffff;
	--cmplz_button_deny_border_color: #6a6a6a;
	--cmplz_button_deny_text_color: #1c1c1c;
	--cmplz_button_settings_background_color: #ffffff;
	--cmplz_button_settings_border_color: #6a6a6a;
	--cmplz_button_settings_text_color: #1c1c1c;
	--cmplz_button_border_radius: 0;
	--cmplz_category_header_always_active_color: #1c1c1c;
	--cmplz_slider_active_color: #cc4400;
	--cmplz_slider_inactive_color: #6a6a6a;
	--cmplz_slider_bullet_color: #ffffff;
	color-scheme: light;
}

body.riv-local .cmplz-always-active {
	color: #1c1c1c;
}

/* The embedded consent manager ships a more-specific green rule of its own. */
body.riv-local #cmplz-manage-consent-container.cmplz-manage-consent-container
	.cmplz-categories .cmplz-category .cmplz-category-header .cmplz-always-active {
	color: #1c1c1c;
}

body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
	min-height: 44px;
	font-weight: 700;
}

/* The generated Complianz sheet exposes Save before preferences are opened. */
body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner:not(.cmplz-categories-visible)
	.cmplz-buttons .cmplz-save-preferences {
	display: none;
}

body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept:hover {
	background-color: #a83800;
	border-color: #a83800;
	color: #ffffff;
}

body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons .cmplz-btn:not(.cmplz-accept):hover {
	background-color: #ebebeb;
	border-color: #6a6a6a;
	color: #1c1c1c;
}

body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner :is(
	.cmplz-close,
	.cmplz-category-toggle,
	.cmplz-btn,
	.cmplz-link
):focus-visible,
body.riv-local #cmplz-manage-consent .cmplz-manage-consent:focus-visible {
	outline: 3px solid #b3400a;
	outline-offset: 3px;
}

body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-banner-checkbox input.cmplz-consent-checkbox:focus + .cmplz-label::before {
	box-shadow: 0 0 0 3px #b3400a;
}

body.riv-local #cmplz-manage-consent .cmplz-manage-consent {
	--cmplz_text_color: #1c1c1c;
	--cmplz_banner_background_color: #ffffff;
	--cmplz_banner_border_color: #6a6a6a;
	border-radius: 0;
}

body.riv-local #colophon .riv-footer__cookie-settings {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #b3b3b3;
	font: inherit;
	font-size: 0.96rem;
	text-align: left;
	cursor: pointer;
}

body.riv-local #colophon .riv-footer__cookie-settings:hover {
	color: #ff6a00;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* On narrow screens the Storefront action bar occupies the bottom 74px. */
@media (max-width: 767px) {
	body.riv-local #cmplz-manage-consent .cmplz-manage-consent {
		bottom: calc(75px + env(safe-area-inset-bottom, 0px));
		display: block !important;
		right: 12px;
		left: auto;
		height: auto;
		padding: 10px 12px;
		border: 1px solid #6a6a6a;
		border-radius: 0;
		background-color: #fff;
		color: #1c1c1c;
		font-size: 0.85rem;
		line-height: 1.3;
		white-space: nowrap;
		transform: none;
		visibility: visible;
		opacity: 1;
		animation: none;
		box-shadow: 0 2px 6px rgb(12 12 12 / 18%);
	}

	body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner {
		bottom: calc(75px + env(safe-area-inset-bottom, 0px));
	}
}

/* At tablet/desktop widths, float the notice above the page without affecting
   the document flow or shifting the header. */
@media (min-width: 768px) {
	body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner {
		--cmplz_banner_width: min(calc(100vw - 32px), 840px);
		position: fixed;
		top: auto;
		right: auto;
		bottom: 16px;
		left: 50%;
		transform: translateX(-50%);
		width: min(calc(100% - 32px), 840px);
		max-width: 840px;
		margin: 0;
		z-index: 100000;
	}
}

/* At tablet widths the three first-layer actions must not overflow as a row. */
@media (min-width: 768px) and (max-width: 1023px) {
	body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons {
		flex-direction: column;
	}

	body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
		width: 100%;
		min-width: 0;
	}
}

/* The generated desktop grid reserves 250px per action and overflows this
   compact banner. Reflow the first layer into a two-column layout instead. */
@media (min-width: 1024px) {
	body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner:not(.cmplz-categories-visible) {
		grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr);
	}

	body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner:not(.cmplz-categories-visible)
		:is(.cmplz-header, .cmplz-divider) {
		grid-column: 1 / -1;
		min-width: 0;
	}

	body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner:not(.cmplz-categories-visible) .cmplz-body {
		grid-column: 1;
		width: 100%;
		min-width: 0;
	}

	body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner:not(.cmplz-categories-visible) .cmplz-buttons {
		grid-column: 2;
		width: 100%;
		min-width: 0;
		flex-direction: row;
	}

	body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner:not(.cmplz-categories-visible)
		.cmplz-buttons .cmplz-btn {
		min-width: 0;
		width: 100%;
		flex: 1 1 0%;
		white-space: normal;
	}

	body.riv-local #cmplz-cookiebanner-container .cmplz-cookiebanner:not(.cmplz-categories-visible)
		.cmplz-links.cmplz-documents {
		grid-column: 1;
	}
}
