/* Complianz view-preferences banner: retain its dialog title for assistive technology. */
.cmplz-cookiebanner.cmplz-categories-type-view-preferences {
	box-sizing: border-box;
	z-index: 99999 !important;
	width: min(100%, 520px) !important;
	max-width: 520px !important;
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%);
	padding: 12px 16px !important;
	gap: 6px !important;
}

.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-header {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
}

.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-title {
	display: block !important;
}

.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-logo,
.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-close,
.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-divider-header {
	display: none !important;
}

.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-message {
	font-size: 14px !important;
	line-height: 1.35 !important;
}

.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-buttons {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 6px 8px !important;
}

.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-buttons .cmplz-deny,
.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-buttons .cmplz-accept {
	width: 100% !important;
	min-width: 0 !important;
	min-height: 44px !important;
	padding: 6px !important;
	border: 1px solid #374151 !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: #111827 !important;
	font-size: 14px !important;
	font-weight: 600 !important;
}

.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-deny { order: 2; }
.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-accept { order: 3; }
.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-buttons .cmplz-view-preferences {
	grid-column: 1 / -1;
	order: 1;
	justify-self: start;
	width: auto !important;
	min-width: 36px !important;
	min-height: 36px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: #075985 !important;
	font-size: 14px !important;
	text-decoration: underline;
}

@media (max-width: 767px) {
	body:not(.woocommerce-checkout) .cmplz-cookiebanner.cmplz-categories-type-view-preferences.cmplz-bottom {
		bottom: calc(var(--psk-handheld-footer-row-height, 4.45em) + var(--psk-handheld-safe-bottom, 0px)) !important;
	}
}

.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-buttons .cmplz-save-preferences {
	grid-column: 1 / -1;
	order: 4;
}

/* Desktop: stack message, preferences link and buttons in one column (Complianz uses a 2-column grid there). */
@media (min-width: 768px) {
	.cmplz-cookiebanner.cmplz-categories-type-view-preferences {
		grid-template-columns: minmax(0, 1fr) !important;
		grid-template-areas: none !important;
	}
	.cmplz-cookiebanner.cmplz-categories-type-view-preferences > * {
		grid-column: 1 / -1 !important;
		grid-row: auto !important;
	}
	.cmplz-cookiebanner.cmplz-categories-type-view-preferences .cmplz-buttons {
		width: 100% !important;
	}
}
