/* WP Video Hero Banner - front-end */
.wpvhb {
	--wpvhb-tl-color: #fff;
	--wpvhb-tl-track: rgba(255, 255, 255, .3);
	--wpvhb-tl-height: 4px;
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 100%;
	overflow: hidden;
	isolation: isolate;
	background-color: #111;
	color: #fff;
}

.wpvhb *,
.wpvhb *::before,
.wpvhb *::after {
	box-sizing: border-box;
}

/* 100% da largura da viewport, independente do container pai. */
.wpvhb.wpvhb--viewport {
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	margin-left: -50vw;
	margin-right: 0;
}

/* Mídia: preenche a área sem alterar o fluxo da página. */
.wpvhb__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
}

/* Camadas de mídia (imagem ou vídeo por item da playlist). */
.wpvhb__layer {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity .4s ease;
	will-change: opacity;
}

.wpvhb__layer.is-active { opacity: 1; }
.wpvhb__layer.is-empty { background: transparent; }

/* Camada em cache: mantém o elemento de vídeo vivo, fora de exibição. */
.wpvhb__layer.is-idle {
	visibility: hidden;
	opacity: 0;
	transition: none;
	pointer-events: none;
}

/* Sobreposição branca da transição Branco (White Fade). */
.wpvhb__white {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: #fff;
	opacity: 0;
	pointer-events: none;
}

/* Especificidade elevada para vencer regras globais de tema/Elementor
   (ex.: ".elementor img { height: auto }"), que impedem a imagem de
   acompanhar a altura do banner. */
.wpvhb .wpvhb__el,
.wpvhb .wpvhb__video,
.wpvhb .wpvhb__fallback {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-width: 100%;
	min-height: 100%;
	object-fit: cover;
	object-position: center center;
	border: 0;
	margin: 0;
	padding: 0;
	max-width: none;
	max-height: none;
}

/* Cadeia de altura das camadas internas: garante que imagem e vídeo
   acompanhem qualquer mudança de altura do banner (painel, resize,
   breakpoint), independente do tema ou do CSS global do Elementor. */
.wpvhb .wpvhb__media,
.wpvhb .wpvhb__layer,
.wpvhb .wpvhb__inout,
.wpvhb .wpvhb__motion {
	width: 100%;
	height: 100%;
}

.wpvhb__el.is-pending { opacity: 0; pointer-events: none; }

/* Camada interna de movimento (transformações cinematográficas). */
.wpvhb__motion {
	position: absolute;
	inset: 0;
	transform-origin: 50% 50%;
	backface-visibility: hidden;
}

/* Camada de entrada/saída (deslocamento e zoom da transição). */
.wpvhb__inout {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
}

.wpvhb__layer.is-fading { pointer-events: none; }

/* Primeiro quadro renderizado no servidor. */
.wpvhb__poster {
	z-index: 0;
	transition: opacity .4s ease;
}

.wpvhb__poster.is-hidden { opacity: 0; }

.wpvhb__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

/* Camada dos textos. */
.wpvhb__texts {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}

.wpvhb-text {
	position: absolute;
	inset: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px;
	transform: translate(var(--wpvhb-x, 0), var(--wpvhb-y, 0));
	--wpvhb-dist: 40px;
	visibility: hidden;
}

.wpvhb-text.is-active {
	visibility: visible;
	pointer-events: auto;
}

.wpvhb-text__inner {
	max-width: 100%;
	margin: 0;
	text-align: center;
	line-height: 1.2;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.wpvhb-text__inner > :first-child { margin-top: 0; }
.wpvhb-text__inner > :last-child { margin-bottom: 0; }

/* Partes animáveis (valores aplicados via JS). */
.wpvhb-wrap {
	display: inline-block;
	vertical-align: top;
	max-width: 100%;
}

.wpvhb-wrap.wpvhb-block { display: block; }
.wpvhb-word { display: inline-block; white-space: nowrap; }
.wpvhb-wrap.wpvhb-letter { white-space: pre; }

.wpvhb-part {
	display: inline-block;
	will-change: transform, opacity;
	backface-visibility: hidden;
}

.wpvhb-block > .wpvhb-part { display: block; }
.wpvhb-text.is-mask .wpvhb-wrap { overflow: hidden; }
.wpvhb-text.is-3d .wpvhb-text__inner { perspective: 800px; }

/* Estado, botões e carregamento. */
.wpvhb__status {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	z-index: 3;
	transform: translateY(-50%);
	padding: 8px 16px;
	text-align: center;
	font: 500 13px/1.4 system-ui, sans-serif;
	color: #fff;
	pointer-events: none;
}

.wpvhb__status:empty { display: none; }
.wpvhb__status span { background: rgba(0, 0, 0, .6); padding: 6px 12px; border-radius: 4px; }

.wpvhb__buttons {
	position: absolute;
	right: 16px;
	top: 16px;
	z-index: 5;
	display: flex;
	gap: 8px;
}

.wpvhb__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.wpvhb__btn:hover,
.wpvhb__btn:focus-visible { background: rgba(0, 0, 0, .8); }
.wpvhb__btn[hidden] { display: none; }

.wpvhb__btn--play {
	position: absolute;
	right: auto;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	font-size: 24px;
}

.wpvhb__btn:focus-visible,
.wpvhb__tl-toggle:focus-visible,
.wpvhb__track:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}


