/* ==================================================
   FloatingVideo. bolha sticky + modal
   ================================================== */

.v-fvid {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 200px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 11, 88, 0.18), 0 2px 8px rgba(0, 11, 88, 0.08);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition: transform 320ms cubic-bezier(.2,.9,.3,1), opacity 320ms ease, box-shadow 220ms ease;
}
.v-fvid--in {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.v-fvid:hover {
  box-shadow: 0 18px 56px rgba(0, 11, 88, 0.28), 0 4px 12px rgba(0, 11, 88, 0.12);
  transform: translateY(-2px) scale(1);
}

.v-fvid__media {
  position: relative;
  width: 100%;
  aspect-ratio: 200 / 120;
  background: var(--vaas-blue-deep, #000b58);
  overflow: hidden;
}
.v-fvid__media video,
.v-fvid__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.v-fvid__yt {
  position: absolute;
  /* YouTube iframe é 16:9; o card é ~5:3. Escalamos pra cobrir e cortar o player chrome. */
  top: 50%;
  left: 50%;
  width: 180%;
  height: 220%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
  background: #000;
  display: block;
}
.v-fvid__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}
.v-fvid__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--vaas-blue-deep, #000b58);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0.9;
  transition: transform 200ms ease, opacity 200ms ease;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.v-fvid:hover .v-fvid__play {
  transform: translate(-50%, -50%) scale(1.05);
  opacity: 1;
}

.v-fvid__placeholder {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(205, 255, 41, 0.18), transparent 60%),
    linear-gradient(135deg, #000b58 0%, #0434f4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.v-fvid__placeholder-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 16px 16px;
  animation: v-fvid-pan 8s linear infinite;
}
@keyframes v-fvid-pan {
  to { background-position: 16px 16px; }
}
.v-fvid__placeholder-label {
  position: relative;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: #cdff29;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.35);
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid rgba(205, 255, 41, 0.4);
}

.v-fvid__label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 32px 10px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--vaas-blue-deep, #000b58);
  line-height: 1.3;
  background: #fff;
}
.v-fvid__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cdff29;
  box-shadow: 0 0 0 0 rgba(205, 255, 41, 0.6);
  animation: v-fvid-pulse 1.6s ease-out infinite;
  flex-shrink: 0;
}
@keyframes v-fvid-pulse {
  70% { box-shadow: 0 0 0 8px rgba(205, 255, 41, 0); }
  100% { box-shadow: 0 0 0 0 rgba(205, 255, 41, 0); }
}

.v-fvid__close {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 11, 88, 0.08);
  color: var(--vaas-blue-deep, #000b58);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  padding: 0;
}
.v-fvid__close:hover {
  background: var(--vaas-blue-deep, #000b58);
  color: #fff;
}

/* ----- Modal ----- */
.v-fvid-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 11, 88, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  animation: v-fvid-fade 200ms ease-out;
}
@keyframes v-fvid-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.v-fvid-modal__inner {
  position: relative;
  width: 100%;
  max-width: 1120px;
  animation: v-fvid-rise 320ms cubic-bezier(.2,.9,.3,1);
}
@keyframes v-fvid-rise {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.v-fvid-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease;
}
.v-fvid-modal__close:hover {
  background: rgba(255, 255, 255, 0.22);
}
.v-fvid-modal__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.v-fvid-modal__frame iframe,
.v-fvid-modal__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.v-fvid-modal__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  gap: 8px;
  text-align: center;
  padding: 24px;
}
.v-fvid-modal__placeholder span {
  font-family: var(--font-display, sans-serif);
  font-size: 24px;
  font-weight: 600;
}
.v-fvid-modal__placeholder p {
  margin: 0;
  font-size: 13px;
  opacity: 0.7;
}
.v-fvid-modal__placeholder code {
  background: rgba(255,255,255,0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
}

@media (max-width: 600px) {
  .v-fvid {
    display: none !important;
  }
  .v-fvid-modal { padding: 16px; }
  .v-fvid-modal__close { top: -40px; }
}
