/*
 * Cookiebot dialog skin (UK, blog 5). Enqueued by lumi_uk_cookiebot_dialog_css()
 * only while Cookiebot is the CMP.
 *
 * Target: Haypp's OneTrust layout on Cookiebot's "overlay-v2" template.
 * Works with both response modes we may run:
 *   - "inlineoptin" (admin: inline multilevel, buttons incl. Deny) — the
 *     intended one: first layer Accept / Reject / Cookies Settings, Details
 *     layer with per-category toggles + Confirm My Choices.
 *   - "optinout" (admin: Accept / Decline) — same first layer; Details layer
 *     is read-only (Cookiebot hides the toggles in that mode).
 * Layout rules:
 *   - no Consent / Details / About tab bar on the first layer
 *   - body text only (the heading is kept for screen readers)
 *   - full-width stacked buttons: Accept (filled) first, Reject (outlined),
 *     Confirm My Choices (Details layer only), then the "Cookies Settings"
 *     text link = Cookiebot's Customize button, whose click handler is bound
 *     in every response mode
 *
 * Colours and copy come from the Cookiebot admin; nothing here recolours.
 * Cookiebot injects its own <style> with ID selectors, hence the !important.
 */

#CybotCookiebotDialog {
	font-family: inherit !important;
}

@media screen and (min-width: 601px) {
	#CybotCookiebotDialog {
		max-width: 560px !important;
	}
}

/* Tab bar off on the first layer (Haypp: text + buttons only). It returns on
   the Details layer so Consent / Details / About stay reachable there. */
#CybotCookiebotDialog #CybotCookiebotDialogNav {
	display: none !important;
}

#CybotCookiebotDialog:has(#CybotCookiebotDialogNavDetails.CybotCookiebotDialogActive) #CybotCookiebotDialogNav,
#CybotCookiebotDialog:has(#CybotCookiebotDialogNavAbout.CybotCookiebotDialogActive) #CybotCookiebotDialogNav {
	display: block !important;
}

/* Heading: visually hidden, still the dialog's accessible name. */
#CybotCookiebotDialog #CybotCookiebotDialogBodyContentTitle {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

#CybotCookiebotDialog #CybotCookiebotDialogBodyContentText {
	line-height: 1.55;
}

#CybotCookiebotDialog #CybotCookiebotDialogBodyContentText a {
	font-weight: 700;
	text-decoration: underline;
}

/* Buttons: one per row, full width, Accept first. */
#CybotCookiebotDialog #CybotCookiebotDialogFooter #CybotCookiebotDialogBodyButtonsWrapper {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 10px;
}

#CybotCookiebotDialog #CybotCookiebotDialogFooter .CybotCookiebotDialogBodyButton {
	width: 100% !important;
	margin: 0 !important;
	border-radius: 4px !important;
	font-weight: 700 !important;
	font-size: 1.05em !important;
	padding: .9em 1em !important;
}

#CybotCookiebotDialog #CybotCookiebotDialogFooter #CybotCookiebotDialogBodyButtonAccept,
#CybotCookiebotDialog #CybotCookiebotDialogFooter #CybotCookiebotDialogBodyLevelButtonLevelOptinAllowAll {
	order: 1;
}

#CybotCookiebotDialog #CybotCookiebotDialogFooter #CybotCookiebotDialogBodyButtonDecline {
	order: 2;
}

#CybotCookiebotDialog #CybotCookiebotDialogFooter #CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection {
	order: 3;
}

/* "Cookies Settings": Cookiebot's Customize button, restyled as a text link.
   Shown only while the Consent (first) layer is active — on the Details
   layer the footer carries Confirm My Choices / Allow All instead. */
#CybotCookiebotDialog #CybotCookiebotDialogFooter #CybotCookiebotDialogBodyLevelButtonCustomize {
	order: 4;
	background: transparent !important;
	border: 0 !important;
	color: inherit !important;
	text-decoration: underline;
	padding: .35em 0 0 !important;
	box-shadow: none !important;
	display: none !important;
}

#CybotCookiebotDialog:has(#CybotCookiebotDialogNavDeclaration.CybotCookiebotDialogActive) #CybotCookiebotDialogFooter #CybotCookiebotDialogBodyLevelButtonCustomize {
	display: block !important;
}

#CybotCookiebotDialog #CybotCookiebotDialogBodyLevelButtonCustomize .CybotCookiebotDialogArrow {
	display: none !important;
}
