/**
 * Orbit overlay for the Complianz cookie banner.
 *
 * Colors, borders, radius, width, position, which blocks are shown, and
 * button palettes come from Complianz (CSS variables on :root). This file
 * adds theme typography (Figma 722:8423) and a hover state that inverts
 * using those vars.
 *
 * Complianz exposes one admin font-size (body). Title, buttons, and links
 * are derived from that, so mixed sizes live here.
 */

.cmplz-cookiebanner {
	box-sizing: border-box;
	--cmplz_banner_width: 100%;
	width: 100% !important;
	max-width: 100% !important;
	padding: 0.875rem !important;
	max-height: min(85vh, 36rem);
	overflow: hidden;
	font-family: var(--wp--preset--font-family--body, "helvetica-neue-lt-pro", "Helvetica Neue", Helvetica, Arial, sans-serif);
	--cmplz_title_font_size: 15px;
	--cmplz_text_font_size: 14px;
	--cmplz_text_line_height: 20px;
	--cmplz_button_font_size: 16px;
	--cmplz_link_font_size: 13px;
}

@media (min-width: 769px) {
	.cmplz-cookiebanner {
		--cmplz_banner_width: 400px;
		width: min(400px, calc(100vw - 2rem)) !important;
		max-width: min(400px, calc(100vw - 2rem)) !important;
	}
}

.cmplz-cookiebanner .cmplz-message,
.cmplz-cookiebanner .cmplz-categories {
	width: 100% !important;
	max-width: 100% !important;
}

.cmplz-cookiebanner .cmplz-header {
	margin: 0 0 0.375rem;
	padding: 0;
}

.cmplz-cookiebanner .cmplz-body {
	max-height: min(52vh, 22rem);
	margin: 0;
	padding: 0 !important;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.cmplz-cookiebanner .cmplz-message {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 14px !important;
	line-height: 20px !important;
}

.cmplz-cookiebanner .cmplz-message p {
	margin: 0 !important;
	font-size: inherit !important;
	line-height: inherit !important;
}

.cmplz-cookiebanner.cmplz-categories-visible .cmplz-body {
	max-height: min(58vh, 26rem);
}

.cmplz-cookiebanner .cmplz-category {
	margin-block: 0.25rem;
}

.cmplz-cookiebanner .cmplz-category-title {
	font-size: 14px;
	line-height: 1.25;
}

.cmplz-cookiebanner .cmplz-title,
.cmplz-cookiebanner .cmplz-category-title,
.cmplz-cookiebanner .cmplz-always-active,
.cmplz-cookiebanner .cmplz-btn,
.cmplz-cookiebanner .cmplz-link {
	font-family: var(--wp--preset--font-family--heading, "stolzl", sans-serif);
}

.cmplz-cookiebanner .cmplz-title {
	font-weight: 500;
	line-height: 1.2;
}

.cmplz-cookiebanner .cmplz-buttons {
	gap: 0.5rem;
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
	font-size: 14px !important;
	font-weight: 500;
	line-height: 1.2;
	padding: 0.45rem 0.625rem;
	text-transform: uppercase;
}

.cmplz-cookiebanner .cmplz-links .cmplz-link {
	font-weight: 500;
	line-height: 1.25;
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept:hover,
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept:focus-visible,
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-deny:hover,
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-deny:focus-visible,
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-view-preferences:hover,
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-view-preferences:focus-visible,
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-save-preferences:hover,
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-save-preferences:focus-visible {
	background-color: var(--cmplz_text_color);
	border-color: var(--cmplz_text_color);
	color: var(--cmplz_banner_background_color);
	outline: none;
}

@media (max-width: 425px) {
	.cmplz-cookiebanner .cmplz-header .cmplz-title {
		display: block;
	}
}

/*
 * Complianz legal pages (#cmplz-document) set margin-top: 0 with an ID
 * selector, which beats the inner-page first-block section gap.
 */
.us-orbit-page .wp-block-post-content > #cmplz-document:first-child {
	margin-block-start: var(--us-orbit-section-gap, 3.75rem);
	margin-top: var(--us-orbit-section-gap, 3.75rem);
}

@media (max-width: 63.99rem) {
	.us-orbit-page .wp-block-post-content > #cmplz-document:first-child {
		margin-block-start: var(--us-orbit-page-header-padding-y, 1.5rem);
		margin-top: var(--us-orbit-page-header-padding-y, 1.5rem);
	}
}
