/* Base container: half-height center right */
.video-bubble-container{
  will-change: top, left, transform;
  backface-visibility: hidden;
  position: fixed;
  top: calc(var(--wvp-vh, 1vh) * 50);
  right: 20px;
  transform: translateY(-50%);
  z-index: 9999;
  width: auto;
  height: auto;
}

.video-bubble-icon{
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  cursor: pointer;
  outline: none;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
  background: #000;
  transition: transform .35s ease, width .35s ease, height .35s ease, border-radius .35s ease, box-shadow .35s ease;
  will-change: transform, width, height;
}

.video-bubble-icon .play-symbol{
  position: relative;
  z-index: 2;
  font-size: 22px;
  color:#fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

.video-bubble-icon .video-bubble-preview{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.85) contrast(1.05);
}

/* Clique passa para a bolha quando não expandida */
.video-bubble-container:not(.wvp-expanded) .video-bubble-preview{
  pointer-events: none;
}

/* Expanded: circular fullscreen centered */
.video-bubble-container.wvp-expanded{ position:fixed; top: calc(var(--wvp-vh, 1vh) * 50) !important; left: 50% !important; right:auto !important; bottom:auto !important; transform: translate(-50%, -50%) !important; z-index:2147483647; will-change: transform; }

.video-bubble-container.wvp-expanded .video-bubble-icon{
  width: 100vmin;
  height: 100vmin;
  border-radius: 50%;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  background: #000;
}

/* Zoom effect in expanded */
.video-bubble-container.wvp-expanded .video-bubble-preview{
  object-fit: cover;
  transform: scale(1.25);
  transition: transform .4s ease;
  will-change: transform;
}

/* Hide play glyph when expanded */
.video-bubble-container.wvp-expanded .play-symbol{ display:none; }

/* Close button shows only expanded */
.wvp-bubble-close{
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 0;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 20px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  display: none;
}
.video-bubble-container.wvp-expanded .wvp-bubble-close{ display: inline-block; }

/* Mobile: 20% mais abaixo do centro quando NÃO expandida */
@media (max-width: 768px){
  .video-bubble-container{ top: calc(var(--wvp-vh, 1vh) * 70); transform: translateY(-50%); right: 16px; }
}

/* === Centered Play/Pause button (expanded only) === */
.wvp-center-toggle{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.video-bubble-container.wvp-expanded .wvp-center-toggle{
  display: flex;
}
.video-bubble-container.wvp-expanded.wvp-playing .wvp-center-toggle{
  opacity: 0;
  pointer-events: none;
}

/* tweak: ensure video is under the overlay button */
.video-bubble-container .video-bubble-icon,
.video-bubble-container .video-bubble-preview{ z-index: 1; }
.video-bubble-container .wvp-bubble-close{ z-index: 4; } /* X stays above */

@supports (height: 100dvh) {
  .video-bubble-container{ top: 50dvh; }
  @media (max-width: 768px){
    .video-bubble-container{ top: 70dvh; }
  }
  .video-bubble-container.wvp-expanded{ top: 50dvh !important; }
}
