/* YouTube (DSGVO) block (acf/youtube-consent). Loaded only where the block is used. */
.cv-video {
	--cv-video-accent: var(--btn-1-bg, #E07A5F);
	--cv-video-accent-ink: var(--btn-1-color, #fff);
	margin: 0 0 32px;
	padding: 0;
}

.cv-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 16px;
	overflow: hidden;
	background: #17150A;
}

.cv-video__btn,
.cv-video__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	display: block;
}

.cv-video__btn {
	background: none;
	cursor: pointer;
	border-radius: inherit;
}

.cv-video .cv-video__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
	transition: transform .4s ease;
}

.cv-video__btn::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(23, 21, 10, .15);
	transition: background .2s ease;
}

.cv-video__play {
	position: absolute;
	z-index: 1;
	left: 50%;
	top: 50%;
	width: 76px;
	height: 76px;
	margin: -38px 0 0 -38px;
	border-radius: 50%;
	background: var(--cv-video-accent);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
	transition: transform .2s ease, box-shadow .2s ease;
}

.cv-video__play::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	margin: -13px 0 0 -8px;
	border-style: solid;
	border-width: 13px 0 13px 22px;
	border-color: transparent transparent transparent var(--cv-video-accent-ink);
}

.cv-video__btn:hover::after,
.cv-video__btn:focus-visible::after {
	background: rgba(23, 21, 10, .3);
}

.cv-video__btn:hover .cv-video__play,
.cv-video__btn:focus-visible .cv-video__play {
	transform: scale(1.12);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

.cv-video__btn:hover .cv-video__thumb {
	transform: scale(1.03);
}

/* Ring on the overlay: a plain outline would be painted under the positioned thumbnail. */
.cv-video__btn:focus-visible {
	outline: none;
}

.cv-video__btn:focus-visible::after {
	box-shadow: inset 0 0 0 4px var(--cv-video-accent);
	border-radius: inherit;
}

.cv-video__btn:focus-visible .cv-video__play {
	box-shadow: 0 0 0 4px #fff, 0 10px 30px rgba(0, 0, 0, .4);
}

.cv-video__note,
.cv-video__caption {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.5;
}

.cv-video__note {
	opacity: .75;
}

.cv-video__note a {
	color: inherit;
	text-decoration: underline;
}

.cv-video__caption {
	font-weight: 500;
}

.cv-video.is-playing .cv-video__note {
	display: none;
}

@media (max-width: 767px) {
	.cv-video__play {
		width: 60px;
		height: 60px;
		margin: -30px 0 0 -30px;
	}

	.cv-video__play::before {
		margin: -10px 0 0 -6px;
		border-width: 10px 0 10px 17px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cv-video__thumb,
	.cv-video__play,
	.cv-video__btn::after {
		transition: none;
	}
}

/* Flexible layout video_section. */
.b-video-block .video-part {
	max-width: 960px;
	margin-top: 32px;
}

.b-video-block .cv-video {
	margin-bottom: 0;
	text-align: left;
}

/* Hero (banner_section): secondary "video" button next to the main CTA. */
.btn-video {
	gap: 10px;
	color: var(--text-black, #17150A);
	background: transparent;
	border: 1px solid var(--text-black, #17150A);
	font-family: inherit;
}

.btn-video:hover,
.btn-video:focus-visible {
	color: var(--text-black, #17150A);
	background: var(--bg-white, #fff);
}

.btn-video:focus-visible {
	outline: 3px solid var(--cv-video-accent, var(--btn-1-bg, #E07A5F));
	outline-offset: 2px;
}

.btn-video__icon {
	flex: 0 0 auto;
}

@media (max-width: 767px) {
	.button-wrapper.has-video {
		flex-direction: column;
		align-items: stretch;
	}

	.button-wrapper.has-video .btn {
		width: 100%;
	}
}

/* Video dialog (native <dialog>, top layer). */
html.cv-video-lock {
	overflow: hidden;
}

.cv-video-dialog {
	width: min(960px, calc(100vw - 32px));
	max-width: none;
	max-height: none;
	margin: auto;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
	color: #fff;
}

.cv-video-dialog::backdrop {
	background: rgba(13, 27, 62, .8);
}

.cv-video-dialog__inner {
	position: relative;
}

.cv-video-dialog .cv-video {
	margin: 0;
}

.cv-video-dialog .cv-video__note a {
	color: #fff;
}

.cv-video-dialog__close {
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .15);
	color: #fff;
	cursor: pointer;
	transition: background .2s ease;
}

.cv-video-dialog__close:hover,
.cv-video-dialog__close:focus-visible {
	background: rgba(255, 255, 255, .3);
}

.cv-video-dialog__close:focus-visible {
	outline: 3px solid var(--btn-1-bg, #E07A5F);
	outline-offset: 2px;
}

/* Editor only: missing required fields. */
.cv-video-notice {
	padding: 16px 20px;
	border: 2px dashed #d63638;
	border-radius: 8px;
	background: #fcf0f1;
	color: #8a2424;
	font-weight: 600;
}
