/*
 * DHI Vienna: Borlabs Cookie (content blockers, dialog, widget) on the board. Loaded with the engine's consent.css
 * (components/consent.css, tokens only), which it follows: same selectors, later in the cascade (entry dhi-consent,
 * site/plugin-views.php). Borlabs' words, structure and behaviour stay; no Borlabs setting is changed.
 *
 * Where the engine's consent.css clashes with the board:
 *   - buttons: board .d-btn = radius 6, 700 .875rem, .04em, uppercase (engine: radius 12, 600, no capitals);
 *   - panels: the board's cards are radius 12 (engine: 16 on the blocker panel, 24 on the video frame);
 *   - the floating widget must not sit over the sticky Termin / phone bar below 768 px.
 * Selectors repeat the engine's id-weighted chains; !important only where Borlabs or the engine forces a property.
 */

/* ---------- content blocker: panel and video frame ---------- */

html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) {
	border-radius: var(--wp--custom--radius--medium);
}

html .is-style-card-flat div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) {
	border-radius: 0;
}

.brlbs-cmpnt-cb-fluid-width-video-wrapper-youtube,
.brlbs-cmpnt-cb-fluid-width-video-wrapper-vimeo {
	border-radius: var(--wp--custom--radius--medium);
}

/* ---------- content blocker: buttons (.d-btn--outline) ---------- */

html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) .brlbs-cmpnt-cb-btn {
	min-height: 3rem;
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600 !important; /* Borlabs and the engine: !important */
	letter-spacing: 0;
	text-transform: none !important; /* design C1: no capitals on buttons */
}

html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) .brlbs-cmpnt-cb-btn:hover,
html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) .brlbs-cmpnt-cb-btn:focus-visible {
	box-shadow: none;
}

/* Two long button labels wrap on a phone instead of overflowing the panel. */
@media (max-width: 767px) {
	html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) .brlbs-cmpnt-cb-btn {
		width: 100%;
	}
}

/* ---------- dialog (cookie box) ---------- */

html body #BorlabsCookieBox .brlbs-cmpnt-dialog,
html body #BorlabsCookieBox .brlbs-cmpnt-dialog-box {
	border-radius: var(--wp--custom--radius--medium);
}

html body #BorlabsCookieBox .brlbs-cmpnt-btn {
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

/* ---------- floating widget: a small round control, never over the sticky bar ----------
   Borlabs' element is a 20 px padded hit box around a 56 px icon; the engine painted surface, border and shadow on the
   box, which made the 96 px white disc. The box goes clear and tight, the icon carries the surface, 44 px. At 1440 it sits
   in the free gutter. The sticky bar (Termin + phone) is fixed at the bottom below 768 px and about 73 px high with the
   safe area added. Borlabs positions the box from its stored setting (its own id-weighted rule), so the offset repeats
   !important. R41 */
html body #BorlabsCookieBox .brlbs-cmpnt-widget,
html body .brlbs-cmpnt-container .brlbs-cmpnt-widget,
html body .brlbs-cmpnt-widget {
	left: 1rem !important;
	bottom: 1rem !important;
	padding: 0;
	border: 0;
	border-radius: var(--wp--custom--radius--pill, 999px);
	background: transparent;
	box-shadow: none;
}

html body #BorlabsCookieBox .brlbs-cmpnt-widget svg,
html body .brlbs-cmpnt-container .brlbs-cmpnt-widget svg,
html body .brlbs-cmpnt-widget svg {
	box-sizing: border-box;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--pill, 999px);
	background: var(--wp--preset--color--base-2);
	box-shadow: var(--wp--preset--shadow--soft);
}

