/*
 * Complianz cookie banner overrides.
 *
 * Selectors confirmed against the rendered markup in
 * wp-content/plugins/complianz-gdpr/cookiebanner/templates/cookiebanner.php.
 * Keep these overrides here (not in Complianz's admin "Custom CSS" field) so
 * they are version-controlled with the rest of the theme.
 */

/*
 * Hide the per-service "Manage services" link (opens the granular cookie/
 * services overview). This is distinct from "Manage options"/"Manage
 * Preferences" (.cmplz-manage-options / .cmplz-view-preferences), which
 * stays visible.
 */
.cmplz-cookiebanner
	.cmplz-links.cmplz-information
	a.cmplz-manage-third-parties {
	display: none !important;
}

/*
 * Stack the intro message above the category list instead of a left column.
 */
.cmplz-cookiebanner .cmplz-body {
	display: flex;
	flex-direction: column;
}

.cmplz-cookiebanner .cmplz-message {
	width: 100%;
	order: -1;
	margin-bottom: 12px;
}

/*
 * Normalize the banner's fonts to 14px and tighten spacing so the full
 * dialog (header, message, categories and buttons) fits within the viewport
 * without triggering the outer .cmplz-cookiebanner scrollbar. Complianz
 * drives most of these values via CSS custom properties set inline
 * per-banner, so they're overridden here directly with !important rather
 * than by reassigning the variables.
 */
.cmplz-cookiebanner {
	padding: 12px 16px !important;
	grid-gap: 6px !important;
}

.cmplz-cookiebanner .cmplz-title {
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #0f172a !important;
}

.cmplz-cookiebanner .cmplz-message {
	font-size: 14px !important;
	line-height: 1.4 !important;
	margin-bottom: 4px !important;
}

.cmplz-cookiebanner .cmplz-categories {
	margin-top: 1rem !important;
}

.cmplz-cookiebanner .cmplz-categories .cmplz-category:not(:last-child) {
	margin-bottom: 6px !important;
}

.cmplz-cookiebanner .cmplz-categories .cmplz-category-header {
	padding: 6px 8px !important;
	grid-gap: 6px !important;
}

.cmplz-cookiebanner .cmplz-categories .cmplz-category-title {
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #0f172a !important;
}

.cmplz-cookiebanner .cmplz-categories .cmplz-always-active {
	font-size: 14px !important;
}

.cmplz-cookiebanner .cmplz-categories .cmplz-description {
	font-size: 12px !important;
	line-height: 1.4 !important;
	padding: 10px 12px !important;
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
	min-height: 34px !important;
	padding: 8px 10px !important;
	font-size: 15px !important;
	line-height: 16px !important;
}

.cmplz-cookiebanner .cmplz-buttons {
	margin-bottom: 0.5rem !important;
}

.cmplz-cookiebanner .cmplz-body {
	max-height: 45vh;
}
