.video-wrapper {
  max-width: 960px;
  position: relative;
}

/* Deferred-load facade (poster placeholder shown before the player loads) */
.bap-facade {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 to match .vjs-16-9 and avoid layout shift */
  background-color: #000;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  cursor: pointer;
  overflow: hidden;
}

.bap-facade:not(.has-poster) {
  background-image: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
}

.bap-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease;
}

.bap-facade:hover::after,
.bap-facade:focus::after,
.bap-facade:focus-visible::after {
  background: rgba(0, 0, 0, 0.05);
}

.bap-facade:focus-visible {
  outline: 3px solid #e60000;
  outline-offset: -3px;
}

.bap-facade__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.65);
  transition: background 0.2s ease, transform 0.2s ease;
}

.bap-facade:hover .bap-facade__play,
.bap-facade:focus .bap-facade__play,
.bap-facade:focus-visible .bap-facade__play {
  background: #e60000;
  transform: translate(-50%, -50%) scale(1.06);
}

.bap-facade__play-icon {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
}

.video-wrapper.is-floating {
  position: fixed;
  bottom: 120px;
  right: 20px;
  width: 340px;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .video-wrapper.is-floating {
    width: 300px;
    bottom: 160px;
    right: 10px;
  }
}

.video-wrapper.is-floating .floating-header {
  display: flex;
}

.floating-header {
  display: none;
  background: black;
  color: white;
  padding: 8px 12px;
  font-size: 14px;
  justify-content: space-between;
  align-items: center;
}

.floating-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.video-placeholder {
  display: none;
}

.video-wrapper.is-floating + .video-placeholder {
  display: block;
  max-width: 960px;
}
