/**
 * Closure notice — MAHAG Frankfurter Ring 251 (dealer 51381)
 * See closure-notice.js for context and removal.
 * Identical on all three booking sites; the brand modifier is set by the JS.
 */

/* Brand colours taken from the sites' own "Jetzt Buchen!" buttons */
.sb-closure-notice--vw {
	--sb-closure-bg: rgba(0, 136, 204, 0.94);   /* site blue #0088CC */
	--sb-closure-accent: #ffffff;
}

.sb-closure-notice--audi {
	--sb-closure-bg: rgba(0, 0, 0, 0.9);        /* Audi black */
	--sb-closure-accent: #bb0a30;               /* Audi red */
}

/* ---------- Safety net (works without JS) ---------- */

a[href*="dealer=51381"],
.sb-closure-disabled {
	pointer-events: none !important;
	cursor: default !important;
}

/* Hover zone of the grid card carries the "Jetzt Buchen!" call to action */
.vc_grid-item:has(a[href*="dealer=51381"]) .vc_gitem-zone-b,
.vc_grid-item.sb-closure .vc_gitem-zone-b {
	display: none !important;
}

/* Decorative "Jetzt Buchen!" button inside the card (visible on mobile) */
.vc_grid-item:has(a[href*="dealer=51381"]) .teaser-button,
.vc_grid-item.sb-closure .teaser-button {
	display: none !important;
}

/* The booking link layer (z-index 999) covers the whole card; let clicks fall
   through to the image link, which opens the location detail page */
.vc_grid-item.sb-closure .vc_gitem-zone-a .vc_gitem-row-position-middle,
.vc_grid-item.sb-closure .vc_gitem-zone-a .vc_gitem-row-position-bottom,
.vc_grid-item.sb-closure .vc_gitem-zone-a .vc_gitem-post-meta-field-Link {
	pointer-events: none;
}

/* Detail page: hide the booking button */
.vc_btn3-container.sb-closure > a {
	display: none !important;
}

/* ---------- Notice ("Störer") ---------- */

.vc_grid-item.sb-closure .vc_figure,
.single-featured-image-header.sb-closure {
	position: relative;
}

.vc_grid-item.sb-closure .vc_figure img {
	filter: grayscale(60%);
}

.sb-closure-notice {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	padding: 1em 1.25em;
	background: var(--sb-closure-bg, rgba(0, 136, 204, 0.94));
	color: #ffffff;
	font-size: 15px;
	line-height: 1.4;
	text-align: left;
	pointer-events: none;
}

/* Over an image: band across the lower part of the picture */
.vc_figure > .sb-closure-notice,
.single-featured-image-header > .sb-closure-notice {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
}

.sb-closure-notice__title {
	display: block;
	padding-left: 0.6em;
	border-left: 3px solid var(--sb-closure-accent, #ffffff);
	font-size: 1.05em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.sb-closure-notice__text {
	display: block;
}

/* Full-width header image on the detail page: keep the text centred */
.single-featured-image-header > .sb-closure-notice {
	align-items: center;
	text-align: center;
}

/* Detail page button replacement: inline box, not an overlay */
.vc_btn3-container > .sb-closure-notice {
	position: static;
	max-width: 32em;
}

@media (max-width: 480px) {
	.sb-closure-notice {
		font-size: 14px;
		padding: 0.8em 1em;
	}
}

/*
 * Narrow cards (3-column grid on tablets / small laptops): the image is only
 * ~150px high, so the notice must shrink with the card or it grows past the
 * image top into the clipped area. Sized by the card width, not the viewport.
 * Container is the block wrapper — the figure itself is inline-block and would
 * collapse under inline-size containment.
 */
.vc_grid-item.sb-closure .vc_gitem-zone-a .wpb_single_image {
	container-type: inline-size;
}

@container (max-width: 440px) {
	.vc_figure > .sb-closure-notice {
		font-size: 13px;
		gap: 0.2em;
		padding: 0.6em 0.85em;
	}
}

@container (max-width: 320px) {
	.vc_figure > .sb-closure-notice {
		font-size: 12px;
		line-height: 1.3;
		padding: 0.5em 0.7em;
	}
}
