/* ViamShop Cookie-Einwilligung
   Liquid-Glass-Stil des bisherigen Viam-Cookie-Banners (Child-Theme style.css). Farben und Glaswerte kommen aus den
   :root-Variablen des Themes (--accentbanner, --textbanner, --glass-*); die Fallbacks entsprechen den Theme-Werten. */
.ah-consent,
.ah-consent__floating,
.ah-media-blocked {
	--ah-accent: var(--accentbanner, #00bcd4);
	--ah-text: var(--textbanner, #fff);
	--ah-muted: rgba(255, 255, 255, 0.85);
	--ah-line: rgba(255, 255, 255, 0.25);
	--ah-tint: #00000040;
	font-family: 'Futura', 'Futura LT Pro', sans-serif;
	color: var(--ah-text);
	box-sizing: border-box;
}

.ah-consent *,
.ah-consent__floating *,
.ah-media-blocked * {
	box-sizing: border-box;
}

.ah-consent[hidden],
.ah-consent__floating[hidden] {
	display: none !important;
}

.ah-consent-svg {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

html.ah-consent-locked {
	overflow: hidden;
}

/* ---------- Glas-Ebenen: nur der Hintergrund wird „liquid/blur“, Inhalt bleibt scharf ---------- */
.ah-glass {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 0;
}

.ah-glass__filter,
.ah-glass__overlay,
.ah-glass__specular {
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.ah-glass__filter {
	backdrop-filter: blur(var(--glass-blur, 4px));
	-webkit-backdrop-filter: blur(var(--glass-blur, 4px));
	filter: url(#ah-lg-dist);
}

.ah-glass__overlay {
	background: var(--glass-bg, rgba(255, 255, 255, 0.22));
}

.ah-glass__specular {
	box-shadow:
		inset 1px 1px 0 var(--glass-specular-1, rgba(255, 255, 255, 0.65)),
		inset 0 0 4px var(--glass-specular-2, rgba(255, 255, 255, 0.45));
}

/* ---------- Banner (nicht modal: Impressum und Datenschutz bleiben bedienbar) ---------- */
.ah-consent__banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 15px;
	z-index: 999999;
	width: calc(100% - 48px);
	max-width: 760px;
	margin: 0 auto;
	background: var(--ah-tint);
	border-radius: 24px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
	font-size: 15px;
	line-height: 1.35;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.ah-consent__banner.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.ah-consent__inner,
.ah-consent__dialog-inner {
	position: relative;
	z-index: 3;
}

.ah-consent__inner {
	padding: 16px 20px 16px;
}

.ah-consent .ah-consent__title {
	margin: 0 0 6px;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ah-text);
}

.ah-consent .ah-consent__text {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--ah-text);
}

.ah-consent .ah-consent__links {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--ah-text);
}

.ah-consent .ah-consent__links a,
.ah-consent .ah-consent__links a:hover {
	color: var(--ah-text);
	text-decoration: underline;
}

.ah-consent__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Buttons weiss, nur die Zustimmung („Alle akzeptieren“, „Externe Medien erlauben“) in der Akzentfarbe.
   body + Element + zwei Klassen, damit OceanWP und das Elementor-Kit nicht drüberschreiben. */
body .ah-consent button.ah-consent__btn,
body .ah-media-blocked button.ah-consent__btn {
	flex: 1 1 0;
	min-width: 140px;
	min-height: 0;
	margin: 0;
	padding: 10px 14px;
	border: 0;
	border-radius: 9999px;
	background: #fff;
	color: #1d1d1d;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	box-shadow: 0 0 0 rgba(0, 0, 0, 0);
	cursor: pointer;
	transition: box-shadow 0.25s ease, transform 0.12s ease;
}

body .ah-consent button.ah-consent__btn:hover,
body .ah-consent button.ah-consent__btn:focus,
body .ah-media-blocked button.ah-consent__btn:hover,
body .ah-media-blocked button.ah-consent__btn:focus {
	background: #fff;
	color: #1d1d1d;
	box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

body .ah-consent button.ah-consent__btn[data-ah-action="accept"],
body .ah-consent button.ah-consent__btn[data-ah-action="accept"]:hover,
body .ah-consent button.ah-consent__btn[data-ah-action="accept"]:focus,
body .ah-media-blocked button.ah-consent__btn[data-ah-action="allow-media"],
body .ah-media-blocked button.ah-consent__btn[data-ah-action="allow-media"]:hover,
body .ah-media-blocked button.ah-consent__btn[data-ah-action="allow-media"]:focus {
	background: var(--ah-accent);
	color: #fff;
}

body .ah-consent button.ah-consent__btn:active,
body .ah-media-blocked button.ah-consent__btn:active {
	transform: translateY(1px);
}

body .ah-consent button:focus-visible,
body .ah-consent__floating:focus-visible,
body .ah-media-blocked button:focus-visible,
.ah-consent__switch input:focus-visible + .ah-consent__slider {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ---------- Einstellungen (modal) ---------- */
.ah-consent__modal {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.ah-consent__modal.is-visible {
	opacity: 1;
}

.ah-consent__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.ah-consent__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 32px);
	overflow: hidden;
	background: rgba(0, 0, 0, 0.45);
	border-radius: 24px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
	outline: none;
	transform: translateY(10px);
	transition: transform 0.35s ease;
}

.ah-consent__modal.is-visible .ah-consent__dialog {
	transform: translateY(0);
}

/* Scrollt innen, damit die Glas-Ebenen den ganzen Dialog abdecken. */
.ah-consent__dialog-inner {
	overflow-y: auto;
	padding: 26px 22px 20px;
}

body .ah-consent button.ah-consent__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ah-text);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: box-shadow 0.25s ease;
}

body .ah-consent button.ah-consent__close:hover,
body .ah-consent button.ah-consent__close:focus {
	background: transparent;
	color: var(--ah-text);
	box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

.ah-consent__cat {
	padding: 12px 0;
	border-top: 1px solid var(--ah-line);
}

.ah-consent .ah-consent__switch {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	cursor: pointer;
}

.ah-consent__switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.ah-consent__slider {
	position: relative;
	flex: 0 0 44px;
	height: 24px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.35);
	transition: background-color 0.2s ease;
}

.ah-consent__slider::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s ease;
}

