/**
 * Barra de progresso VSL — overlay minimalista sobre o vídeo.
 * Cor primária do projeto: laranja #ff6a00
 */

/* Hero Vimeo 9:16 — cabe na altura útil do viewport, caixa justa + borda */
.hero-video-figure {
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.hero-video-frame {
  display: inline-block;
  max-width: 100%;
  padding: 2px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ff6b00, #ffb347 45%, #ff6b00);
  box-shadow:
    0 0 0 1px rgba(255, 107, 0, 0.45),
    0 10px 40px rgba(0, 0, 0, 0.5);
  vertical-align: top;
}

.hero-video-inner {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  line-height: 0;
}

/**
 * 9:16 vertical — altura limitada ao viewport (nunca negativa: evita caixa com 0px).
 * Largura = altura × 9/16 via aspect-ratio (sem width: % que colapsa dentro de inline-block).
 */
.hero-video-wrapper {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  /* max(…) impede calc(100vh - 240px) negativo em ecrãs muito baixos */
  height: min(58vh, max(200px, calc(100vh - 240px)));
  width: auto;
  max-width: min(360px, 100%);
  border-radius: 10px;
}

.hero-video-wrapper .hero-video-iframe,
.hero-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
}

@media (max-width: 480px) {
  .hero-video-wrapper {
    height: min(52vh, max(180px, calc(100vh - 200px)));
  }
}

.vsl-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0;
  /* Só a track recebe clique; o resto não bloqueia o vídeo */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.vsl-progress.is-visible {
  opacity: 1;
}

/* Área clicável para seek (pointer-events só no track) */
.vsl-progress__track {
  position: relative;
  width: 100%;
  height: 4px;
  min-height: 3px;
  max-height: 5px;
  border-radius: 0 2px 2px 0;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.vsl-progress__track:focus-visible {
  outline: 2px solid rgba(255, 106, 0, 0.7);
  outline-offset: 2px;
}

.vsl-progress__fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7a20 0%, #ff6a00 55%, #ff9228 100%);
  box-shadow: 0 0 16px rgba(255, 106, 0, 0.45);
  pointer-events: none;
  transform-origin: left center;
  will-change: width;
}

/* Shell do player: vídeo + barra no mesmo recorte */
.hero-player-shell {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0 0 0.375rem 0.375rem;
}

/* Barra VSL do hero (HTML5) — overlay inferior, seek por clique */
.vsl-progress-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.vsl-progress-bar-container:focus-visible {
  outline: 2px solid rgba(255, 107, 0, 0.65);
  outline-offset: 2px;
}

.vsl-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: #ff6b00;
  /* Largura atualizada via rAF + easing JS; transition aqui competiria com o frame loop */
  pointer-events: none;
  transform-origin: left center;
  will-change: width;
}