/* Phone: a slim tab on the left edge above the bar, so it sits over the 16 px gutter and at most 12 px of the content. */
@media (max-width: 767px) {
	html body #BorlabsCookieBox .brlbs-cmpnt-widget,
	html body .brlbs-cmpnt-container .brlbs-cmpnt-widget,
	html body .brlbs-cmpnt-widget {
		left: 0 !important;
		bottom: calc(4.9375rem + env(safe-area-inset-bottom, 0px)) !important;
	}

	html body #BorlabsCookieBox .brlbs-cmpnt-widget svg,
	html body .brlbs-cmpnt-container .brlbs-cmpnt-widget svg,
	html body .brlbs-cmpnt-widget svg {
		width: 1.75rem;
		height: 2.75rem;
		padding: 0.25rem 0.25rem 0.25rem 0.125rem;
		border-inline-start: 0;
		border-radius: 0 var(--wp--custom--radius--pill, 999px) var(--wp--custom--radius--pill, 999px) 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	html body #BorlabsCookieBox .brlbs-cmpnt-btn:hover {
		transform: none;
	}
}

/* ---------- video blocker on the board's video slot: poster edge to edge (.d-video), words under it ---------- */

html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb):has(.brlbs-cmpnt-cb-youtube, .brlbs-cmpnt-cb-vimeo) {
	padding: 0;
	overflow: hidden;
}

html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) :is(.brlbs-cmpnt-cb-youtube, .brlbs-cmpnt-cb-vimeo) .brlbs-cmpnt-cb-main {
	padding: 1.25rem 1.5rem 1.5rem;
}

/* ---------- video blockers: the thumbnail and the play button come back ----------
   The engine skin hides both ("no thumbnail"); board 01 and today's site show the preview picture with a play
   button (.d-video / .d-play: 56 px round white seat, brand-colour triangle). The picture is Borlabs' locally stored
   thumbnail (uploads/borlabs-cookie/…, a first-party file; set as the inline background-image of
   .brlbs-cmpnt-cb-thumbnail), shown as a 16:9 band above the engine's text and buttons, on the video blockers (YouTube, Vimeo). The
   other providers' preview images (Instagram, X, Facebook) are generic Borlabs skeletons and stay hidden. The engine's display:none carries the id-weighted :not(#revsults-cb) chain, repeated here. */

html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) :is(.brlbs-cmpnt-cb-youtube, .brlbs-cmpnt-cb-vimeo) {
	position: relative;
}

html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) :is(.brlbs-cmpnt-cb-youtube, .brlbs-cmpnt-cb-vimeo) .brlbs-cmpnt-cb-thumbnail {
	position: relative; /* Borlabs lays it over the whole panel (absolute, 100 % high) */
	inset: auto;
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	margin: 0;
	border-radius: 0;
	background-color: var(--wp--preset--color--base-3);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) :is(.brlbs-cmpnt-cb-youtube, .brlbs-cmpnt-cb-vimeo) .brlbs-cmpnt-cb-play-button {
	position: absolute;
	inset: 0 0 auto 0;
	display: grid; /* Borlabs hides it in narrow containers (display none) */
	place-items: center;
	width: auto;
	height: auto;
	margin: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	aspect-ratio: 16 / 9;
	pointer-events: none;
}

html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) :is(.brlbs-cmpnt-cb-youtube, .brlbs-cmpnt-cb-vimeo) .brlbs-cmpnt-cb-play-button::before {
	content: "";
	grid-area: 1 / 1;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: var(--wp--custom--radius--pill);
	background: color-mix(in srgb, var(--wp--preset--color--base-2) 92%, transparent);
	box-shadow: var(--wp--preset--shadow--raised);
}

html body div.brlbs-cmpnt-container.brlbs-cmpnt-content-blocker[data-borlabs-cookie-content-blocker-id]:not(#revsults-cb) :is(.brlbs-cmpnt-cb-youtube, .brlbs-cmpnt-cb-vimeo) .brlbs-cmpnt-cb-play-button::after {
	content: "";
	grid-area: 1 / 1;
	width: 1.375rem;
	height: 1.375rem;
	margin-left: 0.1875rem;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 4.5v15l13-7.5z' fill='black'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 4.5v15l13-7.5z' fill='black'/></svg>") center / contain no-repeat;
}