.ah-consent__switch input:checked + .ah-consent__slider {
	background: var(--ah-accent);
}

.ah-consent__switch input:checked + .ah-consent__slider::after {
	transform: translateX(20px);
}

.ah-consent__switch input:disabled + .ah-consent__slider {
	opacity: 0.6;
	cursor: not-allowed;
}

.ah-consent .ah-consent__cat-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--ah-text);
}

.ah-consent .ah-consent__cat-text {
	margin: 8px 0 0 56px;
	font-size: 13px;
	line-height: 1.55;
	color: var(--ah-muted);
}

/* ---------- Schwebender Button zum Widerruf ---------- */
body button.ah-consent-open.ah-consent__floating {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999998;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ah-tint);
	color: var(--ah-text);
	font-size: 0;
	line-height: 1;
	text-transform: none;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: box-shadow 0.25s ease;
}

body button.ah-consent-open.ah-consent__floating:hover,
body button.ah-consent-open.ah-consent__floating:focus {
	background: var(--ah-tint);
	color: var(--ah-text);
	border: 0;
	box-shadow: 0 0 12px rgba(255, 255, 255, 0.35), 0 10px 28px rgba(0, 0, 0, 0.25);
}

body button.ah-consent-open.ah-consent__floating svg {
	position: relative;
	z-index: 3;
	width: 22px;
	height: 22px;
	fill: currentColor;
	pointer-events: none;
}

/* ---------- Video-Platzhalter ---------- */
.ah-media-blocked {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 16 / 9;
	min-height: 220px;
	padding: 20px;
	border-radius: 15px;
	background: #1d1d1d;
	background-image: var(--ah-poster, linear-gradient(135deg, #1d1d1d 0%, #3a3a3a 100%));
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.ah-media-blocked--poster::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.ah-media-blocked .ah-media-blocked__box {
	position: relative;
	max-width: 440px;
	padding: 20px;
	border-radius: 24px;
	background: var(--ah-tint);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
	text-align: center;
}

.ah-media-blocked__box > :not(.ah-glass) {
	position: relative;
	z-index: 3;
}

.ah-media-blocked .ah-media-blocked__text {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ah-text);
}

body .ah-media-blocked .ah-media-blocked__box button.ah-media-blocked__allow {
	width: 100%;
	min-width: 0;
	flex: none;
}

.ah-media-blocked .ah-media-blocked__box .ah-media-blocked__settings {
	display: inline-block;
	margin-top: 10px;
	font-size: 13px;
	color: var(--ah-text);
	text-decoration: underline;
}

/* ---------- Mobil (Werte wie im Theme ab 640px) ---------- */
@media (max-width: 640px) {
	.ah-consent__banner {
		bottom: 8px;
		width: calc(100% - 16px);
		border-radius: 20px;
	}

	.ah-consent__inner {
		padding: 14px 14px 12px;
	}

	.ah-consent .ah-consent__text {
		font-size: 13.5px;
	}

	.ah-consent__buttons {
		flex-direction: column;
	}

	body .ah-consent button.ah-consent__btn {
		width: 100%;
		min-width: 0;
		flex: none;
		font-size: 13.5px;
	}

	.ah-consent .ah-consent__cat-text {
		margin-left: 0;
	}

	.ah-consent__dialog-inner {
		padding: 22px 16px 16px;
	}

	.ah-media-blocked {
		aspect-ratio: auto;
		min-height: 260px;
		padding: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ah-consent,
	.ah-consent *,
	.ah-media-blocked * {
		transition: none !important;
	}
}