/* Timeline. Sempre visível no editor; no site somente com .is-public. */
.wpvhb__timeline {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 6;
	display: none;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
}

.wpvhb__tl-body {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

/* Faixa de mídias: blocos proporcionais ao tempo de cada item. */
.wpvhb__media-track {
	position: relative;
	display: none;
	height: 15px;
	border-radius: 3px;
	background: rgba(0, 0, 0, .25);
	overflow: hidden;
}

.wpvhb__timeline.has-media .wpvhb__media-track { display: block; }
.wpvhb__timeline.is-public.has-media .wpvhb__media-track { display: block; }

.wpvhb__media-seg {
	position: absolute;
	top: 0;
	bottom: 0;
	overflow: hidden;
	white-space: nowrap;
	border-right: 1px solid rgba(0, 0, 0, .35);
	background: var(--wpvhb-tl-media, rgba(255, 255, 255, .22));
	color: #fff;
	transition: background-color .2s ease;
}

.wpvhb__media-seg.is-video {
	background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, .14) 0 3px, transparent 3px 7px);
}

.wpvhb__media-seg.is-on { background: var(--wpvhb-tl-media-on, #ffd23f); color: #111; }

.wpvhb__media-label {
	display: block;
	padding: 0 5px;
	font: 500 10px/15px system-ui, sans-serif;
	font-variant-numeric: tabular-nums;
}

.wpvhb__timeline--bottom { bottom: 0; }

.wpvhb__timeline--top {
	top: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
}

.wpvhb--editor .wpvhb__timeline:not([hidden]),
.wpvhb__timeline.is-public:not([hidden]) {
	display: flex;
}

.wpvhb__tl-toggle {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .2);
	color: #fff;
	font-size: 10px;
	cursor: pointer;
}

.wpvhb__track {
	position: relative;
	flex: 1 1 auto;
	height: var(--wpvhb-tl-height);
	min-height: 4px;
	border-radius: 999px;
	background: var(--wpvhb-tl-track);
	cursor: pointer;
	touch-action: none;
}

/* Área de clique maior que a barra visível. */
.wpvhb__track::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -10px;
	bottom: -10px;
}

.wpvhb__progress {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 0;
	border-radius: inherit;
	background: var(--wpvhb-tl-color);
	pointer-events: none;
}

.wpvhb__thumb {
	position: absolute;
	top: 50%;
	left: 0;
	width: 12px;
	height: 12px;
	margin: -6px 0 0 -6px;
	border-radius: 50%;
	background: var(--wpvhb-tl-color);
	pointer-events: none;
}

.wpvhb__segments {
	position: absolute;
	left: 0;
	right: 0;
	bottom: calc(100% + 4px);
	display: none;
	pointer-events: none;
}

.wpvhb__timeline.has-segments .wpvhb__segments { display: block; }

.wpvhb__seg {
	position: absolute;
	height: 4px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .55);
}

.wpvhb__seg.is-on { background: #ffd23f; }

.wpvhb__time {
	flex: 0 0 auto;
	min-width: 72px;
	text-align: right;
	font: 500 12px/1 system-ui, sans-serif;
	font-variant-numeric: tabular-nums;
	color: #fff;
}

/* Contorno dos textos fora do tempo atual (editor). */
.wpvhb--editor.wpvhb--outlines .wpvhb-text:not(.is-active) {
	visibility: visible;
	opacity: .35;
}

.wpvhb--editor.wpvhb--outlines .wpvhb-text:not(.is-active) .wpvhb-part {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
	clip-path: none !important;
}

.wpvhb--editor.wpvhb--outlines .wpvhb-text__inner {
	outline: 1px dashed rgba(255, 255, 255, .6);
}

/* Movimento reduzido: sem transições decorativas. */
@media (prefers-reduced-motion: reduce) {
	.wpvhb__video { transition: none; }
}
